vimwiki: move to md
This commit is contained in:
parent
ce5e581b14
commit
b5f65b02d5
1 changed files with 9 additions and 5 deletions
14
vimwiki
14
vimwiki
|
@ -1,13 +1,17 @@
|
||||||
#!/usr/bin/bash
|
#!/usr/bin/zsh
|
||||||
index="$HOME/vimwiki/index.wiki"
|
INDEX="$HOME/vimwiki/index.md"
|
||||||
typeset -a vimopts=(
|
WIKIOPTS="[{'path': '$HOME/vimwiki/', 'syntax': 'markdown', 'ext': '.md'}]"
|
||||||
|
VIMOPTS=(
|
||||||
'-c' 'set titlestring=vimwiki'
|
'-c' 'set titlestring=vimwiki'
|
||||||
|
'-c' "let g:vimwiki_list = $WIKIOPTS"
|
||||||
'-c' 'packadd vimwiki'
|
'-c' 'packadd vimwiki'
|
||||||
'-c' "e $index"
|
'-c' "e $INDEX"
|
||||||
)
|
)
|
||||||
|
|
||||||
case $1 in
|
case $1 in
|
||||||
-g) vimbin=$(command -v gvim);;
|
-g) vimbin=$(command -v gvim);;
|
||||||
-n) vimbin=$(command -v vim);;
|
-n) vimbin=$(command -v vim);;
|
||||||
*) vimbin=$(command -v tvim);;
|
*) vimbin=$(command -v tvim);;
|
||||||
esac
|
esac
|
||||||
exec flock -w0 "$index" "$vimbin" "${vimopts[@]}"
|
|
||||||
|
exec flock -w0 $INDEX $vimbin ${VIMOPTS[@]}
|
||||||
|
|
Loading…
Reference in a new issue