/usr/share/vim/vim82/indent
NameSizeModeActions
aap.vim2650644editdlrm
ada.vim112340644editdlrm
ant.vim2900644editdlrm
automake.vim2430644editdlrm
awk.vim77740644editdlrm
bash.vim3500644editdlrm
bib.vim3460644editdlrm
bst.vim19370644editdlrm
bzl.vim29250644editdlrm
c.vim3250644editdlrm
cdl.vim43420644editdlrm
ch.vim4700644editdlrm
chaiscript.vim11380644editdlrm
changelog.vim2640644editdlrm
clojure.vim115570644editdlrm
cmake.vim26830644editdlrm
cobol.vim88320644editdlrm
config.vim22220644editdlrm
context.vim7520644editdlrm
cpp.vim3290644editdlrm
cs.vim17560644editdlrm
css.vim18130644editdlrm
cucumber.vim26780644editdlrm
cuda.vim3050644editdlrm
d.vim5720644editdlrm
dictconf.vim3370644editdlrm
dictdconf.vim3380644editdlrm
docbk.vim3360644editdlrm
dosbatch.vim13820644editdlrm
dtd.vim119540644editdlrm
dtrace.vim4510644editdlrm
dune.vim3320644editdlrm
dylan.vim27700644editdlrm
eiffel.vim33170644editdlrm
elm.vim32770644editdlrm
erlang.vim500660644editdlrm
eruby.vim30160644editdlrm
eterm.vim7430644editdlrm
falcon.vim140770644editdlrm
fortran.vim76640644editdlrm
framescript.vim8910644editdlrm
gitconfig.vim8410644editdlrm
gitolite.vim12770644editdlrm
go.vim16730644editdlrm
haml.vim22030644editdlrm
hamster.vim16920644editdlrm
hog.vim18920644editdlrm
html.vim336510644editdlrm
htmldjango.vim2730644editdlrm
idlang.vim16830644editdlrm
ishd.vim18770644editdlrm
j.vim18120644editdlrm
java.vim42870644editdlrm
javascript.vim153620644editdlrm
javascriptreact.vim1090644editdlrm
json.vim45280644editdlrm
jsonc.vim47270644editdlrm
jsp.vim4620644editdlrm
julia.vim154490644editdlrm
ld.vim18670644editdlrm
less.vim2430644editdlrm
lifelines.vim6380644editdlrm
liquid.vim18990644editdlrm
lisp.vim3530644editdlrm
logtalk.vim18590644editdlrm
lua.vim19270644editdlrm
mail.vim3550644editdlrm
make.vim35650644editdlrm
matlab.vim49230644editdlrm
meson.vim53190644editdlrm
mf.vim1560644editdlrm
mma.vim22730644editdlrm
mp.vim113210644editdlrm
nginx.vim3620644editdlrm
nsis.vim33050644editdlrm
objc.vim16460644editdlrm
ocaml.vim91910644editdlrm
occam.vim47000644editdlrm
pascal.vim57930644editdlrm
perl.vim59050644editdlrm
php.vim259010644editdlrm
postscr.vim17080644editdlrm
pov.vim26620644editdlrm
prolog.vim18640644editdlrm
ps1.vim4100644editdlrm
pyrex.vim3260644editdlrm
python.vim69840644editdlrm
r.vim140370644editdlrm
raku.vim34160644editdlrm
raml.vim2850644editdlrm
readline.vim7860644editdlrm
rhelp.vim28400644editdlrm
rmd.vim21870644editdlrm
rnoweb.vim10870644editdlrm
rpl.vim18630644editdlrm
rrst.vim11950644editdlrm
rst.vim18200644editdlrm
ruby.vim301480644editdlrm
rust.vim64980644editdlrm
sas.vim52700644editdlrm
sass.vim9500644editdlrm
scala.vim196560644editdlrm
scheme.vim3720644editdlrm
scss.vim1910644editdlrm
sdl.vim28290644editdlrm
sh.vim92570644editdlrm
sml.vim64780644editdlrm
sql.vim12040644editdlrm
sqlanywhere.vim132690644editdlrm
sshconfig.vim7960644editdlrm
systemd.vim2050644editdlrm
systemverilog.vim86290644editdlrm
tcl.vim25420644editdlrm
tcsh.vim13810644editdlrm
teraterm.vim14130644editdlrm
tex.vim136890644editdlrm
tf.vim15490644editdlrm
tilde.vim10130644editdlrm
treetop.vim7080644editdlrm
typescript.vim144810644editdlrm
vb.vim20890644editdlrm
verilog.vim81680644editdlrm
vhdl.vim146660644editdlrm
vim.vim57640644editdlrm
vroom.vim3790644editdlrm
wast.vim4580644editdlrm
xf86conf.vim7090644editdlrm
xhtml.vim2690644editdlrm
xinetd.vim12310644editdlrm
xml.vim77840644editdlrm
xsd.vim2530644editdlrm
xslt.vim2970644editdlrm
yacc.vim7810644editdlrm
yaml.vim54710644editdlrm
zimbu.vim39470644editdlrm
zsh.vim4110644editdlrm
Edit: /usr/share/vim/vim82/indent/vim.vim (5764B)
" Vim indent file " Language: Vim script " Maintainer: Bram Moolenaar " Last Change: 2021 Nov 27 " Only load this indent file when no other was loaded. if exists("b:did_indent") finish endif let b:did_indent = 1 setlocal indentexpr=GetVimIndent() setlocal indentkeys+==end,=},=else,=cat,=finall,=END,0\\,0=\"\\\ setlocal indentkeys-=0# setlocal indentkeys-=: let b:undo_indent = "setl indentkeys< indentexpr<" " Only define the function once. if exists("*GetVimIndent") finish endif let s:keepcpo= &cpo set cpo&vim function GetVimIndent() let ignorecase_save = &ignorecase try let &ignorecase = 0 return GetVimIndentIntern() finally let &ignorecase = ignorecase_save endtry endfunc let s:lineContPat = '^\s*\(\\\|"\\ \)' function GetVimIndentIntern() " Find a non-blank line above the current line. let lnum = prevnonblank(v:lnum - 1) " The previous line, ignoring line continuation let prev_text_end = lnum > 0 ? getline(lnum) : '' " If the current line doesn't start with '\' or '"\ ' and below a line that " starts with '\' or '"\ ', use the indent of the line above it. let cur_text = getline(v:lnum) if cur_text !~ s:lineContPat while lnum > 0 && getline(lnum) =~ s:lineContPat let lnum = lnum - 1 endwhile endif " At the start of the file use zero indent. if lnum == 0 return 0 endif " the start of the previous line, skipping over line continuation let prev_text = getline(lnum) let found_cont = 0 " Add a 'shiftwidth' after :if, :while, :try, :catch, :finally, :function " and :else. Add it three times for a line that starts with '\' or '"\ ' " after a line that doesn't (or g:vim_indent_cont if it exists). let ind = indent(lnum) " In heredoc indenting works completely differently. if has('syntax_items') let syn_here = synIDattr(synID(v:lnum, 1, 1), "name") if syn_here =~ 'vimLetHereDocStop' " End of heredoc: use indent of matching start line let lnum = v:lnum - 1 while lnum > 0 let attr = synIDattr(synID(lnum, 1, 1), "name") if attr != '' && attr !~ 'vimLetHereDoc' return indent(lnum) endif let lnum -= 1 endwhile return 0 endif if syn_here =~ 'vimLetHereDoc' if synIDattr(synID(lnum, 1, 1), "name") !~ 'vimLetHereDoc' " First line in heredoc: increase indent return ind + shiftwidth() endif " Heredoc continues: no change in indent return ind endif endif if cur_text =~ s:lineContPat && v:lnum > 1 && prev_text !~ s:lineContPat let found_cont = 1 if exists("g:vim_indent_cont") let ind = ind + g:vim_indent_cont else let ind = ind + shiftwidth() * 3 endif elseif prev_text =~ '^\s*aug\%[roup]\s\+' && prev_text !~ '^\s*aug\%[roup]\s\+[eE][nN][dD]\>' let ind = ind + shiftwidth() else " A line starting with :au does not increment/decrement indent. " A { may start a block or a dict. Assume that when a } follows it's a " terminated dict. if prev_text !~ '^\s*au\%[tocmd]' && prev_text !~ '^\s*{.*}' let i = match(prev_text, '\(^\||\)\s*\(export\s\+\)\?\({\|\(if\|wh\%[ile]\|for\|try\|cat\%[ch]\|fina\|finall\%[y]\|fu\%[nction]\|def\|el\%[seif]\)\>\)') if i >= 0 let ind += shiftwidth() if strpart(prev_text, i, 1) == '|' && has('syntax_items') \ && synIDattr(synID(lnum, i, 1), "name") =~ '\(Comment\|String\|PatSep\)$' let ind -= shiftwidth() endif endif endif endif " If the previous line contains an "end" after a pipe, but not in an ":au" " command. And not when there is a backslash before the pipe. " And when syntax HL is enabled avoid a match inside a string. let i = match(prev_text, '[^\\]|\s*\(ene\@!\)') if i > 0 && prev_text !~ '^\s*au\%[tocmd]' if !has('syntax_items') || synIDattr(synID(lnum, i + 2, 1), "name") !~ '\(Comment\|String\)$' let ind = ind - shiftwidth() endif endif " For a line starting with "}" find the matching "{". If it is at the start " of the line align with it, probably end of a block. " Use the mapped "%" from matchit to find the match, otherwise we may match " a { inside a comment or string. if cur_text =~ '^\s*}' if maparg('%') != '' exe v:lnum silent! normal % if line('.') < v:lnum && getline('.') =~ '^\s*{' let ind = indent('.') endif else " todo: use searchpair() to find a match endif endif " Below a line starting with "}" find the matching "{". If it is at the " end of the line we must be below the end of a dictionary. if prev_text =~ '^\s*}' if maparg('%') != '' exe lnum silent! normal % if line('.') == lnum || getline('.') !~ '^\s*{' let ind = ind - shiftwidth() endif else " todo: use searchpair() to find a match endif endif " Below a line starting with "]" we must be below the end of a list. " Include a "}" and "},} in case a dictionary ends too. if prev_text_end =~ '^\s*\(},\=\s*\)\=]' let ind = ind - shiftwidth() endif let ends_in_comment = has('syntax_items') \ && synIDattr(synID(lnum, len(getline(lnum)), 1), "name") =~ '\(Comment\|String\)$' " A line ending in "{" or "[" is most likely the start of a dict/list literal, " indent the next line more. Not for a continuation line or {{{. if !ends_in_comment && prev_text_end =~ '\s[{[]\s*$' && !found_cont let ind = ind + shiftwidth() endif " Subtract a 'shiftwidth' on a :endif, :endwhile, :catch, :finally, :endtry, " :endfun, :enddef, :else and :augroup END. if cur_text =~ '^\s*\(ene\@!\|cat\|finall\|el\|aug\%[roup]\s\+[eE][nN][dD]\)' let ind = ind - shiftwidth() endif return ind endfunction let &cpo = s:keepcpo unlet s:keepcpo " vim:sw=2