Sunday, July 31, 2011

Re: sh vs bash syntax coloring

ranousse@gmx.com wrote the following on 31.07.2011 12:42

Hello

> 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
>


,----[ :h ft-sh-syntax ]----------------------

< bash: >
let g:is_bash = 1
`---------------------------------------------


--
bye Thilo

4096R/0xC70B1A8F
721B 1BA0 095C 1ABA 3FC6 7C18 89A4 A2A0 C70B 1A8F


--
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: