Tuesday, July 12, 2011

Re: Way of opening local gVim edit remote file via putty?

Charles Campbell wrote:
> Laph wrote:
>>
>> Hi all,
>>
>> I used to coding in remote unix server by connecting via putty in my
>> windows desktop, but the problem is that the account of unix server
>> is shared for varies users who are using vim, too. This causes the
>> remote vimrc chaos.
>>
>> So I think it would be a great idea using local gvim with my own
>> vimrc to edit remote files. I know the way of `:e scp://...' to edit
>> the specified remote file via scp, but it need to switch from putty
>> to gvim when I want to open remote files after some operation in the
>> terminal, say grep, tail, or make. And switch it back if I want to
>> take another operation. It is quite inefficient.
>>
>> Is it possible a way in putty terminal opening my local gvim in
>> windows desktop to edit the remote file without manually switching
>> window and retyping `:e scp://...' again and again?
>>
> Does gvim work for you on your local system?
>
> I'm not sure what you mean by "it need to switch from putty to gvim".
> I would've thought that gvim would be running in its own window and
> putty in its own separate window, so switching between them is an o/s
> mousy thing. You should be able to simply leave the gvim window up
> and running, and so not need to type ":e scp://..." repeatedly.
>
> Or perhaps you should try
>
> :e scp://somehost/
>
> (note the trailing slash) and "edit" the remote directory. Pick a
> file, edit it, perhaps :w it; use :Rex to return to the netrw
> directory listing, etc.
Also, one may use the url notation from the command line:

vim scp://hostname/path/file

and so perhaps you could just re-issue that editing command using
whatever command line history is available. At least you wouldn't have
to re-type it.

Regards,
Chip Campbell

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