diff --git a/autoload/vimtex/fold.vim b/autoload/vimtex/fold.vim index 47bacd5..dbc108b 100644 --- a/autoload/vimtex/fold.vim +++ b/autoload/vimtex/fold.vim @@ -8,6 +8,7 @@ function! vimtex#fold#init_options() " {{{1 call vimtex#util#set_default('g:vimtex_fold_enabled', 0) call vimtex#util#set_default('g:vimtex_fold_manual', 0) call vimtex#util#set_default('g:vimtex_fold_comments', 0) + call vimtex#util#set_default('g:vimtex_fold_section_character', '') call vimtex#util#set_default('g:vimtex_fold_preamble', 1) call vimtex#util#set_default('g:vimtex_fold_envs', 1) call vimtex#util#set_default('g:vimtex_fold_parts', @@ -234,7 +235,14 @@ endfunction function! vimtex#fold#text() " {{{1 " Initialize let line = getline(v:foldstart) - let level = v:foldlevel > 1 ? repeat('-', v:foldlevel-2) . '*' : '' + + if empty(g:vimtex_fold_section_character) + let fold_character = '*' + else + let fold_character = g:vimtex_fold_section_character + endif + + let level = v:foldlevel > 1 ? repeat('-', v:foldlevel-2) . fold_character : '' let title = 'Not defined' let nt = 73 diff --git a/doc/vimtex.txt b/doc/vimtex.txt index a4eb70a..e7bad47 100644 --- a/doc/vimtex.txt +++ b/doc/vimtex.txt @@ -427,6 +427,12 @@ Options~ Default value: 0 +*g:vimtex_fold_section_character* + + Use custom section symbol for folding. + + Default value: '' + *g:vimtex_fold_envs* Control whether or not to fold environments.