Skip to content

Commit

Permalink
Introduce g:yamlfolds_use_yaml_fold_text and support custom foldtext
Browse files Browse the repository at this point in the history
  • Loading branch information
kg8m committed Oct 20, 2022
1 parent 300c30f commit f963d04
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@ Install using either [Pathogen][], [Vundle][], or similar.
Vim script ID is [5559][].


### Configuration

```vim
" Don't use `YamlFoldText()` of vim-yaml-folds.
let g:yamlfolds_use_yaml_fold_text = v:false
```


### Packaging

Quick notes on packaging for vim.org, remember to update the version number:
Expand Down
5 changes: 4 additions & 1 deletion after/ftplugin/yaml/folding.vim
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ endfunction

setlocal foldmethod=expr
setlocal foldexpr=YamlFolds()
setlocal foldtext=YamlFoldText()

if get(g:, "yamlfolds_use_yaml_fold_text", v:true)
setlocal foldtext=YamlFoldText()
endif

let b:undo_ftplugin =
\ exists('b:undo_ftplugin')
Expand Down

0 comments on commit f963d04

Please sign in to comment.