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:
parent
abccdc7a62
commit
6298daeca2
2 changed files with 10 additions and 1 deletions
|
@ -153,7 +153,11 @@ autocmd FileType markdown,txt call Prose()
|
|||
command! -nargs=0 Prose call Prose()
|
||||
|
||||
" PLUGIN: wiki.vim
|
||||
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']
|
||||
|
|
5
.config/shell/rc.d/set-wiki-root.sh
Normal file
5
.config/shell/rc.d/set-wiki-root.sh
Normal 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/'
|
Loading…
Reference in a new issue