Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I installed gvim for windows the other day and I'm trying to figure out why vim doesn't work properly with cmd. I tried creating new files under vim (starting vim from inside cmd or executing it directly). It seems like the file has been created but I can't see it in the explorer tree. I can open it with vim again and see the text I've written, so I'm guessing the file exists. Notepad or other editors doesn't seem to find the file either, even when inserting the path in the "filename to open" field they give me "file not found" error. I also tried searching for it, checking attributes and found nothing.

Anyone knows of a fix? By the way this works with gvim.

share|improve this question

when you start up vim, it will often (depending on your situation) load up in VIM's current directory. Do a :!dir<Enter> to see what directory it thinks you're in and if you see the file.

To change your current directory do a :cd c:\path\to\dir and then do a :w filename and you'll see that it should work correctly.

share|improve this answer
:!dir? Just use :pwd instead. – Benoit Nov 22 '10 at 16:34
I'm already in C:\. I also tried saving it like :w C:\filename, or :w filename (normal way you save files) but it doesn't show up. Have you tried it on your machine ? – Daniel Nov 22 '10 at 16:48
@Benoit, I suggest :!dir because that will also list his directory so he can see if the file is there or not. – g19fanatic Nov 22 '10 at 16:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .