vscripts/vimwiki
2018-07-10 02:30:30 +03:00

13 lines
326 B
Bash
Executable file

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