Loading ...
Sorry, an error occurred while loading the content.

Concealed elements spanning multiple lines

Expand Messages
  • Gary Johnson
    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
    Message 1 of 1 , May 24 12:29 PM
    • 0 Attachment
      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

      --
      --
      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 vim_use+unsubscribe@....
      For more options, visit https://groups.google.com/groups/opt_out.
    Your message has been successfully submitted and would be delivered to recipients shortly.