Wednesday, June 29, 2011

Re: conditional cd (setting the working current directory) in _vimrc

On 2011-06-29, Daniel M. Eldridge wrote:
> 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?

If you're starting gvim from a shortcut--and that includes Start
menu and Quick Launch entries--that shortcut has Properties that
include a "Start in:" field to specify the directory in which you
wish to start gvim.

HTH,
Gary

--
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: