diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index bd6f27d..7c8073d 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -153,7 +153,11 @@ autocmd FileType markdown,txt call Prose() command! -nargs=0 Prose call Prose() " PLUGIN: wiki.vim -let g:wiki_root = '~/Nextcloud/Notes/' +if $WIKIROOT ==? "" + 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 " rather than vim ft let g:wiki_filetypes = ['md', 'mkd', 'markdown', 'wiki'] diff --git a/.config/shell/rc.d/set-wiki-root.sh b/.config/shell/rc.d/set-wiki-root.sh new file mode 100644 index 0000000..3e9d535 --- /dev/null +++ b/.config/shell/rc.d/set-wiki-root.sh @@ -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/'