Moved default value to change.vim and added doc

This commit is contained in:
Karl Yngve Lervåg 2015-06-06 20:21:29 +02:00
parent 2b0175df60
commit 5444067f4a
3 changed files with 33 additions and 19 deletions

View File

@ -153,11 +153,6 @@ function! s:init_environment() " {{{1
endfunction
function! s:init_options() " {{{1
"
" This function does two things:
" 1. Sets the buffer options for LaTeX editing
" 2. Defines all vimtex options with default values if not already defined
"
let s:save_cpo = &cpo
set cpo&vim
@ -204,20 +199,6 @@ function! s:init_options() " {{{1
let &cpo = s:save_cpo
unlet s:save_cpo
let g:vimtex_change_complete_envs = [
\ 'itemize',
\ 'enumerate',
\ 'description',
\ 'center',
\ 'figure',
\ 'table',
\ 'equation',
\ 'multline',
\ 'align',
\ 'split',
\ '\[',
\ ]
endfunction
" }}}1

View File

@ -5,6 +5,20 @@
"
function! vimtex#change#init(initialized) " {{{1
call vimtex#util#set_default('g:vimtex_change_complete_envs', [
\ 'itemize',
\ 'enumerate',
\ 'description',
\ 'center',
\ 'figure',
\ 'table',
\ 'equation',
\ 'multline',
\ 'align',
\ 'split',
\ '\[',
\ ])
" Define mappings
nnoremap <silent><buffer> <plug>(vimtex-delete-env)
\ :call vimtex#change#env('')<cr>

View File

@ -287,6 +287,25 @@ Options~
\ 'bib' : '\C\\\a*cite\a*\*\?\(\[[^\]]*\]\)*\_\s*{[^{}]*',
\ })
<
*g:vimtex_change_complete_envs*
Define a list of environments that will be completed when changing the
surrounding environments (see |<plug>(vimtex-change-env)|).
Default value: >
let g:vimtex_change_complete_envs = [
\ 'itemize',
\ 'enumerate',
\ 'description',
\ 'center',
\ 'figure',
\ 'table',
\ 'equation',
\ 'multline',
\ 'align',
\ 'split',
\ '\[',
\ ]
<
*g:vimtex_fold_enabled*
Use this option to disable/enable folding.