vscripts/vimwiki

14 lines
355 B
Text
Raw Normal View History

2017-02-02 18:49:44 +02:00
#!/usr/bin/bash
index="$HOME/vimwiki/index.wiki"
typeset -a vimopts=(
'-c' 'set titlestring=vimwiki'
'-c' 'packadd vimwiki'
'-c' "e $index"
)
2018-06-29 16:58:43 +03:00
case $1 in
-g) vimbin=$(command -v gvim);;
-n) vimbin=$(command -v nvim) || vimbin=$(command -v vim);;
*) vimbin=$(command -v tvim);;
2018-06-29 16:58:43 +03:00
esac
exec flock -w0 "$index" "$vimbin" "${vimopts[@]}"