Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ Option | Values | Default value | Description
`anyfold_fold_toplevel` | 0, 1 | 0 | Fold subsequent unindented lines
`anyfold_fold_size_str` | string | '%s lines' | Format of fold size string in minimalistic display
`anyfold_fold_level_str` | string | ' + ' | Format of fold level string in minimalistic display
anyfold_fold_fillchar | string | ' ' | Fold fill character

## Complementary plugins

Expand Down
5 changes: 3 additions & 2 deletions autoload/anyfold.vim
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ function! anyfold#init(force) abort
\ 'motion': 1,
\ 'debug': 0,
\ 'fold_size_str': '%s lines',
\ 'fold_fillchar': ' ',
\ 'fold_level_str': ' + ',
\ }
lockvar! g:_ANYFOLD_DEFAULTS
Expand Down Expand Up @@ -665,8 +666,8 @@ function! MinimalFoldText() abort
let foldSizeStr = " " . substitute(g:anyfold_fold_size_str, "%s", string(foldSize), "g") . " "
let foldLevelStr = repeat(g:anyfold_fold_level_str, v:foldlevel)
let lineCount = line("$")
let expansionString = repeat(" ", w - strwidth(foldSizeStr.line.foldLevelStr))
return line . expansionString . foldSizeStr . foldLevelStr
let expansionString = repeat(g:anyfold_fold_fillchar, w - strwidth(foldSizeStr.line." ".foldLevelStr))
return line . " " . expansionString . foldSizeStr . foldLevelStr
endfunction

"----------------------------------------------------------------------------/
Expand Down
1 change: 1 addition & 0 deletions doc/anyfold.txt
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ g:anyfold_comments | list of strings | ['comment', 'string'] |
g:anyfold_fold_toplevel | 0, 1 | 0 (= 'off') |
g:anyfold_fold_size_str | string | '%s lines' | Format of fold size string in minimalistic display
g:anyfold_fold_level_str | string | ' + ' | Format of fold level string in minimalistic display
g:anyfold_fold_fillchar | string | ' ' | Fold fill character

*anyfoldLoaded*
For expert configuration, anyfold triggers an |autocmd-event| `anyfoldLoaded`
Expand Down