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 (αα).

Regards,
Chip Campbell

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