Revert 1cd633d6ba
(cf. #634)
This did not solve the issue like I thought it would.
This commit is contained in:
parent
7046490ce2
commit
6a08af94a4
@ -584,12 +584,6 @@ Options~
|
|||||||
|
|
||||||
Default value: 1
|
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*
|
*g:vimtex_index_hide_line_numbers*
|
||||||
If enabled, then line numbers will be hidden in the index windows. That is,
|
If enabled, then line numbers will be hidden in the index windows. That is,
|
||||||
|nonumber| and |norelativenumber| will be set locally.
|
|nonumber| and |norelativenumber| will be set locally.
|
||||||
|
@ -12,11 +12,6 @@ let b:did_vimtex_indent = 1
|
|||||||
|
|
||||||
call vimtex#util#set_default('g:vimtex_indent_enabled', 1)
|
call vimtex#util#set_default('g:vimtex_indent_enabled', 1)
|
||||||
if !g:vimtex_indent_enabled | finish | endif
|
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
|
let s:cpo_save = &cpo
|
||||||
set cpo&vim
|
set cpo&vim
|
||||||
@ -81,15 +76,11 @@ endfunction
|
|||||||
|
|
||||||
" }}}1
|
" }}}1
|
||||||
function! s:is_verbatim(line, lnum) " {{{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'
|
let l:syn = synIDattr(synID(a:lnum, 1, 1), 'name') ==# 'texZone'
|
||||||
return l:env && l:syn
|
return l:env && l:syn
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
let s:is_verbatim_regex = '\v\\%(begin|end)\{%('
|
|
||||||
\ . join(g:vimtex_indent_verbatim_envs, '|')
|
|
||||||
\ . ')'
|
|
||||||
|
|
||||||
" }}}1
|
" }}}1
|
||||||
|
|
||||||
function! s:indent_envs(cur, prev) " {{{1
|
function! s:indent_envs(cur, prev) " {{{1
|
||||||
|
Loading…
Reference in New Issue
Block a user