In bash (as can be seen with "help :" without the quotes at the bash
prompt) : is a do-nothing command. So it can be regarded as legitimate
to treat it as a comment. Actually, in the current
$VIMRUNTIME/syntax/sh.vim (version 118 dated Aug 16, 2011 and applying
to all three of sh, bash and ksh) these "colon lines" are set to syntax
group shColon at line 287, then at line 536 the shColon highlight group
is linked to shComment which is in turn linked to Comment at line 612.
So a colorscheme could highlight colon lines as something else than a
comment by changing the highlight for the shColon highlight group.
AFAICT from reading :help ft-bash-syntax there is no setting to change
those default highlights. However the fact that the sh syntax script
makes no provision for quoted strings extending on more than one line
can be regarded as a bug (or as a limitation). I'm CC-ing Charles "Dr.
Chip" Campbell, the current maintainer of that script.
Best regards,
Tony.
--
hundred-and-one symptoms of being an internet addict:
203. You're an active member of more than 20 newsgroups.
> In bash (as can be seen with "help :" without the quotes at the bash
> prompt) : is a do-nothing command. So it can be regarded as
> legitimate to treat it as a comment.
While it is true that the : command does nothing, its arguments are
still expanded, redirections are performed, and it sets the exit
code to 0, so it is not true that it can be regarded as a comment
line.
As a practical example, this command tests USER and if it is unset
or empty, sets it to the output of whoami.
: ${USER:=`whoami`}
Regards,
Gary