diff options
Diffstat (limited to 'bitbake/contrib/vim')
-rw-r--r-- | bitbake/contrib/vim/ftdetect/bitbake.vim | 2 | ||||
-rw-r--r-- | bitbake/contrib/vim/ftplugin/bitbake.vim | 1 | ||||
-rw-r--r-- | bitbake/contrib/vim/syntax/bitbake.vim | 19 |
3 files changed, 13 insertions, 9 deletions
diff --git a/bitbake/contrib/vim/ftdetect/bitbake.vim b/bitbake/contrib/vim/ftdetect/bitbake.vim index b9529e669a..200f8ae49b 100644 --- a/bitbake/contrib/vim/ftdetect/bitbake.vim +++ b/bitbake/contrib/vim/ftdetect/bitbake.vim | |||
@@ -14,7 +14,7 @@ endif | |||
14 | au BufNewFile,BufRead *.{bb,bbappend,bbclass} set filetype=bitbake | 14 | au BufNewFile,BufRead *.{bb,bbappend,bbclass} set filetype=bitbake |
15 | 15 | ||
16 | " .inc | 16 | " .inc |
17 | au BufNewFile,BufRead *.inc set filetype=bitbake | 17 | au BufNewFile,BufRead *.inc set filetype=bitbake |
18 | 18 | ||
19 | " .conf | 19 | " .conf |
20 | au BufNewFile,BufRead *.conf | 20 | au BufNewFile,BufRead *.conf |
diff --git a/bitbake/contrib/vim/ftplugin/bitbake.vim b/bitbake/contrib/vim/ftplugin/bitbake.vim index ed69d3b1b0..db0d75319a 100644 --- a/bitbake/contrib/vim/ftplugin/bitbake.vim +++ b/bitbake/contrib/vim/ftplugin/bitbake.vim | |||
@@ -1 +1,2 @@ | |||
1 | set sts=4 sw=4 et | 1 | set sts=4 sw=4 et |
2 | set cms=#%s | ||
diff --git a/bitbake/contrib/vim/syntax/bitbake.vim b/bitbake/contrib/vim/syntax/bitbake.vim index 336e6bb15a..fb55f91022 100644 --- a/bitbake/contrib/vim/syntax/bitbake.vim +++ b/bitbake/contrib/vim/syntax/bitbake.vim | |||
@@ -44,8 +44,8 @@ syn match bbArrayBrackets "[\[\]]" contained | |||
44 | 44 | ||
45 | " BitBake strings | 45 | " BitBake strings |
46 | syn match bbContinue "\\$" | 46 | syn match bbContinue "\\$" |
47 | syn region bbString matchgroup=bbQuote start=+"+ skip=+\\$+ excludenl end=+"+ contained keepend contains=bbTodo,bbContinue,bbVarDeref,bbVarPyValue,@Spell | 47 | syn region bbString matchgroup=bbQuote start=+"+ skip=+\\$+ end=+"+ contained contains=bbTodo,bbContinue,bbVarDeref,bbVarPyValue,@Spell |
48 | syn region bbString matchgroup=bbQuote start=+'+ skip=+\\$+ excludenl end=+'+ contained keepend contains=bbTodo,bbContinue,bbVarDeref,bbVarPyValue,@Spell | 48 | syn region bbString matchgroup=bbQuote start=+'+ skip=+\\$+ end=+'+ contained contains=bbTodo,bbContinue,bbVarDeref,bbVarPyValue,@Spell |
49 | 49 | ||
50 | " Vars definition | 50 | " Vars definition |
51 | syn match bbExport "^export" nextgroup=bbIdentifier skipwhite | 51 | syn match bbExport "^export" nextgroup=bbIdentifier skipwhite |
@@ -55,11 +55,11 @@ syn match bbVarDeref "${[a-zA-Z0-9\-_\.\/\+]\+}" contained | |||
55 | syn match bbVarEq "\(:=\|+=\|=+\|\.=\|=\.\|?=\|??=\|=\)" contained nextgroup=bbVarValue | 55 | syn match bbVarEq "\(:=\|+=\|=+\|\.=\|=\.\|?=\|??=\|=\)" contained nextgroup=bbVarValue |
56 | syn match bbVarDef "^\(export\s*\)\?\([a-zA-Z0-9\-_\.\/\+]\+\(_[${}a-zA-Z0-9\-_\.\/\+]\+\)\?\)\s*\(:=\|+=\|=+\|\.=\|=\.\|?=\|??=\|=\)\@=" contains=bbExportFlag,bbIdentifier,bbVarDeref nextgroup=bbVarEq | 56 | syn match bbVarDef "^\(export\s*\)\?\([a-zA-Z0-9\-_\.\/\+]\+\(_[${}a-zA-Z0-9\-_\.\/\+]\+\)\?\)\s*\(:=\|+=\|=+\|\.=\|=\.\|?=\|??=\|=\)\@=" contains=bbExportFlag,bbIdentifier,bbVarDeref nextgroup=bbVarEq |
57 | syn match bbVarValue ".*$" contained contains=bbString,bbVarDeref,bbVarPyValue | 57 | syn match bbVarValue ".*$" contained contains=bbString,bbVarDeref,bbVarPyValue |
58 | syn region bbVarPyValue start=+${@+ skip=+\\$+ excludenl end=+}+ contained contains=@python | 58 | syn region bbVarPyValue start=+${@+ skip=+\\$+ end=+}+ contained contains=@python |
59 | 59 | ||
60 | " Vars metadata flags | 60 | " Vars metadata flags |
61 | syn match bbVarFlagDef "^\([a-zA-Z0-9\-_\.]\+\)\(\[[a-zA-Z0-9\-_\.]\+\]\)\@=" contains=bbIdentifier nextgroup=bbVarFlagFlag | 61 | syn match bbVarFlagDef "^\([a-zA-Z0-9\-_\.]\+\)\(\[[a-zA-Z0-9\-_\.]\+\]\)\@=" contains=bbIdentifier nextgroup=bbVarFlagFlag |
62 | syn region bbVarFlagFlag matchgroup=bbArrayBrackets start="\[" end="\]\s*\(=\)\@=" keepend excludenl contained contains=bbIdentifier nextgroup=bbVarEq | 62 | syn region bbVarFlagFlag matchgroup=bbArrayBrackets start="\[" end="\]\s*\(=\|+=\|=+\|?=\)\@=" contained contains=bbIdentifier nextgroup=bbVarEq |
63 | 63 | ||
64 | " Includes and requires | 64 | " Includes and requires |
65 | syn keyword bbInclude inherit include require contained | 65 | syn keyword bbInclude inherit include require contained |
@@ -83,13 +83,16 @@ if exists("b:current_syntax") | |||
83 | unlet b:current_syntax | 83 | unlet b:current_syntax |
84 | endif | 84 | endif |
85 | syn keyword bbShFakeRootFlag fakeroot contained | 85 | syn keyword bbShFakeRootFlag fakeroot contained |
86 | syn match bbShFuncDef "^\(fakeroot\s*\)\?\([0-9A-Za-z_-]\+\)\(python\)\@<!\(\s*()\s*\)\({\)\@=" contains=bbShFakeRootFlag,bbFunction,bbDelimiter nextgroup=bbShFuncRegion skipwhite | 86 | syn match bbShFuncDef "^\(fakeroot\s*\)\?\([0-9A-Za-z_${}-]\+\)\(python\)\@<!\(\s*()\s*\)\({\)\@=" contains=bbShFakeRootFlag,bbFunction,bbVarDeref,bbDelimiter nextgroup=bbShFuncRegion skipwhite |
87 | syn region bbShFuncRegion matchgroup=bbDelimiter start="{\s*$" end="^}\s*$" keepend contained contains=@shell | 87 | syn region bbShFuncRegion matchgroup=bbDelimiter start="{\s*$" end="^}\s*$" contained contains=@shell |
88 | |||
89 | " Python value inside shell functions | ||
90 | syn region shDeref start=+${@+ skip=+\\$+ excludenl end=+}+ contained contains=@python | ||
88 | 91 | ||
89 | " BitBake python metadata | 92 | " BitBake python metadata |
90 | syn keyword bbPyFlag python contained | 93 | syn keyword bbPyFlag python contained |
91 | syn match bbPyFuncDef "^\(python\s\+\)\([0-9A-Za-z_-]\+\)\?\(\s*()\s*\)\({\)\@=" contains=bbPyFlag,bbFunction,bbDelimiter nextgroup=bbPyFuncRegion skipwhite | 94 | syn match bbPyFuncDef "^\(python\s\+\)\([0-9A-Za-z_${}-]\+\)\?\(\s*()\s*\)\({\)\@=" contains=bbPyFlag,bbFunction,bbVarDeref,bbDelimiter nextgroup=bbPyFuncRegion skipwhite |
92 | syn region bbPyFuncRegion matchgroup=bbDelimiter start="{\s*$" end="^}\s*$" keepend contained contains=@python | 95 | syn region bbPyFuncRegion matchgroup=bbDelimiter start="{\s*$" end="^}\s*$" contained contains=@python |
93 | 96 | ||
94 | " BitBake 'def'd python functions | 97 | " BitBake 'def'd python functions |
95 | syn keyword bbPyDef def contained | 98 | syn keyword bbPyDef def contained |