vscripts/vimwiki
2019-08-13 12:14:02 +03:00

17 lines
426 B
Bash
Executable file

#!/usr/bin/zsh
INDEX="$HOME/vimwiki/index.md"
WIKIOPTS="[{'path': '$HOME/vimwiki/', 'syntax': 'markdown', 'ext': '.md'}]"
VIMOPTS=(
'-c' 'set titlestring=vimwiki'
'-c' "let g:vimwiki_list = $WIKIOPTS"
'-c' 'packadd vimwiki'
'-c' "e $INDEX"
)
case $1 in
-g) vimbin=$(command -v gvim);;
-n) vimbin=$(command -v vim);;
*) vimbin=$(command -v tvim);;
esac
exec flock -w0 $INDEX $vimbin ${VIMOPTS[@]}