parent
fa9af58376
commit
5cc4fead62
@ -229,10 +229,8 @@ function! vimtex#fold#text() " {{{1
|
|||||||
let title = matchstr(line, secpat2 . '\zs.*\ze\]')
|
let title = matchstr(line, secpat2 . '\zs.*\ze\]')
|
||||||
elseif line =~ secpat2
|
elseif line =~ secpat2
|
||||||
let title = matchstr(line, secpat2 . '\zs.*')
|
let title = matchstr(line, secpat2 . '\zs.*')
|
||||||
elseif line =~ 'Fake' . sections . ':'
|
|
||||||
let title = matchstr(line,'Fake' . sections . ':\s*\zs.*')
|
|
||||||
elseif line =~ 'Fake' . sections
|
elseif line =~ 'Fake' . sections
|
||||||
let title = matchstr(line, 'Fake' . sections)
|
let title = matchstr(line, 'Fake' . sections . '.*')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" Environments
|
" Environments
|
||||||
|
@ -1360,6 +1360,18 @@ frontmatter, backmatter, and appendix) and section types (chapter, section,
|
|||||||
etc.) are present. This parsing is done automatically every time the folds are
|
etc.) are present. This parsing is done automatically every time the folds are
|
||||||
recomputed, if there are any changes to the file.
|
recomputed, if there are any changes to the file.
|
||||||
|
|
||||||
|
The fold function also recognizes "fake" sections. That is, it parses comments
|
||||||
|
similar to: >
|
||||||
|
|
||||||
|
% Fakepart title
|
||||||
|
% Fakechapter title
|
||||||
|
% Fakesection title
|
||||||
|
% Fakesubsection title
|
||||||
|
|
||||||
|
The fake sections are folded at the same level as the corresponding "real"
|
||||||
|
sections. The fold title is the provided title with the `Fake...` part
|
||||||
|
prepended.
|
||||||
|
|
||||||
Note: The |fold-expr| method of folding is well known to be slow, e.g. for
|
Note: The |fold-expr| method of folding is well known to be slow, e.g. for
|
||||||
long lines and large files. To speed things up, the user may want to
|
long lines and large files. To speed things up, the user may want to
|
||||||
enable the |g:vimtex_fold_manual| option. An alternative is to add
|
enable the |g:vimtex_fold_manual| option. An alternative is to add
|
||||||
|
Loading…
x
Reference in New Issue
Block a user