Community
    • Login

    CTRL+D gives selection not line

    Scheduled Pinned Locked Moved General Discussion
    9 Posts 3 Posters 891 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.
    • Paul WormerP
      Paul Wormer
      last edited by

      My Shortcut mapper defines CTRL+D as SCI_SELECTIONDUPLICATE and not as SCI_LINEDUPLICATE, whereas the edit menu defines CTRL+D as “Duplicate Current Line” (see the screen shot). I find this somewhat confusing, because CTRL+D indeed duplicates a selection and not necessarily the current line.

      51191389-da7b-4144-92ff-5dad7da493b8-afbeelding.png

      Alan KilbornA 1 Reply Last reply Reply Quote 0
      • Alan KilbornA
        Alan Kilborn @Paul Wormer
        last edited by Alan Kilborn

        @Paul-Wormer

        For some related discussion, see this N++ issue:

        #5298: Shortcut and menu command mismatched mapping for SCI_SELECTIONDUPLICATE and SCI_LINEDUPLICATE.

        Paul WormerP 1 Reply Last reply Reply Quote 1
        • Paul WormerP
          Paul Wormer @Alan Kilborn
          last edited by Paul Wormer

          @Alan-Kilborn Thank you. Two questions:

          • How do you remember all this?
          • The problem that you signaled as long ago as February 2019 has not been solved yet, do you know why?

          For the time being I assigned sci_lineduplicate to ctrl+d, because the action agrees more with what I was used to.

          Neil SchipperN Alan KilbornA 3 Replies Last reply Reply Quote 1
          • Neil SchipperN
            Neil Schipper @Paul Wormer
            last edited by Neil Schipper

            @Alan-Kilborn @Paul-Wormer

            I just contributed to that Issue:

            ====

            The present behavior of SCI_DUPLICATESELECTION (default Ctrl+d) :

            • If text is selected, dup it
            • Else, dup the line containing the caret

            is excellent.

            I recommend that the menu invocation be changed to do the same, and that it’s description be changed to:

            Duplicate Current Selection XOR Line
            

            I can imagine a user selecting either text on a line or text spanning multiple lines, and then wanting/needing to dup only the line containing the caret, but only when the bluest of blue moons is floating in the night sky.

            Paul WormerP 1 Reply Last reply Reply Quote 1
            • Alan KilbornA
              Alan Kilborn @Paul Wormer
              last edited by

              @Paul-Wormer said in CTRL+D gives selection not line:

              The problem that you signaled as long ago as February 2019 has not been solved yet, do you know why?

              Developers have a lot to do; have you seen the number of “open” issues?

              Out of the open issues, they pick and choose what to work on. Obviously, they only work on what is interesting to them.

              Apparently this issue is not interesting to them.

              1 Reply Last reply Reply Quote 1
              • Alan KilbornA
                Alan Kilborn @Paul Wormer
                last edited by

                @Paul-Wormer said :

                How do you remember all this?

                Hmm, not sure.
                My son says I can’t remember stuff that was said last week.
                Of course he gets bad grades in math because he “can’t learn” the techniques…but he knows every little detail about the latest apple phone.
                Maybe it’s about what’s important to you…

                1 Reply Last reply Reply Quote 1
                • Paul WormerP
                  Paul Wormer @Neil Schipper
                  last edited by

                  @Neil-Schipper I did not know that sci_selectionduplicate had the double functionality that you describe. Now that I know it, I set ctrl+d back to it. I agree with you that the description in the popup menu should mention both functions.

                  Alan KilbornA 1 Reply Last reply Reply Quote 2
                  • Alan KilbornA
                    Alan Kilborn @Paul Wormer
                    last edited by Alan Kilborn

                    @Paul-Wormer said in CTRL+D gives selection not line:

                    I did not know that sci_selectionduplicate had the double functionality that you describe

                    Many commands have slightly different functionality if a selection is active (or not) when invoked. Somewhat obviously, the command functionality involves the selection if one is active, typically limiting the command to operating on only the selection.

                    the description in the … menu should mention both functions

                    It might be cumbersome visually to see both types of functionality expressed in menu text.

                    1 Reply Last reply Reply Quote 0
                    • Alan KilbornA Alan Kilborn referenced this topic on
                    • Alan KilbornA
                      Alan Kilborn
                      last edited by

                      Some further discussion on this topic is HERE.

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