This commit is contained in:
Jaroslaw Konik 2024-05-09 22:47:50 +02:00
parent 36e7943374
commit 9f9dc823b9

17
nvim_remote Executable file
View file

@ -0,0 +1,17 @@
#!/bin/bash
path=$(cut -d " " -f 2 <<< $@)
dir=$(dirname $path)
cd $dir
args=$@
repo_path=$(git rev-parse --show-toplevel 2>/dev/null)
cd $repo_path
if [ -n "$repo_path" ]; then
servername=/tmp/nvr$(echo $repo_path | tr "/" "_")
echo $servername
nvr -s --servername $servername "$@"
else
nvim "$@"
fi