FS#34523 - [vim] Shell syntax highlighting is broken since patch
Attached to Project:
Arch Linux
Opened by Peter Wu (Lekensteyn) - Saturday, 30 March 2013, 11:28 GMT
Last edited by Anatol Pomozov (anatolik) - Thursday, 20 November 2014, 06:18 GMT
Opened by Peter Wu (Lekensteyn) - Saturday, 30 March 2013, 11:28 GMT
Last edited by Anatol Pomozov (anatolik) - Thursday, 20 November 2014, 06:18 GMT
|
Details
The last vim upgrade 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@vim.org> 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. This is probably an upstream bug, but I am not comfortable with subscribing to their mailing list just to post this single patch. |
This task depends upon
Closed by Anatol Pomozov (anatolik)
Thursday, 20 November 2014, 06:18 GMT
Reason for closing: Upstream
Additional comments about closing: upstream bug says it is fixed
Thursday, 20 November 2014, 06:18 GMT
Reason for closing: Upstream
Additional comments about closing: upstream bug says it is fixed
I would like this to get submitted upstream.
Thanks, I forgot about that possibility.