On 2010-01-23, Lenin Lee wrote:
> On Windows, when I double click a file and open it using gvim, the path of the
> file will be set as the current directory of gvim.
> 
> But when I do the same thing on linux, the current directory of gvim always is
> my home directory.
> 
> I searched for the question with google, but there is no resolution.
> 
> So I wonder if anyone may help.

You didn't say what the problem was for which you are seeking a
resolution, but I assume that you want gvim on Linux to behave as it
does on Windows.  If that's the case, then one solution may be found
here:

    :help autochdir

That will, however, change the current working directory whenever
you open a new file, not just when gvim starts.  You may instead
want to put something like this in your ~/.vimrc:

    au VimEnter * cd %:h

See

    :help autocommand
    :help VimEnter
    :help :cd
    :help filename-modifiers

HTH,
Gary


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

Reply via email to