vim-notes
vim-notes copied to clipboard
Changing g:notes_directories during Vim session doesn't change directories
In my .vimrc I have this:
let notes_dir = '~/ownCloud/vim-notes'
silent execute '!mkdir ' . notes_dir . ' > /dev/null 2>&1'
silent execute '!mkdir ' . notes_dir . '/.vim-notes > /dev/null 2>&1'
let g:notes_directories = [notes_dir]
let g:notes_tagsindex = notes_dir . '/.vim-notes/tags.txt'
let g:notes_indexfile = notes_dir . '/.vim-notes/index.pickle'
It was my hope that I could turn this into a function so that I can change what notes_dir
is at any time during a Vim session and enter a different notes "Project", with different notes, tags, index, etc.
However, when setting g:notes_directories
and the other index options to different directories and running :RecentNotes
, :ShowTaggedNotes
, or :IndexTaggedNotes
, vim-notes still operates on the previous directory that was defined.
I suppose vim-notes wasn't really built for this; if there were a cache-clearing function, I could just put that inside my .vimrc, but I can't seem to find the right one in notes.vim.