reddit / emacs

hs-minor-mode: Unfold only one level of python code

wWA5RnA4n2P3w2WvfHq · 2022-10-27 20:15
I have a folded Python code like this class Foo:... I want to unfold it like this class Foo: def foobar(self):... def hello_world(self):... But what I got is that all existing levels are unfolded like this class Foo: def foobar(self): x = 1 + 2 return x def hello_world(self): print('hello world') I'm using \`evil\` and the \`z\` + \`a\` (invokes \`evil-toogle-fold\`) for this. I don't know if there is another way to unfold only one level.
Craksy · 2022-10-28 05:30
`z r` will reduce folding by one level. Often I just move into the folds to open them though. I don't recall if I have any additional config to make this behave as you'd expect though