vscripts/vimwiki

14 lines
326 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);;
2018-07-10 02:30:30 +03:00
-n) vimbin=$(command -v vim);;
*) vimbin=$(command -v tvim);;
2018-06-29 16:58:43 +03:00
esac
exec flock -w0 "$index" "$vimbin" "${vimopts[@]}"