So I finally got around to looking up how to edit remote files with local vim[1]. You do need to have an ssh public/private key set up[2] for the server in question.
On the command line, use the format:
vim scp://username@example.com//path/to/document
Note the double // after the domain name — this gives you an absolute path on the remote box.
This technique works with the GUI gvim or MacVim applications too by using the :e command inside the program. Open up a new window and type
:e scp://lisa@example.com//www/docs/bleeding_gums.html
Bonus Tip #1
If your local username is the same as your remote username, you can eliminate it in your command. So, for example, if you were username “frink” in both places, you could use something like
vim scp://example.com//Users/frink/Documents/frogexaggerator.py
to access and edit your Frog Exaggerator controller script in your remote Documents folder.
Bonus Tip #2
Can’t remember the name of your remote file? Don’t worry — open a directory instead!
:e scp://example.net//Library/WebServer/Documents
You’ll see a list of the directory’s contents. Move the cursor to your desired file (or subdirectory) and hit return to open it. Naturally, this also works on local items.
Give me more!
You can read more in depth info at the appropriately titled Vim Tips Wiki article “Editing remote files via scp in vim”.
[1] Or gvim, MacVim, etc.
[2] Actually, you can use several different methods in addition to scp — ftp, http, etc. — but I had the automatic ssh login in place already.