Thursday, August 25, 2011

Re: Syntax errors in shell scripts

On Thu, Aug 25, 2011 at 10:18:13AM +0200, Bastien Dejean wrote:
> Hi,
>
> Any idea why, in the following expression:
>
> ${UZBL_URI#*://}
>
> the '#*://' part gets highlighted as shDerefWordError?

Because, by default, vim uses the sh syntax file.

To use the bash syntax file by default, add the following line to your
.vimrc file:

let g:is_bash=1

Check also :help ft-bash-syntax

--
Javier Rojas

GPG Key ID: 0x24E00D68

No comments: