On 30/12/08 09:58, bgold12 wrote:
> Hey, is there a quick way to set the current working directory to the
> directory that contains the file open in a vim buffer (assuming an
> actual file is open in that buffer)? I've always just cd'd my way into
> that directory either from where I am or from the root, but it would
> save typing if there's a way to do it automatically. Thanks.
Just once:
:lcd %:p:h
Using lcd rather than cd allows a different directory for each split-window.
Every time:
:set autochdir
This will constantly change your working directory; the help says that
it may cause some plugins not to work.
Best regards,
Tony.
--
Texas law forbids anyone to have a pair of pliers in his possession.
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---