Monday, August 3, 2015

Re: Spell checking in tex files

>David Woodfall wrote:
>> Spellcheck is turned off by default in tex files, so I have enabled it
>> with 'syntax spell toplevel'.
>>
>> When I also try to add a new syntax cluster, like:
>>
>> syn match Ellipsis /[.][.][.]\s\l/ contains=@NoSpell transparent
>> syn cluster Spell add=Ellipsis
>>
>> it seems to make no difference.
>>
>> Does toplevel override this cluster, or what is going on here?
>>
>* Spell checking is *not* turned off by default in tex files. To enable
>spell checking in English:
>
> :setl spell spelllang=en_us
>
> Of course, you may or may not be using English, so modify the above
>command according to your preferences.
>
>* You want Ellipsis not to be spell-checked, but to take on the
>highlighting of whatever syntax it appears in. You also want the
>Ellipsis pattern to be in the Spell cluster, presumably so that it gets
>treated as a correct spelling. I tried it out and it seemed to work to
>prevent "... b", for example, from being flagged as a spelling error.
>So more info, please -- what is it that "seems to make no difference?"
>Example, please. I've attached a pair of files myself.
>
> vim woodfall.tex
> :setl spell spelllang=en_us
> (shows spelling errors)
> :so woodfall.vim
> (spelling errors gone)
>
>Regards,
>Chip Campbell

OK. Some progress. I had to get rid of a problem tex.vim in
.vim/after/syntax.

I made a small change:

syn match Ellipsis /[.][.][.]\s\l.*\>/ contains=@NoSpell transparent

Now it matches until the end of the word and it all works beautifully.

Thanks for your help.

D.

--
--
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

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment