2017-02-02 18:49:44 +02:00
|
|
|
#!/usr/bin/bash
|
2018-07-06 00:32:25 +03:00
|
|
|
index="$HOME/vimwiki/index.wiki"
|
|
|
|
typeset -a vimopts=(
|
|
|
|
'--cmd' 'packadd vimwiki'
|
|
|
|
'-c' 'set titlestring=vimwiki'
|
|
|
|
"$index"
|
|
|
|
)
|
2018-06-29 16:58:43 +03:00
|
|
|
case $1 in
|
2018-07-06 00:32:25 +03:00
|
|
|
-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
|
2018-07-06 00:32:25 +03:00
|
|
|
exec flock -w0 "$index" "$vimbin" "${vimopts[@]}"
|