From d967f3b73138d118b48805dd5e2fbb592a07c990 Mon Sep 17 00:00:00 2001 From: Chris Larson Date: Mon, 10 Jan 2011 12:00:41 -0700 Subject: vim: properly highlight python inside of ${@} (Bitbake rev: 4210eb0b783bf9bbdf80b6c6806f66f3e6ec1e77) Signed-off-by: Chris Larson Signed-off-by: Richard Purdie --- bitbake/contrib/vim/syntax/bitbake.vim | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'bitbake/contrib') diff --git a/bitbake/contrib/vim/syntax/bitbake.vim b/bitbake/contrib/vim/syntax/bitbake.vim index bcabf5c448..a06dd9e0ac 100644 --- a/bitbake/contrib/vim/syntax/bitbake.vim +++ b/bitbake/contrib/vim/syntax/bitbake.vim @@ -19,6 +19,11 @@ if exists("b:current_syntax") finish endif +syn include @python syntax/python.vim +if exists("b:current_syntax") + unlet b:current_syntax +endif + " BitBake syntax " Matching case @@ -39,8 +44,8 @@ syn match bbArrayBrackets "[\[\]]" contained " BitBake strings syn match bbContinue "\\$" -syn region bbString matchgroup=bbQuote start=+"+ skip=+\\$+ excludenl end=+"+ contained keepend contains=bbTodo,bbContinue,bbVarDeref,@Spell -syn region bbString matchgroup=bbQuote start=+'+ skip=+\\$+ excludenl end=+'+ contained keepend contains=bbTodo,bbContinue,bbVarDeref,@Spell +syn region bbString matchgroup=bbQuote start=+"+ skip=+\\$+ excludenl end=+"+ contained keepend contains=bbTodo,bbContinue,bbVarDeref,bbVarPyValue,@Spell +syn region bbString matchgroup=bbQuote start=+'+ skip=+\\$+ excludenl end=+'+ contained keepend contains=bbTodo,bbContinue,bbVarDeref,bbVarPyValue,@Spell " Vars definition syn match bbExport "^export" nextgroup=bbIdentifier skipwhite @@ -50,7 +55,7 @@ syn match bbVarDeref "${[a-zA-Z0-9\-_\.\/\+]\+}" contained syn match bbVarEq "\(:=\|+=\|=+\|\.=\|=\.\|?=\|=\)" contained nextgroup=bbVarValue syn match bbVarDef "^\(export\s*\)\?\([a-zA-Z0-9\-_\.\/\+]\+\(_[${}a-zA-Z0-9\-_\.\/\+]\+\)\?\)\s*\(:=\|+=\|=+\|\.=\|=\.\|?=\|=\)\@=" contains=bbExportFlag,bbIdentifier,bbVarDeref nextgroup=bbVarEq syn match bbVarValue ".*$" contained contains=bbString,bbVarDeref,bbVarPyValue -syn match bbVarPyValue "${@[a-zA-Z0-9\-_\.\(\)]\+}" contained +syn region bbVarPyValue start=+${@+ skip=+\\$+ excludenl end=+}+ contained contains=@python " Vars metadata flags syn match bbVarFlagDef "^\([a-zA-Z0-9\-_\.]\+\)\(\[[a-zA-Z0-9\-_\.]\+\]\)\@=" contains=bbIdentifier nextgroup=bbVarFlagFlag @@ -78,14 +83,10 @@ if exists("b:current_syntax") unlet b:current_syntax endif syn keyword bbShFakeRootFlag fakeroot contained -syn match bbShFuncDef "^\(fakeroot\s*\)\?\([0-9A-Za-z_}${-]\+\)\(python\)\@