> Method 2. There's nothing obvious in wanting Vim to always set the 
> current directory to the directory of the current file: 'autochdir' 
> (q.v.) defaults to off, and as a matter of fact I don't set it on. 
> However if you do, I think it doesn't matter which directory you :cd to 
> in your vimrc, whenever you enter a file (including the first file on 
> the command-line) Vim should change to the file's directory. So in that 
> case I think you could just write the following into your vimrc:
> 
>       set autochdir
>       cd C:\my\preferred\startup\dir

You don't need autochdir, and may not want it (e.g. because you don't
want it changing after opening the first file, but only when opening the
first file). Also, the Windows version automatically does that (changes
for the first file, but doesn't set autochdir).

:help vim-default-editor
:help send-to-menu

Ben.



--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to