How can I fold every line with the same indentation as the current line (the line the cursor is on) using manual fold in vim?
Basically, sometimes I need Vim to fold things just as Vim would do when
foldmethod=indent, but I prefer work with
foldmethod=manual and won't
function f(x) while (x > a) foo = bar someStuff() // suppose cursor is here x = foo + a end if (x < b) x = b // this line should not be indented end end
In this case, it should fold lines
foo = bar to
x = foo + a.