Concealed elements spanning multiple lines

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Concealed elements spanning multiple lines

Gary Johnson-4
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>&nbsp;</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>&nbsp;</o:p></span></p>

Regards,
Gary

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

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.