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

Issue 126 in vim: [PATCH] Fix broken syntax highlighting for sh after runtime files update

Expand Messages
  • vim@...
    Status: New Owner: ---- Labels: Type-Defect Priority-Medium New issue 126 by lekenst...@gmail.com: [PATCH] Fix broken syntax highlighting for sh after runtime
    Message 1 of 3 , Mar 31, 2013
    • 0 Attachment
      Status: New
      Owner: ----
      Labels: Type-Defect Priority-Medium

      New issue 126 by lekenst...@...: [PATCH] Fix broken syntax
      highlighting for sh after runtime files update
      http://code.google.com/p/vim/issues/detail?id=126

      I recently upgraded vim on Arch Linux which broke syntax highlighting of
      certain shell scripts. An example of such script:

      #!/bin/sh
      foo=$(cmd --arg)
      echo "$foo"

      With 7.3.834-1, the syntax highlighting was fine. Since 7.3.875-1, the
      syntax highlighting was broken. Try it yourself:

      vim -u /dev/null +'syntax on' foo.sh

      I bisected (git-remote-hg :-) ) it to:

      Author: Bram Moolenaar <bram@...>
      Date: Tue Mar 19 11:35:58 2013 +0100

      Update runtime files.

      This is a diff of the change to runtime/syntax/sh.vim
      @@ -1,9 +1,10 @@
      shArithmetic
      shDeref
      shDerefSimple
      +shEcho
      shEscape
      shNumber
      -shOperator
      +shOption
      shPosnParm
      shExSingleQuote
      shSingleQuote
      @@ -16,4 +17,4 @@
      shTest
      shCtrlSeq
      shSpecial
      -shCmdParenRegio
      +shCmdParenRegion

      shOption causes the invalid syntax highlighting here. The attached patch
      makes the `--` option stop at the closing parenthese too (seriously, who
      uses `--)`) anyway? It is a syntax error). Applied on top of 3.7.875,
      current workaround is to copy the file from
      /usr/share/vim/vim73/syntax/sh.vim into ~/.vim/syntax/sh.vim and apply the
      patch.

      Originally reported at https://bugs.archlinux.org/task/34523

      Note, these changes somehow do not show up in the patches on ftp. Also, it
      stopped halfway applying due to
      https://groups.google.com/forum/#!topic/vim_dev/atNg4a30770

      Attachments:
      fix-sh-subcommand-syntax.patch 1.8 KB

      --
      You received this message because this project is configured to send all
      issue notifications to this address.
      You may adjust your notification preferences at:
      https://code.google.com/hosting/settings

      --
      --
      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.
    • vim@...
      Comment #1 on issue 126 by randomen...@gmail.com: [PATCH] Fix broken syntax highlighting for sh after runtime files update
      Message 2 of 3 , Jun 20, 2013
      • 0 Attachment
        Comment #1 on issue 126 by randomen...@...: [PATCH] Fix broken syntax
        highlighting for sh after runtime files update
        http://code.google.com/p/vim/issues/detail?id=126

        +1 I can confirm this is still an issue with 7.3.1221 and this patch fixes
        it, thanks!

        --
        You received this message because this project is configured to send all
        issue notifications to this address.
        You may adjust your notification preferences at:
        https://code.google.com/hosting/settings

        --
        --
        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.
      • vim@...
        Updates: Status: Fixed Comment #2 on issue 126 by chrisbr...@googlemail.com: [PATCH] Fix broken syntax highlighting for sh after runtime files update
        Message 3 of 3 , Sep 30, 2014
        • 0 Attachment
          Updates:
          Status: Fixed

          Comment #2 on issue 126 by chrisbr...@...: [PATCH] Fix broken
          syntax highlighting for sh after runtime files update
          https://code.google.com/p/vim/issues/detail?id=126

          Seems to be fixed. In any case, if you have problems with runtime files,
          please first bring up the issue with the maintainer of the file. He will
          then send updated files to Bram for inclusion. Closing for now.

          --
          You received this message because this project is configured to send all
          issue notifications to this address.
          You may adjust your notification preferences at:
          https://code.google.com/hosting/settings

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