Add configurable wiki root directory

Can be set through environment variable WIKIROOT. By default points to
~/Nextcloud/Notes/ but is kept configurable for each computer. Will be
picked up by vim wiki plugin to enable wiki functionality for the
respective directory.
This commit is contained in:
Marty Oehme 2019-06-12 14:18:46 +02:00
parent abccdc7a62
commit 6298daeca2
2 changed files with 10 additions and 1 deletions

View file

@ -153,7 +153,11 @@ autocmd FileType markdown,txt call Prose()
command! -nargs=0 Prose call Prose() command! -nargs=0 Prose call Prose()
" PLUGIN: wiki.vim " PLUGIN: wiki.vim
if $WIKIROOT ==? ""
let g:wiki_root = '~/Nextcloud/Notes/' let g:wiki_root = '~/Nextcloud/Notes/'
else
let g:wiki_root = $WIKIROOT
endif
" filetypes to automatically enable the plugin for, seems to take file endings " filetypes to automatically enable the plugin for, seems to take file endings
" rather than vim ft " rather than vim ft
let g:wiki_filetypes = ['md', 'mkd', 'markdown', 'wiki'] let g:wiki_filetypes = ['md', 'mkd', 'markdown', 'wiki']

View file

@ -0,0 +1,5 @@
#!/bin/sh
# set wiki root to nextcloud notes folder,
# will be picked up by vim wiki plugin as root
export WIKIROOT='~/Nextcloud/Notes/'