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.
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 + Fwould become the
Alt + 9shortcut
Ctrl + Alt + Shift + Fwould become the
Alt + Shift + 9shortcut
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
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.
October 2020and we still havent got the TOGGLE function that was brilliantly asked for by Joan Aranda in 2017.
I want to use
Alt+Cto Collapde/Uncollapse as a toggle function.
Would be so nice and easy!
Please implement this feature it will be small but huge benefit, we NotePad++ users will luv it.
So why no open bug for such posibility (if it doesn’t already exist)?
Come on, this feature is a no-brainer: makes toggling easier and saves on one unnecessary shortcut command… Please, please, please. Pretty please…
This is an easy one-line PythonScript solution:
Come on, this feature is a no-brainer:
Please, please, please. Pretty please…
As Arkadiusz implied two years ago, for a new request to have a chance of being implemented, someone has to create an issue in the location where Arkadiusz linked. No one had done that in between 2017 when this topic was started and 2020 when Arkadiusz replied, and no one has done that between 2020 when Arkadiusz provided the link and today. Oddly enough, if no one cares enough to actually follow well-documented instructions on how to make a feature request, then the development team isn’t going to have it in their tracker, so they will never implement it.
And no number of "please"s in this forum can change the fact that this forum is not the issue tracker, and that as a Community of fellow Notepad++ users, this forum cannot make changes to the Notepad++ codebase.
makes toggling easier and saves on one unnecessary shortcut command…
After you have created the macro described and assigned a shortcut, using a shortcut to run a macro command (or using the macro menu to run the macro command) is no different than using a keyboard shortcut or another menu to run a builtin command – they are equally easy.
This post is deleted!
@peterjones, I did, actually, right after posting here, should have come back to point it out, so no need for the telling-off in my case, I hope. While I was editing my post, I came up against a time limit, decided to delete and re-post in edited form but came up against another time limit for posting several times in a row. Bit of a catch-22 there…
I downloaded the PythonScript plugin and was able to set up a shortcut key to use the toggle. Great stuff!
so no need for the telling-off in my case,
It wasn’t meant as a telling off. You had provided useful information, then inexplicably (from my perspective) deleted it. Since it was 2 hours after you posted, I assumed you weren’t going to re-post. I had thought the information was useful enough that it warranted me posting the link. Sorry if you felt told-off.
Oh, maybe you meant my original message informing you that nothing can happen unless an issue is created? In which case, it wasn’t a telling off, but a frustrated response, because we often get situations like this: someone asks for a feature here, and then a year or two later, new users come by and tell us off for not fixing the bug or implementing the feature – when no one went to the effort to put in a feature request.
“Make fold/unfold current line commads togglable” is implemented here:
However, folding/unfolding toggling option is only available for
Collapse Current Levelcommand Ctrl+Alt+F (and for
Uncollapse Current Levelcommand Ctrl+Alt+Shift+F of course, but once this option is enabled, Ctrl+Alt+Shift+F is useless).
Collapse Level N&
Uncollapse Level Ncannot be toggled because the state of several levels cannot be determinated.
Here is a good example:
There are 4 level-2 tag under the root (level 1), 2 are expanded and 2 are collapsed. The result of using the toggle option on
Collapse Level 2Alt+2 will be confusing.
For the sake of consistence, folding toggle option is implemented for only one level.