Using vim to edit remote files
to locate the file, enter the password and happily edit away. Every :w will upload the file anew. This also works with at least scp:// , so there's no need to install an ftp server.
One small inconvenience is the fact that if you're NATed behind a firewall, you need to use ftp PASV mode, which is not the default setting for many ftp clients. However, Google brought an easy solution: add
let g:netrw_ftp_cmd="ftp -p"
to your ~/.vimrc. This latest tip thanks to: http://alecthegeek.wordpr...etrw-in-ftp-passive-mode/
Note that the above indicates a relative path on the server. If you want an absolute path, you need to add an extra /: ftp://user@server//absolute/path/to/file
I mostly develop on the remote machine or I develop on a local installed development machine (and ftp/scp it when i'm done). But it can be very handy when you want to edit a remote file quickly. Thanks for the tip!
Too bad. The only thing preventing VIM to take over the world!
But if the file you're editing is located on a computer you have ssh access to... then why bother? Chances are high vi(m) is installed on the remote systemEvery will upload the file anew. This also works with at least scp:// , so there's no need to install an ftp server.
Confusion, did you know you can import a dutch ispell dictionary to use in vim? I found that particularly useful, since I am writing most of my documents using vim.
Comments are closed