[oe-commits] [bitbake] 08/13: bitbake: contrib/vim: handle shell indenting

git at git.openembedded.org git at git.openembedded.org
Wed Oct 23 22:00:12 UTC 2019


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository bitbake.

commit bfc8547b92fe90f53137068daeb91ade847218d3
Author: Chris Laplante via bitbake-devel <bitbake-devel at lists.openembedded.org>
AuthorDate: Thu Oct 17 12:36:54 2019 -0400

    bitbake: contrib/vim: handle shell indenting
    
    Signed-off-by: Chris Laplante <chris.laplante at agilent.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 bitbake/contrib/vim/indent/bitbake.vim | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/bitbake/contrib/vim/indent/bitbake.vim b/bitbake/contrib/vim/indent/bitbake.vim
index 1d0a6e8..1d99395 100644
--- a/bitbake/contrib/vim/indent/bitbake.vim
+++ b/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

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list