Wednesday, October 24, 2012

Re: Spellcheck on Tex-Files

On Tuesday, October 16, 2012 10:47:54 PM UTC-4, skeept wrote:
> On Tuesday, October 16, 2012 3:10:38 PM UTC-4, Charles Campbell wrote:
>
> > > 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?
>
> >
>
> >
>
> >
>
> > You need to recognize the regions and use add=@NoSpell with them.
>
> >
>
> >
>
> >
>
> > :help syn-region
>
> >
>
> >
>
> >
>
> > syntax/tex.vim has a number of "syn region" usages that you could use as
>
> >
>
> > an example. See "syn region DocZone" for example. You'll probably want
>
> >
>
> > to contains=@texFoldGroup, in the text region.
>
> >
>
> >
>
> >
>
> > Regards,
>
> >
>
> > C Campbell
>
>
>
> What I put in my after/ftplugin/tex.vim is
>
> syn region texTabularPos matchgroup=texSection start='\\begin\s*{\s*tabular\s*}{' end='}' fold contains=@texFoldGroup,@texDocGroup
>
>
>
> but it doesn't seem to work (I still see the the word marked as a miss spell).
>
>
>
> I also defined the following map
>
> map <F10> :echo "hi<" . synIDattr(synID(line("."),col("."),1),"name") . '> trans<'
>
> \ . synIDattr(synID(line("."),col("."),0),"name") . "> lo<"
>
> \ . synIDattr(synIDtrans(synID(line("."),col("."),1)),"name") . ">"<CR>
>
> from
>
> http://vim.wikia.com/wiki/Identify_the_syntax_highlighting_group_used_at_the_cursor
>
>
>
> and when I use it in the region I am interested I see
>
> hi<texSectionZone> trans<
>
>
>
> so I guess the region is not correctly defined.
>
> Any input is appreciated.
>
>
>
> Regards,
>
>
>
> Jorge


I would really appreciate a specific example on how to acomplish this.
My last try is
syn region texComment matchgroup=texStatement start='{tabular}{' end='}'
\ contains=@NoSpell

but it doesn't work...

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