Skip to content
/ nvrh Public

Aims to be similar to VSCode Remote, but for Neovim

License

Notifications You must be signed in to change notification settings

mikew/nvrh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nvrh

demo.client.open.mov.mp4

nvrh (Neovim Remote Helper) aims to provide a simple way of working with a remote Neovim instance, like you would with VSCode Remote.

Installation

Download the nvrh binary for your platform / architecture from the latest release.

Rename it to nvrh and put it somewhere on your PATH for convenience.

Features

  • Start Neovim on a remote machine.
  • Tunnel the connection between your local and remote machines.
  • Start your editor locally, talking to your remote Neovim instance.
  • Provide an easy way to tunnel ports.
  • Provide an easy way to open URLs on your local machine.

Usage

nvrh client open

This will open a new Neovim instance on your remote machine and connect to it from your local machine.

NAME:
   nvrh client open - Open a remote nvim instance in a local editor

USAGE:
   nvrh client open [command options] <server> [remote-directory]

CATEGORY:
   client

OPTIONS:
   --ssh-path value                               Path to SSH binary. Defaults to ssh on Unix, C:\Windows\System32\OpenSSH\ssh.exe on Windows (default: "ssh") [$NVRH_CLIENT_SSH_PATH]
   --use-ports                                    Use ports instead of sockets. Defaults to true on Windows (default: false) [$NVRH_CLIENT_USE_PORTS]
   --debug                                        (default: false) [$NVRH_CLIENT_DEBUG]
   --server-env value [ --server-env value ]      Environment variables to set on the remote server
   --local-editor value [ --local-editor value ]  Local editor to use. {{SOCKET_PATH}} will be replaced with the socket path (default: "nvim", "--server", "{{SOCKET_PATH}}", "--remote-ui")
   --help, -h                                     show help

By default it runs nvim, but you can run something else with

nvrh client open \
  --local-editor nvim-qt \
  --local-editor --nofork \
  --local-editor --server \
  --local-editor {{SOCKET_PATH}}

:NvrhTunnelPort

demo.tunnel.port.mov.mp4

nvrh adds a :NvrhTunnelPort command to Neovim to tunnel a port between your local and remote machines.

:NvrhTunnelPort 8080
:NvrhTunnelPort 4000

:NvrhOpenUrl

demo.browser.env.var.mov.mp4

nvrh adds a :NvrhOpenUrl command to Neovim to open a URL on your local machine.

:NvrhOpenUrl https://example.com

In addition to this command, it also sets the BROWSER environment variable, so commands can open a browser on your local machine.