vscripts/vimwiki
2018-07-06 00:32:25 +03:00

13 lines
351 B
Bash
Executable file

#!/usr/bin/bash
index="$HOME/vimwiki/index.wiki"
typeset -a vimopts=(
'--cmd' 'packadd vimwiki'
'-c' 'set titlestring=vimwiki'
"$index"
)
case $1 in
-g) vimbin=$(command -v gvim);;
-n) vimbin=$(command -v nvim) || vimbin=$(command -v vim);;
*) vimbin=$(command -v tvim);;
esac
exec flock -w0 "$index" "$vimbin" "${vimopts[@]}"