• Login
Community
  • Login

CTRL+D gives selection not line

Scheduled Pinned Locked Moved General Discussion
9 Posts 3 Posters 990 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.
  • P
    Paul Wormer
    last edited by Nov 24, 2022, 3:15 PM

    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

    A 1 Reply Last reply Nov 24, 2022, 4:40 PM Reply Quote 0
    • A
      Alan Kilborn @Paul Wormer
      last edited by Alan Kilborn Nov 24, 2022, 4:40 PM Nov 24, 2022, 4:40 PM

      @Paul-Wormer

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

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

      P 1 Reply Last reply Nov 24, 2022, 4:50 PM Reply Quote 1
      • P
        Paul Wormer @Alan Kilborn
        last edited by Paul Wormer Nov 24, 2022, 4:50 PM Nov 24, 2022, 4:50 PM

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

        N A 3 Replies Last reply Nov 24, 2022, 5:49 PM Reply Quote 1
        • N
          Neil Schipper @Paul Wormer
          last edited by Neil Schipper Nov 24, 2022, 5:50 PM Nov 24, 2022, 5:49 PM

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

          P 1 Reply Last reply Nov 25, 2022, 12:18 PM Reply Quote 1
          • A
            Alan Kilborn @Paul Wormer
            last edited by Nov 24, 2022, 7:56 PM

            @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
            • A
              Alan Kilborn @Paul Wormer
              last edited by Nov 24, 2022, 11:09 PM

              @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
              • P
                Paul Wormer @Neil Schipper
                last edited by Nov 25, 2022, 12:18 PM

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

                A 1 Reply Last reply Nov 25, 2022, 1:52 PM Reply Quote 2
                • A
                  Alan Kilborn @Paul Wormer
                  last edited by Alan Kilborn Nov 25, 2022, 1:54 PM Nov 25, 2022, 1:52 PM

                  @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
                  • A Alan Kilborn referenced this topic on Oct 19, 2023, 11:09 PM
                  • A
                    Alan Kilborn
                    last edited by Oct 22, 2023, 4:21 PM

                    Some further discussion on this topic is HERE.

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