diff options
author | Joshua Watt <JPEWhacker@gmail.com> | 2023-07-28 09:59:31 -0600 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-07-29 13:26:16 +0100 |
commit | b7109acb96e416e3c537b6b51f7c1fec2ca89371 (patch) | |
tree | 8d9c7a40d40d77a05312b5d1c31d4bee945015f4 /contrib | |
parent | 5e45b8eab60d651c98a950533043a4c96b9c8b01 (diff) | |
download | bitbake-b7109acb96e416e3c537b6b51f7c1fec2ca89371.tar.gz |
contrib: vim: Fix up a few errors when reloading
Fixes a few errors when the bitbake indent plugin is reloaded:
1) Define functions with "!" so that vim doens't issue a warning when
they are replaced
2) Rename GetPythonIndent -> GetBBPythonIndent to prevent potential
conflict with other plugins
Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/vim/indent/bitbake.vim | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/contrib/vim/indent/bitbake.vim b/contrib/vim/indent/bitbake.vim index 138103409..7ee9d6993 100644 --- a/contrib/vim/indent/bitbake.vim +++ b/contrib/vim/indent/bitbake.vim @@ -40,7 +40,7 @@ set cpo&vim let s:maxoff = 50 " maximum number of lines to look backwards for () -function GetPythonIndent(lnum) +function! GetBBPythonIndent(lnum) " If this line is explicitly joined: If the previous line was also joined, " line it up with that one, otherwise add two 'shiftwidth' @@ -257,7 +257,7 @@ let b:did_indent = 1 setlocal indentkeys+=0\" -function BitbakeIndent(lnum) +function! BitbakeIndent(lnum) if !has('syntax_items') return -1 endif @@ -315,7 +315,7 @@ function BitbakeIndent(lnum) endif if index(["bbPyDefRegion", "bbPyFuncRegion"], name) != -1 - let ret = GetPythonIndent(a:lnum) + let ret = GetBBPythonIndent(a:lnum) " Should normally always be indented by at least one shiftwidth; but allow " return of -1 (defer to autoindent) or -2 (force indent to 0) if ret == 0 |