VIM directory browsing


I'm running Windows XP and have installed gVIM…and love it.

Normally I just run gVIM and let the windowed app do all its magic, but lately I've been using the standard vim in the console as well.

The issue I'm having is with directory browsing.

In a gVIM window I can type :edit. and it will list out my current directory with files to select.

However, in VIM (in the command prompt), typing :edit. only outputs "." is a directory, and doesn't list out the current working directory as it does in gVIM.

Is there another way to do what I'd like?

** edit **

noticed that the reason that i am getting different behavior is the fact that when i run vim from the command line, it runs from c:\windows\system32, but when i run gvim it comes from c:\program files\vim….and the version in system32 has no pointer to the _vimrc file

Best Answer

Directory browsing is provided by the (installed as standard) netrw plugin. Your gvim presumably has access to that plugin but your console vim doesn't. Assuming you've installed vim in C:\vim and you're using vim 7.2, the plugin will probably be in c:\vim\vim72\plugins. Make sure you run vim from C:\vim\vim72 (by adding that directory to the start of your path).

If there is no c:\vim\vim72\vim.exe, copy the gvim.exe in the same directory but rename it as vim.exe and it should sort the rest out.