Tuesday, October 16, 2012

Re: Spellcheck on Tex-Files

skeept wrote:
> On Tuesday, January 15, 2008 2:35:06 PM UTC-5, (unknown) wrote:
>> Hi!
>> I am using the built in spellcheck for vim 7 and I want to use it with
>> Latex-files. There are some fillips which are irritating me.
>> So, for example if I have a table defined as:
>>
>> \begin{tabular}{c}
>> ...
>>
>> The c in the brackets is highlighted as a missspelled word.
>>
>> Another one:
>>
>> %\usepackage{...}
>>
>> Usepackage is highlighted as a missspelled word.
>> I'd like to turn off the spelling correction in comments, for it is not important for Latex-documents, because that's not to see for the reader afterwards and I'd like to have the highlighting of the column setup in the tabular-statement fixed.
>>
>> How to do these?
>>
>> Tanks in advance,
>> surgeon
>
> I am having problems with misspells in tabular and multicolumn commands.
> So for example in
> \begin{tabular}{rl}
> one & two \\
> \multicolumn{2}{c}{what?}
> \end{tabular}
>
> rl and c are marked as spelling errors, but when using an array in math this does not result in an error.
>
> I checked the tex syntax file and it is version 73 from April 24.
>
> Any idea on how this can get fixed?
>
Vim is not a LaTeX parser. I could fix this by providing syntax rules
for tabulars (the syntax highlighting engine is more lexical than
syntactic), but there're many other places where LaTeX accepts things
that are not regular text and would be flagged as spelling errors. The
syntax/tex.vim file is already over 1200 lines long; I don't think I
will be implementing any fixes for this.

If this seriously annoys you, you could probably put additional syntax
highlighting rules in a .vim/after/syntax/tex.vim file and have it
recognize the tabulars (and whatever else you want recognized).

Regards,
C Campbell

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

No comments: