dotfiles

My personal shell configs and stuff
git clone git://git.alex.balgavy.eu/dotfiles.git
Log | Files | Refs | Submodules | README | LICENSE

commit 3736b3cabe4926decd07ba12fa38e0c3cce40fec
parent 42e9aa082a08b09ae0bb36d9cdfc99f6b40e1ad8
Author: Alex Balgavy <alex@balgavy.eu>
Date:   Tue,  1 Dec 2020 13:28:52 +0100

opener: use vimsend when inside Vim

Former-commit-id: 5b64c33f868bbc7f933268897151ab2dd8287d41
Diffstat:
Mscripts/opener | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/opener b/scripts/opener @@ -1,7 +1,7 @@ #!/bin/sh [ $# -gt 0 ] || { printf "File required in argument.\n" && exit 1; } case $(file --mime-type "$1" -bL) in - text/*|application/json|inode/x-empty) $EDITOR "$1";; + text/*|application/json|inode/x-empty) { [ -n "$VIM_TERMINAL" ] && vimsend "$1"; } || ${EDITOR:-vim} "$1";; image/*) setsid -f sxiv "$@" 2>&1;; application/epub*) setsid -f ebook-viewer "$1" >/dev/null 2>&1;; application/x-sc) sc-im "$1";;