vim-foldpeek starts from a partial fork of LeafCage/foldCC.vim. Thanks!
Install the plugin using your favorite package manager.
call dein#add('kaile256/vim-foldpeek')
-
You can peek another line, skipping lines which have few information.
Set some skip-patterns in g:foldpeek#skip_patterns or b:foldpeek_skip_patterns.
The default value is'^[\-=/{!* \t]*$'
in list. Values will be compared to each folded line in regexp match. Customize it like below:
" '```.*$' for markdown, '[# \t]*\[\[plugins]]' for dein users
let g:foldpeek#skip_patterns = [
\ '^[\-=/{!* \t]*$',
\ '^```.*$'
\ '[# \t]*\[\[plugins]]',
\ ]
-
As default, you will get the number of folded lines at tail.
Addition to that, when each of numbers are 2 or more, you can get the number of
foldlevel
at head and thenumber
of peeked line as the top of folded lines is 1.
with foldpeek#text() (in vim-foldpeek) |
---|
with foldtext() (default) |
---|
For more detail, type :h foldpeek
in vim's command line and see
doc/foldpeek.txt.
- Adjust width for unicode character
MIT