From 6a08af94a498db173f271a5ac7d28a77818fdeb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karl=20Yngve=20Lerv=C3=A5g?= Date: Mon, 5 Dec 2016 22:09:34 +0100 Subject: [PATCH] Revert 1cd633d6ba (cf. #634) This did not solve the issue like I thought it would. --- doc/vimtex.txt | 6 ------ indent/tex.vim | 11 +---------- 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/doc/vimtex.txt b/doc/vimtex.txt index 8fe465c..5a70431 100644 --- a/doc/vimtex.txt +++ b/doc/vimtex.txt @@ -584,12 +584,6 @@ Options~ Default value: 1 -*g:vimtex_indent_verbatim_envs* - Use this option to set a list of verbatim environments in which there should - be no automatic indentation. - - Default value: ['verbatim', 'lstlisting', 'minted'] - *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. diff --git a/indent/tex.vim b/indent/tex.vim index 03c8442..296b758 100644 --- a/indent/tex.vim +++ b/indent/tex.vim @@ -12,11 +12,6 @@ let b:did_vimtex_indent = 1 call vimtex#util#set_default('g:vimtex_indent_enabled', 1) if !g:vimtex_indent_enabled | finish | endif -call vimtex#util#set_default('g:vimtex_indent_verbatim_envs', [ - \ 'verbatim', - \ 'lstlisting', - \ 'minted', - \]) let s:cpo_save = &cpo set cpo&vim @@ -81,15 +76,11 @@ endfunction " }}}1 function! s:is_verbatim(line, lnum) " {{{1 - let l:env = a:line !~# s:is_verbatim_regex + let l:env = a:line !~# '\v\\%(begin|end)\{%(verbatim|lstlisting|minted)' let l:syn = synIDattr(synID(a:lnum, 1, 1), 'name') ==# 'texZone' return l:env && l:syn endfunction -let s:is_verbatim_regex = '\v\\%(begin|end)\{%(' - \ . join(g:vimtex_indent_verbatim_envs, '|') - \ . ')' - " }}}1 function! s:indent_envs(cur, prev) " {{{1