From 5444067f4ac19b7cf83fd39340682ff1132bafaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karl=20Yngve=20Lerv=C3=A5g?= Date: Sat, 6 Jun 2015 20:21:29 +0200 Subject: [PATCH] Moved default value to change.vim and added doc --- autoload/vimtex.vim | 19 ------------------- autoload/vimtex/change.vim | 14 ++++++++++++++ doc/vimtex.txt | 19 +++++++++++++++++++ 3 files changed, 33 insertions(+), 19 deletions(-) diff --git a/autoload/vimtex.vim b/autoload/vimtex.vim index b5a43f7..90beb9b 100644 --- a/autoload/vimtex.vim +++ b/autoload/vimtex.vim @@ -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 diff --git a/autoload/vimtex/change.vim b/autoload/vimtex/change.vim index bf1e471..86723d9 100644 --- a/autoload/vimtex/change.vim +++ b/autoload/vimtex/change.vim @@ -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 (vimtex-delete-env) \ :call vimtex#change#env('') diff --git a/doc/vimtex.txt b/doc/vimtex.txt index 9d66ab6..74c039d 100644 --- a/doc/vimtex.txt +++ b/doc/vimtex.txt @@ -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 |(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.