Charles Campbell wrote:
> Vince Negri wrote:
> > From: Ben Fritz [mailto:[email protected]]
> >
> >
> >> On Jul 10, 1:18 pm, "Benjamin R. Haskell"<[email protected]> wrote:
> >>
> >>> Multiple conceal matches/regions get collapsed into a single character.
> >>> I'm not sure if this is intended, but it is certainly confusing.
> >>>
> >
> >> I think it is intended, for use cases like multiple invisible markers
> >> to provide syntax highlighting to otherwise plain text (e.g.
> >> TxtFormat, AnsiiEsc). However, I think we should allow other use cases
> >> such as Greek characters in Tex, which could be VERY useful and
> >> probably not that much harder to implement.
> >>
> >
> > It is a little harder than you might initially think, because conceal lets
> > syntax highlighting do most of the dirty work for it - so as it stands,
> > a succession of single to-be-replaced characters is presented to the engine
> > as
> > a single region of "concealed text". But now that conceal is officially in
> > the tree, it becomes more possible to propose changes to the syntax
> > highlighting
> > code that might facilitate your TeX usage example.
> >
> Hello!
>
> 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!
--
MONK: ... and the Lord spake, saying, "First shalt thou take out the Holy Pin,
then shalt thou count to three, no more, no less. Three shalt be the
number thou shalt count, and the number of the counting shalt be three.
Four shalt thou not count, neither count thou two, excepting that thou
then proceed to three. Five is right out. Once the number three, being
the third number, be reached, then lobbest thou thy Holy Hand Grenade of
Antioch towards thou foe, who being naughty in my sight, shall snuff it.
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
/// 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