139338Re: Improve context syntax file
- Sep 26, 2013On 2013–09–26 Paul Isambert wrote:
> > But I can't add it permanently. The underscore is only part of aI tried this. But iskeyword does not change the syntax highlighting.
> > word in between the following blocks.
> > \unprotect … \protect %% or
> > \starttexcode … \stoptexcode
> Since there is little chance that an underscore will immediately follow a
> control sequence anyway, I don't think defining it for the entire syntax file
> will cause any problem.
It only seems to have an effect on the “*” and similar commands. So
changing iskeyword is probably not what I'm after.
> However, you can do something along the following lines:I tried this, but it removes all syntax highlighting. Frankly, I
> sy match ControlSequence '\\[a-zA-Z]\+'
> sy match SpecialControlSequence '\\[a-zA-Z_]\+' contained
> sy region SpecialCode matchgroup=ControlSequence start='\\unprotect' end='\\protect' contains=SpecialControlSequence
have no idea of how the syntax highlighting works. I have to read up
the basics to understand how this exactly works. The issue seems
more complicated than anticipated. But thanks for the snippet, it's
something to start with.
- << Previous post in topic Next post in topic >>