Friday, July 30, 2010

Re: Enter a directory automatically when opening files with gvim , possible ?

On 31/07/10 04:49, Aaron Lewis wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi,
> I'm on KDE session , when single-clicking on files , it would execute
> gVim and open the file , but the problem is , gVIM doesn't change it's
> CWD by default.
>
> e.g on clicking on /Library/code/my.cpp , and !pwd command returns
> /home/my_USERNAME , and i want it to be /Library/code
>
> Many thanks !
>

Does the internal :pwd command return the same value as the external :!pwd ?

You might set 'autochdir' but that would _always_ set the current
directory to the directory of the current file, even when opened by :new
or :sview, and there are problems with that.

AFAICT, there is no specific autocommand to detect when a file is
dropped on the gvim icon, or edited by file association.


Best regards,
Tony.
--
Sure he's sharp as a razor ... he's a two-dimensional pinhead!

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: