'autochdir' 'acd' boolean (default off)
global
{not in Vi}
{only available when compiled with it, use
exists("+autochdir") to check}
When on, Vim will change the current working directory whenever you
open a file, switch buffers, delete a buffer or open/close a window.
It will change to the directory containing the file which was opened
or selected.
This option is provided for backward compatibility with the Vim
released with Sun ONE Studio 4 Enterprise Edition.
Note: When this option is on some plugins may not work.
What are all of the hooks that you'd have to listen to to simulate autochdir?
I guess at least one would look like this
autocmd BufEnter * :cd expand('%:p:h')
How can all of the functionality of autochdir
be implemented?
do_autochdir
).