Add remote RVIM shenanigans

This commit is contained in:
Talia 2022-09-01 12:59:14 +02:00
parent 585d988a0b
commit c133860005
3 changed files with 12 additions and 1 deletions

9
bin/rvim Executable file
View file

@ -0,0 +1,9 @@
#!/bin/sh
sock="$(git rev-parse --show-toplevel)/nvim.sock"
if [ -S "$sock" ]
then
exec nvim --server "$sock" --remote-tab $@
else
exec nvim --listen "$sock" $@
fi

View file

@ -2,9 +2,10 @@ map xh set show_hidden!
map xv chain set vcs_aware!; reset
map xp chain set preview_directories!; set preview_files!; set preview_images!
map er open_with rvim
map ev open_with vim
map ex open_with xdg-open
map eg open_with graphic
map er open_with remote
map ee edit
map I set sort_reverse!

View file

@ -229,4 +229,5 @@ label view, ext md|tex = zread "$@"
label view, has nvim, mime ^text = nvim -- "$@"
label view, mime ^text = vim -RM -- "$@"
label remote, has rvim, flag f = rvim "$@"
label vim, has nvim = nvim -- "$@"