vscripts/tvim

16 lines
423 B
Text
Raw Normal View History

#!/usr/bin/env bash
typeset -a vimopt=(
'--cmd' 'let g:tvim = 1'
'--cmd' "set tgc mouse=a title titlestring=[%F]%m\\ -\\ TVIM"
)
error() {
echo "$*" >&2
exit 1
}
termbin=$(command -v st) || termbin=$(command -v xterm) || error "No terminal found!"
vimbin=$(command -v nvim) || vimbin=$(command -v vim) || error "No vim binary found!"
exec "$termbin" -e "$vimbin" "${vimopt[@]}" "$@" &>/dev/null & disown