aboutsummaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorJames McCoy <jamessan@jamessan.com>2020-06-24 13:09:30 -0400
committerGitHub <noreply@github.com>2020-06-24 13:09:30 -0400
commit225f0bcd98dd8ff8cab964f13816dfdf327038ae (patch)
tree2c594709f45eda6850376a21f41da3590ae92ccf /runtime
parent352831229f78c6af514ceccedd2db48acffd117f (diff)
parent357c16515c13eac99c5f2bc1ba5ac1ccc8afceec (diff)
downloadrneovim-225f0bcd98dd8ff8cab964f13816dfdf327038ae.tar.gz
rneovim-225f0bcd98dd8ff8cab964f13816dfdf327038ae.tar.bz2
rneovim-225f0bcd98dd8ff8cab964f13816dfdf327038ae.zip
Merge pull request #12133 from bradking/syntax-fold
Diffstat (limited to 'runtime')
-rw-r--r--runtime/doc/syntax.txt20
1 files changed, 20 insertions, 0 deletions
diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt
index 57337aeac2..7da886dabd 100644
--- a/runtime/doc/syntax.txt
+++ b/runtime/doc/syntax.txt
@@ -3522,6 +3522,24 @@ 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".
+
SPELL CHECKING *:syn-spell*
:sy[ntax] spell [toplevel | notoplevel | default]
@@ -3985,6 +4003,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.
*:syn-contains* *E405* *E406* *E407* *E408* *E409*