Sunday, July 3, 2011

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

On 2011-07-03, 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?

I can't think of a way to do what you want, but an alternative
solution would be to use your own vimrc on the remote server.
Create your own vimrc and give it a unique name such as
~/.vimrc.your_name. Then at the start of each PuTTY session,
execute

alias vim='vim -u ~/.vimrc.your_name'

See

:help -u

Regards,
Gary

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