I'm having some issue with the default Dr. Chip sh.vim highlighter. Specifically, it's failing to recognise the comment character # after a touch command. e.g.touch foo # it's hereIt doesn't see the #, and hence the ' is parsed, marking all lines after this a quoted string.In @akshay's case, highlighting works as expected. I'm using the following:Arch LinuxVim 7.4 (2013 Aug 10, compiled Apr 29 2016 11:28:12); Included patches: 1-1797sh.vim version 147, but I also tried version 151I've also tested without plugins or vimrc activated (vim -u NONE /tmp/test.sh), but this also fails.In this case, :scriptnames produces the following:  1: /usr/share/vim/vim74/syntax/syntax.vim  2: /usr/share/vim/vim74/syntax/synload.vim  3: /usr/share/vim/vim74/syntax/syncolor.vim  4: /usr/share/vim/vim74/filetype.vim  5: /usr/share/vim/vimfiles/ftdetect/csv.vim  6: /usr/share/vim/vimfiles/ftdetect/r.vim  7: /usr/share/vim/vim74/syntax/sh.vimAnd :set filetype? shows filetype=sh.
How can I fix the default bash syntax highlighter?
syntax highlighting
I contacted Charles E Campbell (aka Dr Chip), the maintainer of default sh.vim highlighter. He responded very quickly with a new version 152 that fixes this problem for me. I'm still not sure why this problem only affected me and not @akshay though.