Hey Matt,

> If instead of using 'autochdir' you go with an autocmd version, you
> can be more picky about which buffers you change directories for.  I
> personally go with this one:
>
>      au BufEnter * if &ft != 'help' | silent! cd %:p:h | endif
>
> That changes to the directory of the file being edited, unless that
> file is a help file.  It would be easy enough to change that to only
> cd if some buffer-local variable is not set, otherwise indicating that
> the buffer is some sort of scratch log file.  Does that get you far
> enough along?

I reverted to using:

au BufEnter * silent! cd %:p:h

But I like the check to see if it's a 'help' file.  That's a nice touch!

Cheers!

Chris

-- 
Chris Sutcliffe
http://emergedesktop.org

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

Reply via email to