Tuesday, April 26, 2011

Current Directory; how can I set it permanently?


Hi All,

Basically, VIM remembers the CD (Current Directory) from a file ages ago, and I simply cannot goad VIM into remembering a new one, try as I might.  When I manually set CD using :cd /mypath, VIM remembers it for this session, but as soon as I close VIM and then start again, VIM starts using a current directory from ages ago.  This must now be over a year ago that I was last using that directory.  Tried using a modeline in each file to set current directory, but only options are allowed, not commands like cd.  Googled and found out that I can use autochdir to forcibly change current directory as each file is opened, which works but seems a bit aggressive.  As per my subject, please someone where does VIM remember the current directory?

Much appreciated!

Take care,
Pablo.

No comments: