Shell functions which names begin with do are not folded with foldmethod=syntax.
function foo() { # - OK: fold lv.1 return 0 # | } # | until here function dofoo() { # - NG: fold lv.1 expected, but unfolded return 0 # | } # | until here
shFunction{Two,Four} are supposed to be excluding functions named doFOOBAR.
https://github.com/vim/vim/blob/b8b7df29c418b93fa3d8607ae22f10701fa168d6/runtime/syntax/sh.vim#L653-L683
In bash, function doFOOBAR does work, at least.
If the region patterns just expect to avoid do ... done, the part \%(do\) shouldn't be something else?
(\%(\<do\>\)\@! or such, maybe.)
Functions named doFOOBAR() are folded.
9.1.1997-1
Operating system: Windows 11 25H2 [Version 10.0.26200.7462] (msys2-runtime 3.6.5-1)
Terminal: xterm-256color
Shell: bash
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
Thank you for the patch!
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()