Wednesday, June 29, 2011

conditional cd (setting the working current directory) in _vimrc

I'm running vim 7.3 on Vista...argh.

Sometimes I run vim, I mean gvim by clicking on a shortcut to the program and sometimes I run vim (I mean gvim) by opening a specific file.
(vim is installed @ C:\Vim\vim73\gvim.exe)

If I invoke vim for a specific file I want vim to set the current directory to that location--this is what happens if there isn't any :cd command in my _vimrc file, but I want to set the current directory to something other than c:\Windows\system32 which is what happens if I start vim from the Start menu or the Quick Launch toolbar.

Why is vim starting in C:\Windows\system32?

and how can I specify the location to use if the program has been opened directly--not in response to editing a specific file?
tia,
--Dan

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: