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

Default syntax file for JavaScript is not follow the group name rule

Expand Messages
  • OOO
    Hi I am trying to make Vim and JavaScript working together. And I found the default syntax file for JavaSctipt[1] have a bug. The problem is group names are
    Message 1 of 2 , Mar 1, 2013
      Hi

      I am trying to make Vim and JavaScript working together.
      And I found the default syntax file for JavaSctipt[1] have a bug.
      The problem is group names are camelCase.

      The guide, Portable syntax file layout[2] says it should starts with
      all lowercase filetype.
      It should be exactly same as filetype.
      In JavaScript language, will be 'javascript'
      But the default one uses 'javaScript'.

      There are 2 issues caused by this.

      1. Syntax complete[3] function will not work for JavaScript.
      Because of the group name not match the pattern 'javascript\k\+'

      2. Because the default one uses wrong name. Other enhanced syntax file
      for JavaScript wont easy to aware this. Also, other related language like
      coffee script. Uses JavaScript syntax for keyword. And they get it from
      the default one.

      [1]:https://code.google.com/p/vim/source/browse/runtime/syntax/javascript.vim
      [2]:http://vimdoc.sourceforge.net/htmldoc/usr_44.html#44.12
      [3]:https://code.google.com/p/vim/source/browse/runtime/autoload/syntaxcomplete.vim

      --
      OOO

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

      ---
      You received this message because you are subscribed to the Google Groups "vim_dev" group.
      To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
      For more options, visit https://groups.google.com/groups/opt_out.
    • glts
      Hi ... If you think this is an error in the Javascript syntax file, the normal course of action is to contact the maintainer of the syntax file. You can find
      Message 2 of 2 , Mar 2, 2013
        Hi

        On Friday, March 1, 2013 3:42:42 PM UTC+1, 高偉格 wrote:
        > Hi
        >
        > I am trying to make Vim and JavaScript working together.
        > And I found the default syntax file for JavaSctipt[1] have a bug.
        > The problem is group names are camelCase.

        If you think this is an error in the Javascript syntax file, the normal
        course of action is to contact the maintainer of the syntax file.

        You can find the maintainer's email address at the top of the file.

        glts

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

        ---
        You received this message because you are subscribed to the Google Groups "vim_dev" group.
        To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+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.