feat: initial commit
This commit is contained in:
7
README.md
Normal file
7
README.md
Normal file
@@ -0,0 +1,7 @@
|
||||
# Nvim Remote PoC
|
||||
|
||||
## Usage
|
||||
1. Modify `config.sh`
|
||||
2. Run `remote.sh` in the remote PC
|
||||
3. Run `local.sh` in the local PC
|
||||
4. Run `access.sh` in the local PC to launch neovim
|
||||
5
access.sh
Executable file
5
access.sh
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
. ./config.sh
|
||||
|
||||
exec nvim --server $LOCAL_SOCK --remote-ui
|
||||
8
config.sh
Executable file
8
config.sh
Executable file
@@ -0,0 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
LOCAL_PORT=12344
|
||||
LOCAL_SOCK=/tmp/local_server1.sock
|
||||
|
||||
REMOTE_SSH=allen@localhost
|
||||
REMOTE_PORT=12345
|
||||
REMOTE_SOCK=/tmp/server1.sock
|
||||
7
local.sh
Executable file
7
local.sh
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
. ./config.sh
|
||||
|
||||
ssh -L $LOCAL_PORT:localhost:$REMOTE_PORT $REMOTE_SSH -N &
|
||||
|
||||
socat UNIX-LISTEN:$LOCAL_SOCK,fork,reuseaddr,unlink-early TCP-CONNECT:localhost:$LOCAL_PORT
|
||||
Reference in New Issue
Block a user