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 here
It 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 Linux
- Vim 7.4 (2013 Aug 10, compiled Apr 29 2016 11:28:12); Included patches: 1-1797
- sh.vim version 147, but I also tried version 151
I'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.vim
And :set filetype?
shows filetype=sh
.
Vim 7.4 (2013 Aug 10, compiled Apr 29 2016 11:28:12); Included patches: 1-1797
on Arch Linux. I'm usingsh.vim
version 147, but I tried the very latest and still have this problem.