path: root/contrib/vim
diff options
authorChris Larson <clarson@kergoth.com>2004-12-08 06:27:44 +0000
committerChris Larson <clarson@kergoth.com>2004-12-08 06:27:44 +0000
commit7d63e5d1cd326c40df4254d3533217f2f39b87bd (patch)
tree1a3f0100e2945480eb30e3c8f8b433703c4e2c08 /contrib/vim
parentf1ef83662b095987915b54a9fe7c7b1582cc0f2f (diff)
Vim syntax update: highlight the shell functions as shell.
Diffstat (limited to 'contrib/vim')
1 files changed, 17 insertions, 1 deletions
diff --git a/contrib/vim/syntax/bb.vim b/contrib/vim/syntax/bb.vim
index 850ab8d1..041561cc 100644
--- a/contrib/vim/syntax/bb.vim
+++ b/contrib/vim/syntax/bb.vim
@@ -54,13 +54,27 @@ syn match bbVarValue ".*$" contained contains=bbString
" BitBake python metadata
syn include @python syntax/python.vim
+if exists("b:current_syntax")
+ unlet b:current_syntax
syn keyword bbPythonFlag python contained nextgroup=bbFunction
syn match bbPythonFuncDef "^\(python\s\+\w\+\s*()\s*\)\({\)\@=" contains=bbPythonFlag,bbFunction,bbDelimiter nextgroup=bbPythonFuncRegion
syn region bbPythonFuncRegion matchgroup=bbDelimiter start="{" end="^}$" keepend contained contains=@python
"hi def link bbPythonFuncRegion Comment
-hi def link bbPythonFlag Type
+" BitBake shell metadata
+syn include @shell syntax/sh.vim
+if exists("b:current_syntax")
+ unlet b:current_syntax
+syn match bbShellFuncDef "^\(\w\+\)\(python\)\@<!\(\s*()\s*\)\({\)\@=" contains=bbFunction,bbDelimiter nextgroup=bbShellFuncRegion
+syn region bbShellFuncRegion matchgroup=bbDelimiter start="{" end="^}$" keepend contained contains=@shell
+"hi def link bbShellFuncRegion Comment
+hi def link bbPythonFlag Type
hi def link bbStatement Statement
hi def link bbString String
hi def link bbTodo Todo
@@ -72,3 +86,5 @@ hi def link bbDelimiter Delimiter
hi def link bbIdentifier Identifier
hi def link bbQuote Statement
hi def link bbVarEq Operator
+let b:current_syntax = "bb"