Mercurial > vim
comparison runtime/doc/syntax.txt @ 20623:99b6e6bf48bf v8.2.0865
patch 8.2.0865: syntax foldlevel is taken from the start of the line
Commit: https://github.com/vim/vim/commit/e35a52aee718c881bdfa69a47a1068df6ab6c60a
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun May 31 19:48:53 2020 +0200
patch 8.2.0865: syntax foldlevel is taken from the start of the line
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)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 31 May 2020 20:00:04 +0200 |
parents | 68c206d3a251 |
children | 661eb972cb22 |
comparison
equal
deleted
inserted
replaced
20622:d487701a608e | 20623:99b6e6bf48bf |
---|---|
3634 items until the next ":syntax case" command are affected. | 3634 items until the next ":syntax case" command are affected. |
3635 | 3635 |
3636 :sy[ntax] case | 3636 :sy[ntax] case |
3637 Show either "syntax case match" or "syntax case ignore" (translated). | 3637 Show either "syntax case match" or "syntax case ignore" (translated). |
3638 | 3638 |
3639 | |
3640 DEFINING FOLDLEVEL *:syn-foldlevel* | |
3641 | |
3642 :sy[ntax] foldlevel [start | minimum] | |
3643 This defines how the foldlevel of a line is computed when using | |
3644 foldmethod=syntax (see |fold-syntax| and |:syn-fold|): | |
3645 | |
3646 start: Use level of item containing start of line. | |
3647 minimum: Use lowest local-minimum level of items on line. | |
3648 | |
3649 The default is 'start'. Use 'minimum' to search a line horizontally | |
3650 for the lowest level contained on the line that is followed by a | |
3651 higher level. This produces more natural folds when syntax items | |
3652 may close and open horizontally within a line. | |
3653 | |
3654 :sy[ntax] foldlevel | |
3655 Show either "syntax foldlevel start" or "syntax foldlevel minimum". | |
3656 | |
3657 {not meaningful when Vim was compiled without |+folding| feature} | |
3658 | |
3639 SPELL CHECKING *:syn-spell* | 3659 SPELL CHECKING *:syn-spell* |
3640 | 3660 |
3641 :sy[ntax] spell [toplevel | notoplevel | default] | 3661 :sy[ntax] spell [toplevel | notoplevel | default] |
3642 This defines where spell checking is to be done for text that is not | 3662 This defines where spell checking is to be done for text that is not |
3643 in a syntax item: | 3663 in a syntax item: |
4097 This will make each {} block form one fold. | 4117 This will make each {} block form one fold. |
4098 | 4118 |
4099 The fold will start on the line where the item starts, and end where the item | 4119 The fold will start on the line where the item starts, and end where the item |
4100 ends. If the start and end are within the same line, there is no fold. | 4120 ends. If the start and end are within the same line, there is no fold. |
4101 The 'foldnestmax' option limits the nesting of syntax folds. | 4121 The 'foldnestmax' option limits the nesting of syntax folds. |
4122 See |:syn-foldlevel| to control how the foldlevel of a line is computed | |
4123 from its syntax items. | |
4102 {not available when Vim was compiled without |+folding| feature} | 4124 {not available when Vim was compiled without |+folding| feature} |
4103 | 4125 |
4104 | 4126 |
4105 *:syn-contains* *E405* *E406* *E407* *E408* *E409* | 4127 *:syn-contains* *E405* *E406* *E407* *E408* *E409* |
4106 contains={group-name},.. | 4128 contains={group-name},.. |