- commit
- 77ecafc337bf6259182f7262f5444bff5b0f2e9c
- parent
- 3fa3eabab044dd27ca73916e6cd5c11fdf9ccb60
- Author
- Tobias Bengfort <tobias.bengfort@posteo.de>
- Date
- 2024-08-24 18:20
extend README
Diffstat
| M | README.md | 30 | ++++++++++++++++++++---------- |
1 files changed, 20 insertions, 10 deletions
diff --git a/README.md b/README.md
@@ -1,14 +1,24 @@1 -1 This plugin enables folding by indentation including the previous line in the2 -1 fold. This is ideal e.g. for nested lists:-1 1 Vim has some default fold methods, one of which is indentation based. However, -1 2 it folds an indented block into a single line instead of folding it into the -1 3 line right before the block. -1 4 -1 5 Consider this markdown list: 3 6 4 7 - Item 1 5 8 - Item 1.1 6 9 - Item 1.27 -1 - Item 28 -1 - Item 2.1-----------------------------------------------------------9 -1 - Item 2.210 -1 - Item 2.2.111 -1 - Item 2.2.212 -1 - Item 3-----------------------------------------------------------------13 -114 -1 Inspired by http://learnvimscriptthehardway.stevelosh.com/chapters/49.html-1 10 -1 11 Vim's indent folding turnes this into: -1 12 -1 13 - Item 1 -1 14 +-- 2 lines: - Item 1.1------------------------------------------------- -1 15 -1 16 The plugin instead turns this into: -1 17 -1 18 - Item 1----------------------------------------------------------------- -1 19 -1 20 This approach is inspired by http://learnvimscriptthehardway.stevelosh.com/chapters/49.html -1 21 -1 22 Unfortunately, the performance of this approach is pretty bad. To mitigate -1 23 this, the foldmethod is kept at `manual` by default and only switches to `expr` -1 24 when the folds are actually used (e.g. when pressing `za`).