Type some text, with some lines extremely long, beyond the screen.
set nowrap set foldmethod=expr set foldexpr='>1'
You should see some lines are folded, and each of those folded lines can unfold to a single line. If not, fold all by zM
No lines become foldable.
I can see why they are foldable. If you set wrap, long lines wrap to multiple lines, so they becoming foldable is reasonable. But with set nowrap, it makes no sense to make long lines foldable, as you will be folding single line into single line.
9.2 (2026 Feb 14) included patches 1-849
Arch Linux
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
This behaviour is controlled by the 'foldminlines' option. I can see that it might be unintuitive for non-wrapped lines however.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
This behaviour is controlled by the 'foldminlines' option. I can see that it might be unintuitive for non-wrapped lines however.
'foldminlines' also changes how other folds behave. E.g. you have a foldexpr control the folding behavior, and then non-wrapped long lines become foldable regardless of foldexpr results. Setting 'foldminlines' affects both the foldexpr-specified folds and non-wrapped-long-line folds.
And, there is no single value to set 'foldminlines' to that can achieve desired behavior. When resizing the window, the same line may wrap to 3, 4, or more screen lines depending on the window width, and 'foldminlines' will consult the number of wrapped lines, even if we set nowrap.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
It would be great (though this would be a feature request) if we have an option, that can disable wrapped lines becoming foldable automatically even with set wrap. Now that we are specifying folds manually by foldexpr, I would expect we can have the option to disable all the "baked-in mechanisms" of internal folds.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()