What are the best ways to edit files on a remote server using Neovim?

0
10
Asked By ChocoLava18 On

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

Answered By TechieCat34 On

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!

Answered By AccessDenied007 On

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.

Answered By NinjaDev23 On

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.

Answered By PineappleCoder44 On

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

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.