Hi!
On Mon, 16 Jul 2012, Andy Wokula wrote:
> > While I'm sure I could come up with a vim script to do all of
> > this, I'd very much prefer to use something already done. My vim
> > script skills are waaaay rusty and why reinvent a wheel (badly at
> > that). Even better would to achieve this (or some close
> > approximation) using vim options.
>
> The following is from the help:
[...]
> => what you want should be possible.
>
> You could add to ~/.vim/after/ftplugin/tex.vim:
>
> let b:spellfile = expand('%:p:h'). '/myspell.latin1.add'
> if filereadable(b:spellfile)
> let &l:spf = b:spellfile
> else
> setl spf=
> endif
>
> This lets each tex file use the spell file myspell.latin1.add from its
> directory. Example assumes encoding "latin1", and that setting the
> option does not create the spell file yet ...
>
> or (with b:undo_ftplugin):
>
> let b:spellfile = expand('%:p:h'). '/myspell.latin1.add'
> if filereadable(b:spellfile)
> let &l:spf = b:spellfile
> let b:undo_ftplugin .= '|setl spf<'
> endif
> let b:undo_ftplugin .= '|unlet! b:spellfile'
>
> (warning: almost untested)
>
> Vim automatically creates the .spl files.
I'll definitely give it a go this week (yay, vacation time) and
report back.
Thanks a lot for coming up with this :)
Regars,
Tobias
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment