On Sun, 28 May 2006, Geoffrey Alan Washburn wrote:
I looked through the help files and examined the archives but didn't see
anything that sounded like this. Essentially, I was interested in knowing
whether there was any way to set per document dictionary modifications? In
the papers I write there are words/keywords that are very specific to the
document that flagged as spelling errors, but they aren't really general
enough to put into my dictionary. For example, the paper I am editing right
now repeatedly refers to functions named "exListToTuple" and "tupleToExList".
I'm already using
%# vim:ft=latex
in the header of my documents to refer to my slightly modified version of the
TeX syntax plugin. What I would like to do is be able to add some additional
lines looking something like
%# vim:ft=latex
%# vim:spellignore+=exListToTuple
%# vim:spellignore+=tupleToExList
...
Is anything like this possible? If not I think it would be a really great
feature to implement.
Since 'spellfile' cannot be set from a modeline for security reasons,
you can try placing something like this in your vimrc:
autocmd BufWinEnter *
\ if expand("%:t") == "myfile1.txt" |
\ set spellfile=myspell1.latin1.add |
\ elseif expand("%:t") == "myfile2.txt" |
\ set spellfile=myspell2.utf-8.add |
\ else |
\ set spellfile= |
\ endif |
See
:help 'spellfile'
:help expand()
:help BufWinEnter
:help :autocmd
HTH.
--
Gerald