Allow vimtex fold to work when manually set (#283)

This commit is contained in:
Karl Yngve Lervåg 2015-11-20 23:18:39 +01:00
parent 29e2f71e59
commit c7658b1404

View File

@ -6,8 +6,6 @@
function! vimtex#fold#init_options() " {{{1
call vimtex#util#set_default('g:vimtex_fold_enabled', ! &diff)
if !g:vimtex_fold_enabled | return | endif
call vimtex#util#set_default('g:vimtex_fold_automatic', 0)
call vimtex#util#set_default('g:vimtex_fold_preamble', 1)
call vimtex#util#set_default('g:vimtex_fold_envs', 1)
@ -30,15 +28,14 @@ endfunction
" }}}1
function! vimtex#fold#init_script() " {{{1
if !g:vimtex_fold_enabled | return | endif
" Define some script variables
let s:parts = '\v^\s*(\\|\% Fake)(' . join(g:vimtex_fold_parts, '|') . ')>'
let s:secs = '\v^\s*(\\|\% Fake)(' . join(g:vimtex_fold_sections, '|') . ')>'
endfunction
" }}}1
function! vimtex#fold#init_buffer() " {{{1
let b:vimtex_fold_parts = s:parse_folded()
if !g:vimtex_fold_enabled | return | endif
" Don't override modeline settings