On 02/01/11 19:05, Bastian Venthur wrote:
Hi,

when I log into a remote machine with ssh -X and start a local gvim
session, i can see the local gvim with:

   u...@remote$ gvim --serverlist
   GVIM

To control that it is really my local gvim session, I repeat it after
closing the local gvim and the serverlist is empty.

when I want to open a remote file with the --remote option

   u...@remote$ gvim --remote test.py

an empty file gets loaded in my local gvim. Is this a bug? If not, is
there a similar way to edit remote files locally? I know that it's
possible to use :e scp:u...@remote/path/to/file but I find it more
convenient to call vim direclty within the remote filesystem.


Cheers,

Bastian



T'ain't a bug, it's a feature:

1) see :help remote.txt
--remote and friends pass messages between the current Vim (the client) and another Vim instance (the server) which may even be running on the same machine.

2) see
        :help gui-fork
        :help -f
        :help 'guioptions'
when starting the GUI, it forks away from its shell, launching the GUI as a new process, unless you start gvim with the -f (or --nofork) command-line switch, or unless 'guioptions' includes the f flag at the instant the GUI is started (e.g. because you had "if has('gui') | set go+=f | endif", without the double quotes but with the single ones, in your vimrc)

To edit remote files in the local Vim, see :help pi_netrw.txt -- as apparently you know.

To edit remote files with a Vim running on a remote machine, you should be able to do it by starting a console-Vim (not gvim) instance within your ssh (or whatever) remote shell, provided of course that Vim is installed on the remote machine.

To edit remote files with *gvim* running on the remote machine, your remote gvim must have access to an X11 (or Windows or whatever) graphical display server displaying on the display you're looking at, not on some display or pseudo-display located at the remote site.


Best regards,
Tony.
--
The chief cause of problems is solutions.

--
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

Reply via email to