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=(
|
|
|
|
'-c' 'set titlestring=vimwiki'
|
2018-07-06 12:09:20 +03:00
|
|
|
'-c' 'packadd vimwiki'
|
|
|
|
'-c' "e $index"
|
2018-07-06 00:32:25 +03:00
|
|
|
)
|
2018-06-29 16:58:43 +03:00
|
|
|
case $1 in
|
2018-07-06 00:32:25 +03:00
|
|
|
-g) vimbin=$(command -v gvim);;
|
2018-07-10 02:30:30 +03:00
|
|
|
-n) vimbin=$(command -v vim);;
|
2018-07-06 00:32:25 +03:00
|
|
|
*) 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[@]}"
|