From 29fc51319cb1449f8b1ef809e520eef3a5ed8b32 Mon Sep 17 00:00:00 2001 From: Chris Laplante via bitbake-devel Date: Thu, 17 Oct 2019 12:36:54 -0400 Subject: bitbake: contrib/vim: handle shell indenting Signed-off-by: Chris Laplante Signed-off-by: Richard Purdie --- bitbake/bitbake/contrib/vim/indent/bitbake.vim | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/bitbake/bitbake/contrib/vim/indent/bitbake.vim b/bitbake/bitbake/contrib/vim/indent/bitbake.vim index 1d0a6e82d3..1d99395985 100644 --- a/bitbake/bitbake/contrib/vim/indent/bitbake.vim +++ b/bitbake/bitbake/contrib/vim/indent/bitbake.vim @@ -319,6 +319,18 @@ function BitbakeIndent(lnum) return ret endif + " TODO: GetShIndent doesn't detect tasks prepended with 'fakeroot' + " Need to submit a patch upstream to Vim to provide an extension point. + " Unlike the Python indenter, the Sh indenter is way too large to copy and + " modify here. + if name == "bbShFuncRegion" + return GetShIndent() + endif + + " TODO: + " + heuristics for de-denting out of a bbPyDefRegion? e.g. when the user + " types an obvious BB keyword like addhandler or addtask, or starts + " writing a shell task. Maybe too hard to implement... + return -1 - "return s:pythonIndentExpr() endfunction -- cgit v1.2.3-54-g00ecf