From 404061ff994a8fa2f01fec37173d3ed88130b550 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karl=20Yngve=20Lerv=C3=A5g?= Date: Fri, 30 Dec 2016 22:27:57 +0100 Subject: [PATCH] Fixed #613: Add option for indent on &s --- doc/vimtex.txt | 8 ++++++++ indent/tex.vim | 3 ++- test/vader/indentation.vader | 29 +++++++++++++++++++++++++++++ 3 files changed, 39 insertions(+), 1 deletion(-) diff --git a/doc/vimtex.txt b/doc/vimtex.txt index 37f3f5f..c6c9f68 100644 --- a/doc/vimtex.txt +++ b/doc/vimtex.txt @@ -586,6 +586,13 @@ Options~ Default value: ['document'] +*g:vimtex_indent_on_ampersands* + By default, vimtex will align on ampersands e.g. in math aligned + environments or in tabular environments. If this feature is not wanted it + may be disabled through this option. + + Default value: 1 + *g:vimtex_index_hide_line_numbers* If enabled, then line numbers will be hidden in the index windows. That is, |nonumber| and |norelativenumber| will be set locally. @@ -1763,6 +1770,7 @@ Associated settings: |g:vimtex_indent_enabled| |g:vimtex_indent_bib_enabled| |g:vimtex_indent_ignored_envs| + |g:vimtex_indent_on_ampersands| ============================================================================== SYNTAX HIGHLIGHTING *vimtex-syntax* diff --git a/indent/tex.vim b/indent/tex.vim index 8543608..e980c18 100644 --- a/indent/tex.vim +++ b/indent/tex.vim @@ -38,7 +38,8 @@ function! VimtexIndent(lnum) " {{{1 endif " Align on ampersands - if l:line =~# '^\s*&' && l:prev_line =~# '\\\@