Files
neovim/runtime/doc
Brad King 357c16515c vim-patch:8.2.0865 syntax: Add command to control how foldlevel is computed
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.
e35a52aee7

With `foldmethod=syntax` the foldlevel of a line is computed based
on syntax items on the line.  Previously we always used the level
of the syntax item containing the start of the line.  This works
well in cases such as:

    if (...) {
      ...
    }
    else if (...) {
      ...
    }
    else {
      ...
    }

which folds like this:

    +---  3 lines: if (...) {---------------------------
    +---  3 lines: else if (...) {----------------------
    +---  3 lines: else {-------------------------------

However, the code:

    if (...) {
      ...
    } else if (...) {
      ...
    } else {
      ...
    }

folds like this:

    +---  7 lines: if (...) {---------------------------

We can make the latter case fold like this:

    +---  2 lines: if (...) {---------------------------
    +---  2 lines: } else if (...) {--------------------
    +---  3 lines: } else {-----------------------------

by choosing on each line the lowest fold level that is followed
by a higher fold level.

Add a syntax command

    :syntax foldlevel [start | minimum]

to choose between these two methods of computing the foldlevel of
a line.
2020-06-23 19:07:33 -04:00
..
2018-10-29 09:55:07 +01:00
2019-11-25 01:08:02 -08:00
2020-01-12 23:41:55 -08:00
2019-08-02 16:20:23 +02:00
2020-06-10 22:21:14 +09:00
2020-03-02 12:59:35 +01:00
2018-10-29 09:32:29 +01:00
2018-10-29 10:01:44 +01:00
2018-10-29 09:55:07 +01:00
2018-10-29 09:55:07 +01:00
2020-01-12 23:41:55 -08:00
2018-10-29 09:55:07 +01:00
2018-10-29 09:55:07 +01:00
2019-11-17 19:06:59 -08:00
2019-08-02 16:20:23 +02:00
2019-08-02 16:20:23 +02:00
2019-09-06 18:30:35 -07:00
2020-01-12 23:41:55 -08:00
2019-12-31 02:25:10 -08:00
doc
2019-09-09 09:53:19 -07:00
2018-08-25 15:25:49 +02:00
2018-08-25 15:25:49 +02:00
2019-12-31 02:25:10 -08:00
2019-12-31 02:25:10 -08:00
2019-11-17 19:06:59 -08:00
2019-03-26 19:55:33 +01:00
2018-10-29 09:55:07 +01:00
doc
2018-11-05 22:45:48 +01:00
2019-08-02 16:20:22 +02:00
2018-10-29 09:55:07 +01:00
2018-10-29 09:55:07 +01:00
2018-10-29 09:55:07 +01:00
2015-08-15 15:25:30 -03:00
2018-10-29 09:55:07 +01:00
2020-01-20 19:43:59 -05:00
2018-10-30 00:02:22 +01:00
2019-03-26 19:55:33 +01:00
2019-09-14 18:57:35 -07:00
2019-08-01 16:51:53 +02:00
2019-08-02 16:20:22 +02:00
2020-01-12 23:41:55 -08:00
2018-10-29 09:55:07 +01:00
2018-10-29 10:01:44 +01:00
2018-10-29 10:01:44 +01:00
2018-10-29 10:01:44 +01:00
2018-10-29 10:01:44 +01:00
2018-10-29 10:01:44 +01:00
2019-08-02 16:20:22 +02:00
2018-10-29 10:01:44 +01:00
2018-10-29 10:01:44 +01:00
2018-10-29 10:01:44 +01:00
2018-10-29 10:01:44 +01:00
2019-07-29 20:50:07 +02:00
2018-10-29 10:01:44 +01:00
2018-10-29 10:01:44 +01:00
2018-10-29 10:01:44 +01:00
2018-10-29 10:01:44 +01:00
2018-10-29 10:01:44 +01:00
2018-10-29 10:01:44 +01:00
2019-08-02 16:20:22 +02:00
2018-10-29 10:01:44 +01:00
2018-10-29 10:01:44 +01:00
2018-10-29 10:01:44 +01:00
2019-09-12 17:04:05 -07:00
2018-10-29 10:01:44 +01:00
2018-10-29 10:01:44 +01:00
2019-03-26 19:55:33 +01:00
2018-10-29 10:01:44 +01:00
2019-08-01 16:51:53 +02:00
2019-08-02 16:20:22 +02:00
2019-08-01 23:27:26 +02:00
2019-11-25 01:08:02 -08:00