2019-08-13 12:14:02 +03:00
|
|
|
#!/usr/bin/zsh
|
|
|
|
INDEX="$HOME/vimwiki/index.md"
|
|
|
|
VIMOPTS=(
|
2018-07-06 00:32:25 +03:00
|
|
|
'-c' 'set titlestring=vimwiki'
|
2020-02-11 14:10:03 +02:00
|
|
|
'-c' 'VimwikiIndex'
|
2018-07-06 00:32:25 +03:00
|
|
|
)
|
2019-08-13 12:14:02 +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
|
2019-08-13 12:14:02 +03:00
|
|
|
|
|
|
|
exec flock -w0 $INDEX $vimbin ${VIMOPTS[@]}
|