vim: Why does the sh colour scheme highlight `$(...)` as an error?
For example:
I was under the impression开发者_StackOverflow中文版 that $(...)
was recommended over ``
because it's easier to nest.
Because your .vimrc file does not contain
let g:is_posix = 1
See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=552108
You are correct that $( )
is recommended over backticks as the latter has been depreciated. You're also correct that $( )
is POSIX shell. However, to the best of my knowledge, $( )
was added to the POSIX spec in 2004 and assuming you have the latest version of vim
, it is quite likely that the sh.vim
syntax highlight file has not been updated to reflect this change in the POSIX shell standard.
精彩评论