• Login
Community
  • Login

Feature request: toggle expand/collapse

Scheduled Pinned Locked Moved General Discussion
shortcutcollapsenew functionskeyboardexpand
15 Posts 8 Posters 11.5k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A
    ArkadiuszMichalski
    last edited by Oct 1, 2020, 9:47 AM

    So why no open bug for such posibility (if it doesn’t already exist)?
    https://github.com/notepad-plus-plus/notepad-plus-plus/issues

    1 Reply Last reply Reply Quote 1
    • P
      P Cooper
      last edited by Apr 13, 2022, 12:02 PM

      Come on, this feature is a no-brainer: makes toggling easier and saves on one unnecessary shortcut command… Please, please, please. Pretty please…

      A P 2 Replies Last reply Apr 13, 2022, 12:51 PM Reply Quote -2
      • A
        Alan Kilborn @P Cooper
        last edited by Apr 13, 2022, 12:51 PM

        This is an easy one-line PythonScript solution:

        editor.toggleFold(editor.lineFromPosition(editor.getCurrentPos()))

        1 Reply Last reply Reply Quote 3
        • P
          PeterJones @P Cooper
          last edited by Apr 13, 2022, 1:21 PM

          @p-cooper said in Feature request: toggle expand/collapse:

          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.

          P P 2 Replies Last reply Apr 18, 2022, 11:57 AM Reply Quote 3
          • P
            P Cooper @PeterJones
            last edited by Apr 18, 2022, 11:57 AM

            This post is deleted!
            1 Reply Last reply Reply Quote 0
            • P
              PeterJones @PeterJones
              last edited by Apr 18, 2022, 2:12 PM

              For future readers, @P-Cooper briefly posted here (then deleted) a link to an issue that was created to request this: issue #11529

              I am not sure why that post was deleted. Because that feature request does exist, and it does describe what was complained about in this post.

              P 1 Reply Last reply Apr 18, 2022, 3:48 PM Reply Quote 2
              • P
                P Cooper @PeterJones
                last edited by Apr 18, 2022, 3:48 PM

                @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…

                A native command will still be much more accessible to users, but thanks very much, @Alan-Kilborn for providing the code and @peterjones for adding info on how to get it working.

                I downloaded the PythonScript plugin and was able to set up a shortcut key to use the toggle. Great stuff!

                P 1 Reply Last reply Apr 18, 2022, 3:58 PM Reply Quote 2
                • P
                  PeterJones @P Cooper
                  last edited by PeterJones Apr 18, 2022, 4:00 PM Apr 18, 2022, 3:58 PM

                  @p-cooper said in Feature request: toggle expand/collapse:

                  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.

                  1 Reply Last reply Reply Quote 3
                  • D
                    donho @Joan Aranda
                    last edited by donho May 19, 2022, 4:39 PM May 19, 2022, 4:24 PM

                    “Make fold/unfold current line commads togglable” is implemented here:
                    https://github.com/notepad-plus-plus/notepad-plus-plus/pull/11699

                    However, folding/unfolding toggling option is only available for Collapse Current Level command Ctrl+Alt+F (and for Uncollapse Current Level command Ctrl+Alt+Shift+F of course, but once this option is enabled, Ctrl+Alt+Shift+F is useless).

                    Fold All, Unfold All, Collapse Level N & Uncollapse Level N cannot be toggled because the state of several levels cannot be determinated.

                    Here is a good example:

                    ec0093ac-7905-4aba-ab3e-5944a04614cc-image.png

                    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 2 Alt+2 will be confusing.

                    For the sake of consistence, folding toggle option is implemented for only one level.

                    P 1 Reply Last reply Jun 3, 2022, 4:57 PM Reply Quote 3
                    • D donho referenced this topic on May 19, 2022, 4:40 PM
                    • P
                      PeterJones @donho
                      last edited by Jun 3, 2022, 4:57 PM

                      Since he didn’t mention the version number, I thought I’d chime in and say that the code fix that Don linked to was included in v8.4.2, so it is now readily available for download.

                      1 Reply Last reply Reply Quote 0
                      • First post
                        Last post
                      The Community of users of the Notepad++ text editor.
                      Powered by NodeBB | Contributors