Open topfunky opened 14 years ago
Thank you! This works much better. The default handling of current directory made it almost unusable.
I typically let MacVim be long-lived, and the directory from which I launched it isn't necessarily germane to PeepOpen.
I'd rather have PeepOpen's root be set to the root of whatever git repo I'm currently working under ... fortunately with Fugitive.vim this is pretty easy:
map <unique> <silent> <leader>t :Gcd<CR> <Plug>PeepOpen
Note this actually won't work with the above alternate configuration, which caches the cwd at MacVim launch, but does work with the default PeepOpen configuration which calls cwd() each time PeepOpen is called.
(Background explanation - :Gcd executes a "cd" relative to the current file's git repo, so ":Gcd" with no arguments cd's into the root dir of the repo)
This was contributed by a user and may work better for maintaining the current directory in MacVim: