From bb85059bacd5b415a012f25679111a0e55d3c6d9 Mon Sep 17 00:00:00 2001 From: Adam Stankiewicz Date: Sat, 30 Dec 2017 11:10:32 +0100 Subject: Update --- indent/tex.vim | 140 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 140 insertions(+) create mode 100644 indent/tex.vim (limited to 'indent/tex.vim') diff --git a/indent/tex.vim b/indent/tex.vim new file mode 100644 index 00000000..14af7b28 --- /dev/null +++ b/indent/tex.vim @@ -0,0 +1,140 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'latex') == -1 + +" LaTeX indent file (part of LaTeX Box) +" Maintainer: David Munger (mungerd@gmail.com) + +if exists("g:LatexBox_custom_indent") && ! g:LatexBox_custom_indent + finish +endif +if exists("b:did_indent") + finish +endif + +let b:did_indent = 1 + +setlocal indentexpr=LatexBox_TexIndent() +setlocal indentkeys=0=\\end,0=\\end{enumerate},0=\\end{itemize},0=\\end{description},0=\\right,0=\\item,0=\\),0=\\],0},o,O,0\\ + +let s:list_envs = ['itemize', 'enumerate', 'description'] +" indent on \left( and on \(, but not on ( +" indent on \left[ and on \[, but not on [ +" indent on \left\{ and on {, but not on \{ +let s:open_pat = '\\\@ 703 || (v:version == 703 && has('patch598')) + augroup LatexBox_Completion + autocmd! + autocmd CompleteDone call Latexbox_CallIndent() + augroup END +endif + +" vim:fdm=marker:ff=unix:noet:ts=4:sw=4 + +endif -- cgit v1.2.3