Last active
January 31, 2026 16:27
-
-
Save yebt/7f2abe154a5849ff3c073e9058e19d8f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## In console | |
| export LAUNCH_EDITOR=nvsr | |
| ## Create an alias for nvs | |
| nvim --listen ~/.cache/nvim/server.pipe | |
| ## Create a script for nvsr in: | |
| ## ~/.local/bin/nvsr | |
| #!/bin/bash | |
| # gets called with 3 args: filename, line, column | |
| filename=$1 | |
| line=$2 | |
| column=$3 | |
| # call your editor with whatever args it expects | |
| # my-editor -l $line -c $column -f $filename | |
| # nvim --server ~/.cache/nvim/server.pipe --remote $filename | |
| nvim --server ~/.cache/nvim/server.pipe --remote-send \ | |
| "<Esc>:e ${filename}<CR>:silent call cursor(${line},${column})<CR>" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # gets called with 3 args: filename, line, column | |
| filename=$1 | |
| line=$2 | |
| column=$3 | |
| # call your editor with whatever args it expects | |
| # my-editor -l $line -c $column -f $filename | |
| # nvim --server ~/.cache/nvim/server.pipe --remote $filename | |
| nvim --server ~/.cache/nvim/server.pipe --remote-send \ | |
| "<Esc>:e ${filename}<CR>:silent call cursor(${line},${column})<CR>" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment