summaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorChris Larson <clarson@kergoth.com>2006-07-10 19:22:06 +0000
committerChris Larson <clarson@kergoth.com>2006-07-10 19:22:06 +0000
commit345c08effd86188cfd12af686153feebdca664ca (patch)
tree3f3c77e1c959294378f61be4abdf3e782dcd9bf6 /contrib
parent628e7791d754ad68b810f275bb346e3c04949026 (diff)
downloadbitbake-345c08effd86188cfd12af686153feebdca664ca.tar.gz
Contrib: update the Vim syntax highlighting to include the 'require' keyword and '.=' and '=.'. Add a Vim ftdetect plugin to properly set the filetype on bitbake files.
Diffstat (limited to 'contrib')
-rw-r--r--contrib/vim/ftdetect/bitbake.vim4
-rw-r--r--contrib/vim/syntax/bitbake.vim8
2 files changed, 8 insertions, 4 deletions
diff --git a/contrib/vim/ftdetect/bitbake.vim b/contrib/vim/ftdetect/bitbake.vim
new file mode 100644
index 000000000..3882a9a08
--- /dev/null
+++ b/contrib/vim/ftdetect/bitbake.vim
@@ -0,0 +1,4 @@
+au BufNewFile,BufRead *.bb setfiletype bitbake
+au BufNewFile,BufRead *.bbclass setfiletype bitbake
+au BufNewFile,BufRead *.inc setfiletype bitbake
+" au BufNewFile,BufRead *.conf setfiletype bitbake
diff --git a/contrib/vim/syntax/bitbake.vim b/contrib/vim/syntax/bitbake.vim
index 5d2bc633e..43a1990b0 100644
--- a/contrib/vim/syntax/bitbake.vim
+++ b/contrib/vim/syntax/bitbake.vim
@@ -42,11 +42,11 @@ syn region bbString matchgroup=bbQuote start=/'/ skip=/\\$/ excludenl end=/'/ c
syn keyword bbExportFlag export contained nextgroup=bbIdentifier skipwhite
syn match bbVarDeref "${[a-zA-Z0-9\-_\.]\+}" contained
-syn match bbVarDef "^\(export\s*\)\?\([a-zA-Z0-9\-_\.]\+\(_[${}a-zA-Z0-9\-_\.]\+\)\?\)\s*\(\(:=\)\|\(+=\)\|\(=+\)\|\(?=\)\|=\)\@=" contains=bbExportFlag,bbIdentifier,bbVarDeref nextgroup=bbVarEq
+syn match bbVarDef "^\(export\s*\)\?\([a-zA-Z0-9\-_\.]\+\(_[${}a-zA-Z0-9\-_\.]\+\)\?\)\s*\(:=\|+=\|=+\|\.=\|=\.\|?=\|=\)\@=" contains=bbExportFlag,bbIdentifier,bbVarDeref nextgroup=bbVarEq
syn match bbIdentifier "[a-zA-Z0-9\-_\.]\+" display contained
"syn keyword bbVarEq = display contained nextgroup=bbVarValue
-syn match bbVarEq "\(:=\)\|\(+=\)\|\(=+\)\|\(?=\)\|=" contained nextgroup=bbVarValue
+syn match bbVarEq "\(:=\|+=\|=+\|\.=\|=\.\|?=\|=\)" contained nextgroup=bbVarValue
syn match bbVarValue ".*$" contained contains=bbString,bbVarDeref
@@ -90,8 +90,8 @@ syn region bbDefRegion start='^def\s\+\w\+\s*([^)]*)\s*:\s*$' end='^\(\s\|$\)\@
" BitBake statements
-syn keyword bbStatement include inherit addtask addhandler EXPORT_FUNCTIONS display contained
-syn match bbStatementLine "^\(include\|inherit\|addtask\|addhandler\|EXPORT_FUNCTIONS\)\s\+" contains=bbStatement nextgroup=bbStatementRest
+syn keyword bbStatement include inherit require addtask addhandler EXPORT_FUNCTIONS display contained
+syn match bbStatementLine "^\(include\|inherit\|require\|addtask\|addhandler\|EXPORT_FUNCTIONS\)\s\+" contains=bbStatement nextgroup=bbStatementRest
syn match bbStatementRest ".*$" contained contains=bbString,bbVarDeref
" Highlight