Gary Johnson
unread,May 24, 2013, 3:29:21 PM5/24/13Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to vim...@googlegroups.com
I think I know the answer to this--no--but I wanted to find out if I
was missing something.
I've been experimenting with hiding the contents of the style
attribute of HTML <span> tags, so that for example,
<span style='some long string of attributes'>
would appear as
<span style=…>
where the conceal character is an ellipsis, U+2026. I have copied
and modified $VIMRUNTIME/syntax/html.vim, changing one of the rules
for htmlString by appending "conceal cchar=…" like this:
syn region htmlString contained start=+'+ end=+'+ contains=htmlSpecialChar,javaScriptExpression,@htmlPreproc conceal cchar=…
It produces the desired results as long as the htmlString does not
span multiple screen lines, either by wrapping or by containing
multiple physical lines. Here is an example of an htmlString that
does both.
<p class=MsoNormal><span style=…
…
…
…><o:p> </o:p></span></p>
The actual tag has four physical lines; the first line is longer
than the window width and wraps.
Is there a way to conceal that string so that it appears like this?
<p class=MsoNormal><span style=…><o:p> </o:p></span></p>
Regards,
Gary