path: root/contrib/vim
diff options
authorChris Larson <clarson@kergoth.com>2004-12-08 06:56:41 +0000
committerChris Larson <clarson@kergoth.com>2004-12-08 06:56:41 +0000
commit34c541795eec36ad56733fd79e5de4871fda525e (patch)
tree4427ba6e212f899411dd7f498ae46c51d82a25c8 /contrib/vim
parent638ccde60d053fd43ac443b568760e57a75d6c5d (diff)
Vim syntax update: highlight definitions of variable flags.
Diffstat (limited to 'contrib/vim')
1 files changed, 12 insertions, 0 deletions
diff --git a/contrib/vim/syntax/bb.vim b/contrib/vim/syntax/bb.vim
index f80eb8b6..d74a6ab5 100644
--- a/contrib/vim/syntax/bb.vim
+++ b/contrib/vim/syntax/bb.vim
@@ -50,9 +50,17 @@ syn match bbIdentifier "[a-zA-Z0-9\-_]\+" display contained
syn match bbVarEq "=" contained contains=bbOperator nextgroup=bbVarValue
syn match bbVarValue ".*$" contained contains=bbString
+" BitBake variable metadata flags
+syn match bbVarFlagDef "^\([a-zA-Z0-9\-_]\+\)\(\[[a-zA-Z0-9\-_]\+\]\)\@=" contains=bbIdentifier nextgroup=bbVarFlagFlag
+syn region bbVarFlagFlag matchgroup=bbArrayBrackets start="\[" end="\]\s*\(=\)\@=" keepend excludenl contained contains=bbIdentifier nextgroup=bbVarEq
+"syn match bbVarFlagFlag "\[\([a-zA-Z0-9\-_]\+\)\]\s*\(=\)\@=" contains=bbIdentifier nextgroup=bbVarEq
" Functions!
syn match bbFunction "\h\w*" display contained
" BitBake python metadata
syn include @python syntax/python.vim
if exists("b:current_syntax")
@@ -64,6 +72,7 @@ syn match bbPythonFuncDef "^\(python\s\+\w\+\s*()\s*\)\({\)\@=" contains=bbPytho
syn region bbPythonFuncRegion matchgroup=bbDelimiter start="{" end="^}$" keepend contained contains=@python
"hi def link bbPythonFuncRegion Comment
" BitBake shell metadata
syn include @shell syntax/sh.vim
if exists("b:current_syntax")
@@ -87,6 +96,9 @@ syn region bbDefRegion start=":$" end='^$' end='^\(\s\)\@!' contained contains=
" BitBake statements
syn keyword bbStatement include inherit addtask addhandler
+syn match bbArrayBrackets "[\[\]]" contained
+hi def link bbArrayBrackets Statement
hi def link bbDef Statement
hi def link bbPythonFlag Type
hi def link bbStatement Statement