Feature request: toggle expand/collapse



  • One of the feature I really like on Notepad++ is the ability to expand and collapse parts of my code. I work a lot with keyboard shortcuts so having such a helpful feature activated through shortcuts is great for me.

    However, having to click on four keys (ctrl+alt+shift+F) to unfold my current tag is uncomfortable when ctrl+alt+F does nothing at that point in time. I think it would be much faster and simpler to use if ctrl+alt+F becomes a toggle so it is able to expand or collapse the current level depending on its previous state. Being a “shortcut-aholic”, I can tell these tiny things really make a difference.

    Similarly, I’d suggest that this toggle behavior is expanded also to Alt+n shortcuts. I think it is much faster and usable to have Alt+n expanding or collapsing level “n” based on its previous state that having to press or unpress the shift key to perform that action. Anyway, my priority would be for ctrl+alt+F. Having to add a fourth key (shift), is a little bit too much.



  • Hello, Joan,

    Indeed, your toggle behaviour suggestion, would make collapsing/uncollapsing easier ;-))

    In the meantime, as a work-around, you could change, via the Shortcut Mapper, the shortcuts, regarding folding/unfolding the current level :

    • Ctrl + Alt + F would become the Alt + 9 shortcut

    • Ctrl + Alt + Shift + F would become the Alt + Shift + 9 shortcut

    Best Regards,

    guy038



  • Mmm… Nice suggestion. Thank you. Anyway, I think that what makes the real difference is to add the capabity to enable the shortcuts currently set only to fold levels also to unfold them. Using them as a toggle, would be great! :D :D :D



  • Hi again,

    Any update on this? Using Alt+n and Ctrl+Alt+F both to fold and unfold looks much more natural to me that having to press also the shift key when I want to unfold. These combinations could work perfectly as toggles, reducing the number of keys to press simultaneously to unfold, and not having to even move your fingers when you quickly expand and collapse again a certain fold level.

    Thanks.