Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo
what is the best way to define an interviki location?
The documentation says to do
but also mentions VikiDefine and "Viki BibTeX" sections mentions
let g:vikiInterBIB = $HOME ."/local/share/texmf/bibtex/bib/tml"
let g:vikiInterBIB_suffix = ".bib"
So which one should you use? And in which file should you do it?
Currently, I use
in ~/.vim/after/ftplugin/viki.vim which works. The only problem is that if I start vim with a file that has an interviki link, the link is marked red even if the file is there. If I reopen the file in the same vim instance or if I start vim with another viki file and then open the file with the interviki link, the link is marked correctly as blue (existing).
So I guess that doing the interviki define in ~/.vim/after/ftplugin/viki.vim seems to be too late (i.e. the file is already open when the definition is read).
> but also mentions VikiDefine and "Viki BibTeX" sections mentions
> let g:vikiInterBIB = $HOME ."/local/share/texmf/bibtex/bib/tml"
> let g:vikiInterBIB_suffix = ".bib"
This is outdated information. Thanks for pointing this out.
viki#Define(...) definitely is the right solution.
> So I guess that doing the interviki define in ~/.vim/after/ftplugin/viki.vim
The reason you can't put it into ~/.vimrc is because some variables and
functions aren't defined yet when loading this file. Since vim7 has
dictionnaries, one could think of using a global variable for defining
intervikis again, which would solve this problem.
Calling viki#Define(...) loads autoload/viki.vim though. I'm not sure if
after/autoload/viki.vim would work.
> Try ~/.vim/after/plugin/viki.vim
This worked fine. Thanks.