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

conceal HTML tag attributes

Expand Messages
  • AK
    Hi, I would like to accomplish the following: concealed: I ve mucked around with html.vim syntax file but I
    Message 1 of 2 , Feb 21, 2013
    View Source
    • 0 Attachment
      Hi, I would like to accomplish the following:

      <tag attr1='val' attr2='val'> </tag>

      concealed:

      <tag> </tag>


      I've mucked around with html.vim syntax file but I can't get anything to
      work, not even some very simplified example:

      syn match cTag +[a-z]\++ contained conceal containedin=concTag
      syn region concTag start=+zz+ end=+zz+ contains=cTag


      when I have this text: zz abc zz I thought abc would be concealed,
      but it's not. Instead, insides of html tags are concealed, which
      makes no sense at all. Please help!

      - rainy

      --
      --
      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.
    • rainy
      ... I found out what the issue was: I had my pattern on the first line of the html file, which prevented it from working. When I moved to the second line, it s
      Message 2 of 2 , Feb 21, 2013
      View Source
      • 0 Attachment
        On Feb 21, 7:03 pm, AK <andrei....@...> wrote:
        > Hi, I would like to accomplish the following:
        >
        > <tag attr1='val' attr2='val'> </tag>
        >
        > concealed:
        >
        > <tag> </tag>
        >
        > I've mucked around with html.vim syntax file but I can't get anything to
        > work, not even some very simplified example:
        >
        > syn match cTag +[a-z]\++ contained conceal containedin=concTag
        > syn region concTag start=+zz+ end=+zz+ contains=cTag
        >
        > when I have this text: zz  abc  zz I thought abc would be concealed,
        > but it's not. Instead, insides of html tags are concealed, which
        > makes no sense at all. Please help!
        >
        >   - rainy


        I found out what the issue was: I had my pattern on the first line of
        the html file, which prevented it from working. When I moved to
        the second line, it's now good.

        The syn match I'm using is:
        syn region htmlTag start=+<[^/]+ end=+>+
        contains=htmlTagN,htmlString,htmlArg,htmlValue,htmlTagError,htmlEvent,htmlCssDefinition,@htmlPreproc,@htmlArgCluster,doConceal

        syn match doConceal + [^>]*+ conceal contained

        - rainy

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