Opening files over SSH in vim

| 1 miniute read

vim is awesome for editing files locally but copying your .vimrc to every system you want to edit files on and keeping it in sync can be a real PITA. You could use something like Cowboy’s dotfiles, but if you’re working on systems you don’t control you probably don’t want to be putting your vim config there anyway.

A great alternative is opening the files within your own local install of vim (or mvim if you have it installed on OSX) over SSH.

vim scp://root@test-web01.example.com//etc/aliases

Here is a gif of it in action

Opening files over SCP with vim