diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-05-31 19:48:53 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-05-31 19:48:53 +0200 |
commit | e35a52aee718c881bdfa69a47a1068df6ab6c60a (patch) | |
tree | 2b0b7da0fa124d685a6885e2b3476ffd8021e66c /runtime/doc/syntax.txt | |
parent | d881b516da0184052d2f9d33c3f72c5c014316bd (diff) | |
download | vim-git-e35a52aee718c881bdfa69a47a1068df6ab6c60a.tar.gz |
patch 8.2.0865: syntax foldlevel is taken from the start of the linev8.2.0865
Problem: Syntax foldlevel is taken from the start of the line.
Solution: Add ":syn foldlevel" to be able to use the minimal foldlevel in
the line. (Brad King, closes #6087)
Diffstat (limited to 'runtime/doc/syntax.txt')
-rw-r--r-- | runtime/doc/syntax.txt | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt index ff9be2e5c..2cff69411 100644 --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -3636,6 +3636,26 @@ DEFINING CASE *:syn-case* *E390* :sy[ntax] case Show either "syntax case match" or "syntax case ignore" (translated). + +DEFINING FOLDLEVEL *:syn-foldlevel* + +:sy[ntax] foldlevel [start | minimum] + This defines how the foldlevel of a line is computed when using + foldmethod=syntax (see |fold-syntax| and |:syn-fold|): + + start: Use level of item containing start of line. + minimum: Use lowest local-minimum level of items on line. + + The default is 'start'. Use 'minimum' to search a line horizontally + for the lowest level contained on the line that is followed by a + higher level. This produces more natural folds when syntax items + may close and open horizontally within a line. + +:sy[ntax] foldlevel + Show either "syntax foldlevel start" or "syntax foldlevel minimum". + + {not meaningful when Vim was compiled without |+folding| feature} + SPELL CHECKING *:syn-spell* :sy[ntax] spell [toplevel | notoplevel | default] @@ -4099,6 +4119,8 @@ This will make each {} block form one fold. The fold will start on the line where the item starts, and end where the item ends. If the start and end are within the same line, there is no fold. The 'foldnestmax' option limits the nesting of syntax folds. +See |:syn-foldlevel| to control how the foldlevel of a line is computed +from its syntax items. {not available when Vim was compiled without |+folding| feature} |