Using Macvim over ssh

Use SSHFS from the FUSE for macOS project. https://github.com/libfuse/sshfs


One thing I used to use a lot was to open an X-11 session, then connect to my remote host, and use gvim over X. You'll have a full-GUI version of the editor, it'll look like its running locally, but everything really is running remotely.

Another alternative is to use VNC to remotely control the session on the remote host. There are several VNC clients for the Mac.

You can also use a Mac SFTP or FTP client to connect, then tell it to edit a file or files. If you've configured it to use MacVim as your editor the file I/O will occur through the FTP connection transparently. That's how I edit remote websites when I don't have ssh capability.

MacVim and vim's netrw plugin is very capable though. If you don't pass a filename to edit on the scp://... command, vim will present the usual directory browser letting you select your file from the remote machine and edit it locally. For instance, this opens a connection from my laptop to itself via SSH and shows me the home directory inside vim:

vim scp://greg@localhost//Users/greg/

The following command will open a file in MacVim over ssh:

:e scp://[email protected]/path/to/file

I suspect this might not be completely what you're looking for as it will only give you one file at a time.

If you could mount a share from the target system locally that would work as well.