Sunday, July 31, 2011

sh vs bash syntax coloring

I'm not very happy with syntax coloring of sh scripts (starting with
#!/bin/sh). For example, things like
$(command), $((n+1)) or ${var%.txt} are very badly displayed.
However they are part of POSIX sh I think.

Do you know a simple hack to correct this. Something that could interest
me would be always using bash syntax coloring even with
#!/bin/sh
at the beginning.

I thought of modelines but vim seems to use the same syntax file for sh
and bash and thus I cannot use something like
# vi: syntax=bash
or
# vi: ft=bash

--
You received this message from the "vim_use" 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

No comments:

Post a Comment