Charles Campbell wrote:

> >> I tried the following trick:
> >>
> >> syn match texGreek '\\alpha\>' contained conceal cchar=á 
> >> nextgroup=texGreek2
> >> syn match texGreek2 '\\alpha\>' contained conceal cchar=á 
> >> nextgroup=texGreek
> >>
> >> So $\alpha\alpha$ has the first \alpha as texGreek, and the second one 
> >> as texGreek2 . Unfortunately, although the syntax highlighting treated 
> >> the two differently, the conceal code still merges the two, using only 
> >> the one á instead of what I'd hoped (áá).
> >>     
> >
> > Makes sense.  We can get the ID of the syntax item, and use a change in
> > that as a signal to display the conceal character.
> > I have implemented that, please try it out and let us know.
> > If this doesn't work as intended, we should roll it back.
> >
> > Soon we can't make incompatible changes, thus please let's figure out
> > how this should work very soon!
> >
> >   
> Hello, Bram!
> 
> I've attached a modified syntax/tex.vim which makes a start at 
> supporting Greek, subscripts, and superscripts.  Its not complete:
> 
> * I haven't supported a^{b*c} for example; I'll have to try making 
> regions for superscripts and for subscripts.  Probably I can do 
> something about this.
> * Some symbols just aren't available via utf-8; for example, Euler's 
> equation:  e^{i \pi} = -1   ; there's no superscripted or subscripted 
> Greek available.  (AFAIK)
> * Subscripts are even more restrictive in utf-8; there's a good set of 
> superscripted a-zA-W (missing the q and Q, though), but for scripts, 
> only aeiou and 0-9 are available (again, AFAIK).
> * I haven't begun accent support; I think utf-8 does a very good job of 
> supporting accented characters, and  that's next on my  expanding list 
> of things to do for syntax/tex.vim
> 
> This trick doubles the amount of syntax rules, of course, so IMHO its 
> not ideal, but its working!  Thank you for the modification.

Having to double all these groups makes the syntax file a lot more
complex.  I'm thinking of another way to do this.
But do we really want every match with a "cchar" argument to display
that character?  So far it would only show one "cchar" for all
consecutive matches.

I would say that if one wants only one character, a match could be
created that spans the whole.


-- 
I bought a book on hair loss, but the pages kept falling out.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
You received this message from the "vim_dev" 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

Raspunde prin e-mail lui