On Tuesday, October 16, 2012 11:51:23 AM UTC-4, Charles Campbell wrote:
> 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
Thanks for your reply,
I understand your point, but it seems that vim already tries not to check spelling in a variety of locations when editing latex files (labels, citations, \ commands...)
I mentioned these because in my documents they are the only place left where I think the spelling should not be done, but I am sure there a a lot more for commands I am not using that would have to be added so that would be really hard.
I would gladly put the specific rules in my after/ftplugin, but unfortunately I don't know exactly what to put there.
Could you please tell me what specifically I would put there or point me for some files with specific examples?
Thank you for the help.
Jorge.
--
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
Tuesday, October 16, 2012
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment