diff --git a/README.md b/README.md index 0d10ff9..019e51a 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/autoload/anyfold.vim b/autoload/anyfold.vim index bf0022c..f3f5ef2 100644 --- a/autoload/anyfold.vim +++ b/autoload/anyfold.vim @@ -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 @@ -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 "----------------------------------------------------------------------------/ diff --git a/doc/anyfold.txt b/doc/anyfold.txt index 22cc669..2f4a30c 100644 --- a/doc/anyfold.txt +++ b/doc/anyfold.txt @@ -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`