__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
" Support for bitbake indenting, see runtime/indent/bitbake.vim
function s:is_bb_python_func_def(lnum)
let stack = synstack(a:lnum, 1)
if len(stack) == 0
return 0
endif
return synIDattr(stack[0], "name") == "bbPyFuncDef"
endfunction
function bitbake#Indent(lnum)
if !has('syntax_items')
return -1
endif
let stack = synstack(a:lnum, 1)
if len(stack) == 0
return -1
endif
let name = synIDattr(stack[0], "name")
" TODO: support different styles of indentation for assignments. For now,
" we only support like this:
" VAR = " \
" value1 \
" value2 \
" "
"
" i.e. each value indented by shiftwidth(), with the final quote " completely unindented.
if name == "bbVarValue"
" Quote handling is tricky. kernel.bbclass has this line for instance:
" EXTRA_OEMAKE = " HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" " HOSTCPP="${BUILD_CPP}""
" Instead of trying to handle crazy cases like that, just assume that a
" double-quote on a line by itself (following an assignment) means the
" user is closing the assignment, and de-dent.
if getline(a:lnum) =~ '^\s*"$'
return 0
endif
let prevstack = synstack(a:lnum - 1, 1)
if len(prevstack) == 0
return -1
endif
let prevname = synIDattr(prevstack[0], "name")
" Only indent if there was actually a continuation character on
" the previous line, to avoid misleading indentation.
let prevlinelastchar = synIDattr(synID(a:lnum - 1, col([a:lnum - 1, "$"]) - 1, 1), "name")
let prev_continued = prevlinelastchar == "bbContinue"
" Did the previous line introduce an assignment?
if index(["bbVarDef", "bbVarFlagDef"], prevname) != -1
if prev_continued
return shiftwidth()
endif
endif
if !prev_continued
return 0
endif
" Autoindent can take it from here
return -1
endif
if index(["bbPyDefRegion", "bbPyFuncRegion"], name) != -1
let ret = python#GetIndent(a:lnum, function('s:is_bb_python_func_def'))
" 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
return shiftwidth()
elseif ret == -2
return 0
endif
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
endfunction
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| dist | Folder | 0755 |
|
|
| xml | Folder | 0755 |
|
|
| zig | Folder | 0755 |
|
|
| RstFold.vim | File | 1.86 KB | 0644 |
|
| ada.vim | File | 22.04 KB | 0644 |
|
| adacomplete.vim | File | 3.58 KB | 0644 |
|
| bitbake.vim | File | 3.02 KB | 0644 |
|
| cargo.vim | File | 3.96 KB | 0644 |
|
| ccomplete.vim | File | 19.38 KB | 0644 |
|
| clojurecomplete.vim | File | 8.66 KB | 0644 |
|
| context.vim | File | 2.46 KB | 0644 |
|
| contextcomplete.vim | File | 656 B | 0644 |
|
| csscomplete.vim | File | 42.24 KB | 0644 |
|
| decada.vim | File | 2.93 KB | 0644 |
|
| freebasic.vim | File | 1.02 KB | 0644 |
|
| getscript.vim | File | 24.29 KB | 0644 |
|
| gnat.vim | File | 5.21 KB | 0644 |
|
| gzip.vim | File | 6.55 KB | 0644 |
|
| haskellcomplete.vim | File | 103.31 KB | 0644 |
|
| htmlcomplete.vim | File | 24.88 KB | 0644 |
|
| javascriptcomplete.vim | File | 27.49 KB | 0644 |
|
| modula2.vim | File | 691 B | 0644 |
|
| netrw.vim | File | 555.72 KB | 0644 |
|
| netrwFileHandlers.vim | File | 9.89 KB | 0644 |
|
| netrwSettings.vim | File | 10.09 KB | 0644 |
|
| netrw_gitignore.vim | File | 1.21 KB | 0644 |
|
| paste.vim | File | 738 B | 0644 |
|
| phpcomplete.vim | File | 346.21 KB | 0644 |
|
| python.vim | File | 7.7 KB | 0644 |
|
| python3complete.vim | File | 21.16 KB | 0644 |
|
| pythoncomplete.vim | File | 21.59 KB | 0644 |
|
| racket.vim | File | 7.29 KB | 0644 |
|
| rubycomplete.vim | File | 25.2 KB | 0644 |
|
| rust.vim | File | 16.58 KB | 0644 |
|
| rustfmt.vim | File | 7.8 KB | 0644 |
|
| spellfile.vim | File | 6.03 KB | 0644 |
|
| sqlcomplete.vim | File | 38.27 KB | 0644 |
|
| syntaxcomplete.vim | File | 32.86 KB | 0644 |
|
| tar.vim | File | 29.22 KB | 0644 |
|
| tohtml.vim | File | 31.68 KB | 0644 |
|
| typeset.vim | File | 5.94 KB | 0644 |
|
| vimball.vim | File | 23.76 KB | 0644 |
|
| xmlcomplete.vim | File | 14.59 KB | 0644 |
|
| xmlformat.vim | File | 6.05 KB | 0644 |
|
| zip.vim | File | 15.23 KB | 0644 |
|