On Tue, Jan 20, 2009 at 1:03 PM, Ben Fritz wrote: > > On Jan 8, 1:19 pm, itai wrote: > >> 4. The vim help files seem to recommend against using 'autuchdir'. I >> use the following: >> autocmd BufEnter * lcd %:p:h > > Regarding 'autochdir'...why is it that the help files recommend > against using it? > > And, do you really save anything by using the autocmd version that > basically does exactly the same thing?
I think the biggest problem with :set autochdir is that it fires too often. The autocmd version, since it doesn't have nested, doesn't fire when a plugin switches buffers through an autocmd, and the autochdir option does. > I'd like to update the tip linked by itai to put more emphasis on > 'autochdir' but I don't know whath the consequences would be. > > I've been using autochdir...the only broken thing I've noticed is > saving and restoring sessions (neither of which works properly when > autochdir is on, but I actually think the autocmd would be worse with > no easy way to disable it). But, like I said - vim itself disables it during autocmds, which is presumably why it's always behaved better for me. I did try out autochdir when the option was added, but I switched back to the autocmd when I found out it behaved better. ~Matt --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---