When programming in PyCharm, I scroll a source file up and down, and some piece of code is long enough and it disturbs my attention. Example of code:
some code
some code
...
some upper code at same level
if somecond:
dothis
dothis
elif somecond:
dothis
dothis
elif somecond:
dothis
dothis
some downer code at same level
...
some code
some code
That part with if ... elif ... elif
is what I want to fold. I can fold individually each piece (if
, elif
, and another elif
), but I want to be able to fold them at onece. The problem is that this is arbitrary block of code, there is a code at up and down at the same indent level.
I can write the vim fold markers:
some code
some code
...
some upper code at same level
# {{{ The conditions for dothis
if somecond:
dothis
dothis
elif somecond:
dothis
dothis
elif somecond:
dothis
dothis
# }}}
some downer code at same level
...
some code
some code
And when working with Kate editor, I can fold them. It looks like this:
some code
some code
...
some upper code at same level
# {{{ The conditions for dothis ... }}}
some downer code at same level
...
some code
some code
But in PyCharm, at such markers there is no folding button.
Is it possible to fold vim fold markers in PyCharm? I seached in plugins store, and at the moment (may 2023) did not found such plugin.