6

I find the collapse level (Alt+1, Alt+2, etc) functionality of Notepad++ extremely handy, but only the first level (Alt+1) seems to work for Python code. Manually collapsing a single code block works fine at any level, so it's not like Notepad++ can't handle the indentation-driven syntax.

Does anyone know of a plugin or maybe a setting I missed that would allow this functionality?

2 Answers 2

4

I did this to "Settings->shortcut mapper", and you have to do is "alt+1+2" (without releasing alt) all function of a class is collapsed Shortcut Mapper

tecnically is fold all then unfold 1st level

Sign up to request clarification or add additional context in comments.

3 Comments

This is a really neat solution. I altered it a little to use Alt+~ for Fold All, leaving 1-9 to map to the corresponding level while still keeping everything within easy reach. Thanks!
well it seems useless because that is a bugs of notepad++ that cannot fold/unfold level 2 and up, this is the ticket ehc.ac/p/notepad-plus/bugs/2601
Hahaha. Well, we get one extra level of folding out of it at least :).
2

You're right. Python collapse by shortcuts is only at level 1. There isn't any visible setting to fix that. Browsing at plugins page I didn't found anything. Maybe that folding issue is a bug. I suggest you to use Support & online help to get an explanation and/or solution, or submit a bug report if you can't find that.

2 Comments

It turns out there is an open bug report (actually, two) regarding this issue. Thanks.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.