Hi,
I face this little annoyance when using the dictionary feature of
vim-latex. Suppose I want to complete 'doc' to documentclass. If there
are dictionaries set in my vimrc, then latexsuite searches
ftplugin/latex-suite/dictionaries/dictionary and the second word is
the correct hit. But if I have a dictionary set in vimrc, then CTRL-X
CTRL-K will search those dictionaries first and then come to the latex
dictionary. I have found a simple method to get rid of this annoyance.
Simply change the order in which the dictionaries are set.
There are two files that set the dictionary option, main.vim and
packages.vim. Change the line
set dict+=new_dict
to
set dict=new_dict,&dict and now the dictionary priorities are set
right. Specifically, in
main.vim change line 624 from
- exe 'setlocal dict+='.s:path.'/dictionaries/dictionary'
to
+ exe 'setlocal dict='.s:path.'/dictionaries/dictionary,'.&dict
and in
packages.vim change line 72 from
- exe 'setlocal dict+='.s:path.'/dictionaries/'.a:package
to
+ exe 'setlocal dict='.s:path.'/dictionaries/'.a:package.','.&dict
I am posting this, incase someone else also wants to change the order
of dictionary search.
Regards
Aditya Mahajan
|