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

strange syntax match in css.vim

Expand Messages
  • Yasuhiro MATSUMOTO
    Hello bram and all. If show in the following css file, it don t do syntax correctly. a:visited { # OK color:#444; } a:visited{ # NG( { does not have syntax
    Message 1 of 2 , Sep 7, 2010
    • 0 Attachment
      Hello bram and all.

      If show in the following css file, it don't do syntax correctly.

      a:visited { # OK
      color:#444;
      }
      a:visited{ # NG("{" does not have syntax color)
      color:#444;
      }

      It use "\S*" for matching pseudo class id include "{" also. Below is a
      patch. Please check and include.

      Thanks.

      diff -r 073ff46fe397 runtime/syntax/css.vim
      --- a/runtime/syntax/css.vim Fri Aug 20 11:11:57 2010 +0200
      +++ b/runtime/syntax/css.vim Tue Sep 07 23:12:21 2010 +0900
      @@ -182,7 +182,7 @@
      syn region cssDefinition transparent matchgroup=cssBraces start='{'
      end='}' contains=css.*Attr,css.*Prop,cssComment,cssValue.*,cssColor,cssURL,cssImportant,cssError,cssStringQ,cssStringQQ,cssFunction,cssUnicodeEscape
      syn match cssBraceError "}"

      -syn match cssPseudoClass ":\S*" contains=cssPseudoClassId,cssUnicodeEscape
      +syn match cssPseudoClass ":\w*" contains=cssPseudoClassId,cssUnicodeEscape
      syn keyword cssPseudoClassId contained link visited active hover
      focus before after left right
      syn match cssPseudoClassId contained "\<first\(-\(line\|letter\|child\)\)\=\>"
      syn region cssPseudoClassLang matchgroup=cssPseudoClassId
      start=":lang(" end=")" oneline


      --
      - Yasuhiro Matsumoto

      --
      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
    • Bram Moolenaar
      ... Forwarding this to Claudio. -- hundred-and-one symptoms of being an internet addict: 167. You have more than 200 websites bookmarked. /// Bram Moolenaar --
      Message 2 of 2 , Sep 18, 2010
      • 0 Attachment
        Yasuhiro Matsumoto wrote:

        > Hello bram and all.
        >
        > If show in the following css file, it don't do syntax correctly.
        >
        > a:visited { # OK
        > color:#444;
        > }
        > a:visited{ # NG("{" does not have syntax color)
        > color:#444;
        > }
        >
        > It use "\S*" for matching pseudo class id include "{" also. Below is a
        > patch. Please check and include.
        >
        > Thanks.
        >
        > diff -r 073ff46fe397 runtime/syntax/css.vim
        > --- a/runtime/syntax/css.vim Fri Aug 20 11:11:57 2010 +0200
        > +++ b/runtime/syntax/css.vim Tue Sep 07 23:12:21 2010 +0900
        > @@ -182,7 +182,7 @@
        > syn region cssDefinition transparent matchgroup=cssBraces start='{'
        > end='}' contains=css.*Attr,css.*Prop,cssComment,cssValue.*,cssColor,cssURL,cssImportant,cssError,cssStringQ,cssStringQQ,cssFunction,cssUnicodeEscape
        > syn match cssBraceError "}"
        >
        > -syn match cssPseudoClass ":\S*" contains=cssPseudoClassId,cssUnicodeEscape
        > +syn match cssPseudoClass ":\w*" contains=cssPseudoClassId,cssUnicodeEscape
        > syn keyword cssPseudoClassId contained link visited active hover
        > focus before after left right
        > syn match cssPseudoClassId contained "\<first\(-\(line\|letter\|child\)\)\=\>"
        > syn region cssPseudoClassLang matchgroup=cssPseudoClassId
        > start=":lang(" end=")" oneline

        Forwarding this to Claudio.

        --
        hundred-and-one symptoms of being an internet addict:
        167. You have more than 200 websites bookmarked.

        /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
        /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
        \\\ download, build and distribute -- http://www.A-A-P.org ///
        \\\ help me help AIDS victims -- http://ICCF-Holland.org ///

        --
        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
      Your message has been successfully submitted and would be delivered to recipients shortly.