I used to rely on VS Code's remote feature before switching to Neovim, and I'm looking for a similar solution. Is there a way to easily edit files on a remote server with Neovim after SSH-ing in? I've started trying out sshfs, but I'm unsure if that's the best approach. Ideally, I'd love to use my local Neovim configuration for editing these remote files without needing to set up Neovim on every server.
4 Answers
About using sshfs, it sounds like a good idea. You can mount the remote file system by running something like `sshfs username@remoteHost:/path/to/dir ~/local/dir`, then work directly in Neovim as if the files were local!
If you're considering using SSH directly, you can access files with a method like `vim scp://user@host/path/to/file`, but you need to ensure you're using SSH keys instead of passwords.
I actually did this for the first time recently! I’ve been using SSH in the terminal with Neovim and copying files to the server with SCP. Plus, I tried Tmux, which made it easier to manage multiple sessions without constant SSH logins.
One option is to export your Neovim settings to the remote server. You'll have to modify your config manually on the server side, but it could work out if you set it up properly.

Related Questions
How To Get Your Domain Unblocked From Facebook
How To Find A String In a Directory of Files Using Linux