PATH:
usr
/
share
/
vim
/
vim82
/
indent
" Vim indent file " Language: Liquid " Maintainer: Tim Pope <vimNOSPAM@tpope.org> " Last Change: 2017 Jun 13 if exists('b:did_indent') finish endif set indentexpr= if exists('b:liquid_subtype') exe 'runtime! indent/'.b:liquid_subtype.'.vim' else runtime! indent/html.vim endif unlet! b:did_indent if &l:indentexpr == '' if &l:cindent let &l:indentexpr = 'cindent(v:lnum)' else let &l:indentexpr = 'indent(prevnonblank(v:lnum-1))' endif endif let b:liquid_subtype_indentexpr = &l:indentexpr let b:did_indent = 1 setlocal indentexpr=GetLiquidIndent() setlocal indentkeys=o,O,*<Return>,<>>,{,},0),0],o,O,!^F,=end,=endif,=endunless,=endifchanged,=endcase,=endfor,=endtablerow,=endcapture,=else,=elsif,=when,=empty " Only define the function once. if exists('*GetLiquidIndent') finish endif function! s:count(string,pattern) let string = substitute(a:string,'\C'.a:pattern,"\n",'g') return strlen(substitute(string,"[^\n]",'','g')) endfunction function! GetLiquidIndent(...) if a:0 && a:1 == '.' let v:lnum = line('.') elseif a:0 && a:1 =~ '^\d' let v:lnum = a:1 endif let vcol = col('.') call cursor(v:lnum,1) exe "let ind = ".b:liquid_subtype_indentexpr let lnum = prevnonblank(v:lnum-1) let line = getline(lnum) let cline = getline(v:lnum) let line = substitute(line,'\C^\%(\s*{%\s*end\w*\s*%}\)\+','','') let line .= matchstr(cline,'\C^\%(\s*{%\s*end\w*\s*%}\)\+') let cline = substitute(cline,'\C^\%(\s*{%\s*end\w*\s*%}\)\+','','') let sw = shiftwidth() let ind += sw * s:count(line,'{%\s*\%(if\|elsif\|else\|unless\|ifchanged\|case\|when\|for\|empty\|tablerow\|capture\)\>') let ind -= sw * s:count(line,'{%\s*end\%(if\|unless\|ifchanged\|case\|for\|tablerow\|capture\)\>') let ind -= sw * s:count(cline,'{%\s*\%(elsif\|else\|when\|empty\)\>') let ind -= sw * s:count(cline,'{%\s*end\w*$') return ind endfunction
[+]
..
[-] mp.vim
[open]
[-] htmldjango.vim
[open]
[-] j.vim
[open]
[-] docbk.vim
[open]
[-] nsis.vim
[open]
[-] less.vim
[open]
[-] dune.vim
[open]
[-] yacc.vim
[open]
[-] framescript.vim
[open]
[-] eiffel.vim
[open]
[-] gitconfig.vim
[open]
[-] jsp.vim
[open]
[-] prolog.vim
[open]
[-] cucumber.vim
[open]
[-] bash.vim
[open]
[-] ant.vim
[open]
[-] dtd.vim
[open]
[-] tex.vim
[open]
[-] json.vim
[open]
[-] automake.vim
[open]
[-] tcl.vim
[open]
[-] tilde.vim
[open]
[-] java.vim
[open]
[-] context.vim
[open]
[-] sshconfig.vim
[open]
[-] matlab.vim
[open]
[-] dylan.vim
[open]
[-] README.txt
[open]
[-] html.vim
[open]
[-] eterm.vim
[open]
[-] cpp.vim
[open]
[-] scss.vim
[open]
[-] logtalk.vim
[open]
[-] objc.vim
[open]
[-] raml.vim
[open]
[-] sh.vim
[open]
[-] xsd.vim
[open]
[-] sass.vim
[open]
[-] d.vim
[open]
[-] xf86conf.vim
[open]
[-] pov.vim
[open]
[-] verilog.vim
[open]
[-] ld.vim
[open]
[-] dtrace.vim
[open]
[-] eruby.vim
[open]
[-] perl.vim
[open]
[-] xhtml.vim
[open]
[-] go.vim
[open]
[-] lifelines.vim
[open]
[-] ch.vim
[open]
[-] lua.vim
[open]
[-] falcon.vim
[open]
[-] dictconf.vim
[open]
[-] config.vim
[open]
[-] chaiscript.vim
[open]
[-] sas.vim
[open]
[-] bib.vim
[open]
[-] ocaml.vim
[open]
[-] ada.vim
[open]
[-] pascal.vim
[open]
[-] aap.vim
[open]
[-] dictdconf.vim
[open]
[-] mf.vim
[open]
[-] perl6.vim
[open]
[-] xslt.vim
[open]
[-] php.vim
[open]
[-] occam.vim
[open]
[-] r.vim
[open]
[-] meson.vim
[open]
[-] systemverilog.vim
[open]
[-] scheme.vim
[open]
[-] ishd.vim
[open]
[-] scala.vim
[open]
[-] liquid.vim
[open]
[-] xinetd.vim
[open]
[-] rhelp.vim
[open]
[-] haml.vim
[open]
[-] erlang.vim
[open]
[-] elm.vim
[open]
[-] yaml.vim
[open]
[-] xml.vim
[open]
[-] javascriptreact.vim
[open]
[-] wast.vim
[open]
[-] ruby.vim
[open]
[-] cobol.vim
[open]
[-] zimbu.vim
[open]
[-] vim.vim
[open]
[-] tf.vim
[open]
[-] sql.vim
[open]
[-] clojure.vim
[open]
[-] rrst.vim
[open]
[-] lisp.vim
[open]
[-] css.vim
[open]
[-] bzl.vim
[open]
[-] cs.vim
[open]
[-] sml.vim
[open]
[-] typescript.vim
[open]
[-] vroom.vim
[open]
[-] javascript.vim
[open]
[-] gitolite.vim
[open]
[-] idlang.vim
[open]
[-] mail.vim
[open]
[-] c.vim
[open]
[-] vb.vim
[open]
[-] systemd.vim
[open]
[-] hog.vim
[open]
[-] make.vim
[open]
[-] vhdl.vim
[open]
[-] sqlanywhere.vim
[open]
[-] postscr.vim
[open]
[-] rnoweb.vim
[open]
[-] mma.vim
[open]
[-] treetop.vim
[open]
[-] cmake.vim
[open]
[-] dosbatch.vim
[open]
[-] hamster.vim
[open]
[-] sdl.vim
[open]
[-] zsh.vim
[open]
[-] fortran.vim
[open]
[-] rpl.vim
[open]
[-] teraterm.vim
[open]
[-] python.vim
[open]
[-] changelog.vim
[open]
[-] tcsh.vim
[open]
[-] cdl.vim
[open]
[-] bst.vim
[open]
[-] awk.vim
[open]
[-] pyrex.vim
[open]
[-] cuda.vim
[open]
[-] rust.vim
[open]
[-] readline.vim
[open]
[-] rst.vim
[open]
[-] rmd.vim
[open]