Search code examples
vimsshsftpnetrw

vim's sftp plugin remote editing file


There is a way to use Sublime Text's SFTP plugin to remote editing a file. Because my network is slow, when I want to ssh to the server to use vim to edit codes, it will be very slow. I tried vim's plugin called "netrw", but I don't like it. Could you suggest another way to use vim to edit remote server's file without delay?


Solution

  • There's nothing "user-unfriendly" in:

    :e scp://foo@bar.baz//path/to/dir/
    (edit file)
    <C-^>
    (edit another file)
    <C-^>
    (edit another file)
    <C-^>
    (rinse, repeat)
    

    You get a file listing, you pick a file to edit, you go back to that file listing, you pick another file… simple.

    Other options:

    • use a dedicated SFTP client to deal with the networking part,
    • use Git/Subversion/Mercurial/$VCS
    • mount your SSH file system