https://github.com/arecarn/vim-clean-fold
https://github.com/arecarn/vim-clean-fold
Last synced: 6 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/arecarn/vim-clean-fold
- Owner: arecarn
- Created: 2015-01-29T19:31:31.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2016-02-28T21:14:29.000Z (over 10 years ago)
- Last Synced: 2025-03-29T06:31:08.472Z (over 1 year ago)
- Language: VimL
- Size: 33.2 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
clean-fold
==========
clean-fold provides alternatives to the default foldtext cleans up the
appearance of folds. This plugin also provides a new fold expression that is
an alternative to the built-in indent method of folding, that includes the
line before the indent as well as the following indented lines.
Fold Text Style
----------------
Alternatives to the default foldtext and a new foldmethod
* `clean_fold#fold_text(foldchar)`
* cleaner alternative to default fold text, still including number of folded lines
```vim
set foldtext=clean_fold#fold_text('_')
```
* `clean_fold#fold_text_minimal()`
* just include the text on the line except fold markers
```vim
set foldtext=clean_fold#fold_text_minimal()
```
Fold Expression
---------------
A new foldexpr set up so lines that are at the same indented level are
folded along with the first line above them one indent level up.
* `clean_fold#fold_expr(lnum)`
* like indent folding but also include first line that is one indent level lower
```vim
set foldmethod=expr
set foldexpr=clean_fold#fold_expr(v:lnum)
```