summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorChris Laplante via bitbake-devel <bitbake-devel@lists.openembedded.org>2019-10-17 12:36:52 -0400
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-11-07 19:43:02 +0000
commitf45aa165f2dac3d1bf5a043c2351c9db61af3988 (patch)
treeaf8408d9c0f0aa7d1a4b80b77b256895903a3b18 /bitbake
parent3bf0f446649c3dd413029bc777906ea56448290e (diff)
downloadpoky-f45aa165f2dac3d1bf5a043c2351c9db61af3988.tar.gz
bitbake: contrib/vim: renaming & comments
Signed-off-by: Chris Laplante <chris.laplante@agilent.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/bitbake/contrib/vim/indent/bitbake.vim7
1 files changed, 4 insertions, 3 deletions
diff --git a/bitbake/bitbake/contrib/vim/indent/bitbake.vim b/bitbake/bitbake/contrib/vim/indent/bitbake.vim
index fc428a2074..76f84e5c23 100644
--- a/bitbake/bitbake/contrib/vim/indent/bitbake.vim
+++ b/bitbake/bitbake/contrib/vim/indent/bitbake.vim
@@ -12,7 +12,7 @@ unlet b:did_indent
12setlocal indentexpr=BitbakeIndent(v:lnum) 12setlocal indentexpr=BitbakeIndent(v:lnum)
13setlocal autoindent nolisp 13setlocal autoindent nolisp
14 14
15function s:is_python_func_def(lnum) 15function s:is_bb_python_func_def(lnum)
16 let stack = synstack(a:lnum, 1) 16 let stack = synstack(a:lnum, 1)
17 if len(stack) == 0 17 if len(stack) == 0
18 return 0 18 return 0
@@ -85,7 +85,7 @@ function GetPythonIndent(lnum)
85 if parlnum > 0 85 if parlnum > 0
86 " We may have found the opening brace of a BitBake Python task, e.g. 'python do_task {' 86 " We may have found the opening brace of a BitBake Python task, e.g. 'python do_task {'
87 " If so, ignore it here - it will be handled later. 87 " If so, ignore it here - it will be handled later.
88 if s:is_python_func_def(parlnum) 88 if s:is_bb_python_func_def(parlnum)
89 let parlnum = 0 89 let parlnum = 0
90 let plindent = indent(plnum) 90 let plindent = indent(plnum)
91 let plnumstart = plnum 91 let plnumstart = plnum
@@ -180,6 +180,7 @@ function GetPythonIndent(lnum)
180 endif 180 endif
181 181
182 " If the previous line was a stop-execution statement... 182 " If the previous line was a stop-execution statement...
183 " TODO: utilize this logic to deindent when ending a bbPyDefRegion
183 if getline(plnum) =~ '^\s*\(break\|continue\|raise\|return\|pass\|bb\.fatal\)\>' 184 if getline(plnum) =~ '^\s*\(break\|continue\|raise\|return\|pass\|bb\.fatal\)\>'
184 " See if the user has already dedented 185 " See if the user has already dedented
185 if indent(a:lnum) > indent(plnum) - shiftwidth() 186 if indent(a:lnum) > indent(plnum) - shiftwidth()
@@ -258,7 +259,7 @@ function BitbakeIndent(lnum)
258 259
259 if index(["bbPyDefRegion", "bbPyFuncRegion"], name) != -1 260 if index(["bbPyDefRegion", "bbPyFuncRegion"], name) != -1
260 let ret = GetPythonIndent(a:lnum) 261 let ret = GetPythonIndent(a:lnum)
261 " Should always be indented by at least one shiftwidth; but allow 262 " Should normally always be indented by at least one shiftwidth; but allow
262 " return of -1 (defer to autoindent) or -2 (force indent to 0) 263 " return of -1 (defer to autoindent) or -2 (force indent to 0)
263 if ret == 0 264 if ret == 0
264 return shiftwidth() 265 return shiftwidth()