• Login
Community
  • Login

ALT+mouse selection change

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
6 Posts 4 Posters 1.1k 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.
  • D
    DotUniverse
    last edited by Jun 2, 2024, 10:44 AM

    Hello,

    I have recently install a new version of Notepadd++ and found out to unable to do ALT+mouse selection as it was before.

    The problem is when I select multiple liens with ALT and than select to copy them side by side (so I can do things like ‘cp’ in bash). Instead of doing them with same indent as it was before now it paste right after one another:

    Current:
    Current version

    Previous (expected):
    alt text

    Also, in my project I have every lines of different length.

    Debug info:
    Notepad++ v8.6.5 (64-bit)
    Build time : Mar 29 2024 - 17:04:43
    Path : C:\Programs\Office\Notepad++\notepad++.exe
    Command Line :
    Admin mode : ON
    Local Conf mode : OFF
    Cloud Config : OFF
    Periodic Backup : ON
    OS Name : Windows 11 Pro (64-bit
    OS Version : 23H2
    OS Build : 22631.3593
    Current ANSI codepage : 1252
    Plugins :
    mimeTools (3.1)
    NppConverter (4.6)
    NppExport (0.4)

    W A C 3 Replies Last reply Jun 2, 2024, 12:25 PM Reply Quote 0
    • W
      wonkawilly @DotUniverse
      last edited by Jun 2, 2024, 12:25 PM

      @DotUniverse
      Hi, try the following:
      Column - select (Alt+left-click and mouse drag) or, in alternative, use Shift+Alt+[Left or Right or Up or Down] Arrow Keys on the computer keyboard, to select the text in column mode:
      Items1
      Items1
      Items1
      At this point you should have your column of text selected: when you’re satisfied with your column selection, hit Ctrl+d to duplicate the selected column at the right side of the existing selection.
      Then to add a tab into the appropriate point to separate the first column from the second column you just added, do the following (You still have the first column selected):
      press Right Arrow key on the keyboard (this will deselect the original column but will keep the caret on all lines in the right spot)
      then
      press Tab key on the keyboard to add a Tab and separate the first column form the second.

      1 Reply Last reply Reply Quote 0
      • A
        Alan Kilborn @DotUniverse
        last edited by Jun 2, 2024, 12:31 PM

        @DotUniverse

        I don’t think @wonkawilly 's response will satisfy you.

        It seemed easy for me, here’s what I did:

        Started with:

        Item1
        Item2
        Item3
        Item4
        Item5
        Item6
        

        Held Alt while selecting with mouse:

        8913389e-929f-4e1f-8c3f-6d4f5e86f8b3-image.png

        Execute a Copy

        Alt+click on line 1, some distance beyond the end of the line:

        a06378bf-08f4-48ec-9264-9dc58dabcfae-image.png

        Execute a Paste to get:

        2fad7ac2-8ed6-440e-a79b-2a2a5dc05541-image.png

        W 1 Reply Last reply Jun 2, 2024, 12:49 PM Reply Quote 1
        • W
          wonkawilly @Alan Kilborn
          last edited by wonkawilly Jun 2, 2024, 12:59 PM Jun 2, 2024, 12:49 PM

          @Alan-Kilborn @DotUniverse

          @DotUniverse If you like to use the @Alan-Kilborn procedure that works pretty well too, first you need to go to Settings > Preferences > Editing 1 and check (if it is not) the checkbox for Enable virtual space: in fact if it checked the @Alan-Kilborn procedure will work great and will allow you to add even more distance (with space chars) all at once.

          Such an option in fact basically is similar to enable editing in the point of the dblclick in MSWord: that adds newlines and space at any point in the page where the user double-clicks, with the difference that the one in N++ will only automatically add spaces to existing lines but will not create new lines.
          Since N++ comes with that option checked and active by default, (as MSWord), if you have just installed N++ and not customized it, you are good to go.

          A 1 Reply Last reply Jun 2, 2024, 12:51 PM Reply Quote 0
          • A
            Alan Kilborn @wonkawilly
            last edited by Jun 2, 2024, 12:51 PM

            @wonkawilly said in ALT+mouse selection change:

            first you need to go to Settings > Preferences > Editing 1 and check the checkbox for Enable virtual space

            No, for the procedure I gave you do NOT need to do this first.

            1 Reply Last reply Reply Quote 1
            • C
              Coises @DotUniverse
              last edited by Coises Jun 2, 2024, 6:24 PM Jun 2, 2024, 6:22 PM

              @DotUniverse said in ALT+mouse selection change:

              Current:
              Current version

              Previous (expected):
              alt text

              There was a change in behavior when pasting into a rectangular selection (including a zero-width selection) beginning with Notepad++ version 8.6.1.

              I’m guessing that you made a rectangular selection of Item1-Item3 in the first column, copied, then made an empty selection three lines deep where you wanted to paste them, and pasted.

              Previously, Notepad++ (using default Scintilla behavior) would have filled in the virtual space between the end of existing lines and the place where you indicated to paste. Notepad++ now treats the rectangular selection the same way as it would a multiple selection, and “collapses” the virtual space.

              If the lines you paste are of different lengths (so that the rectangular selection before you copy includes virtual space), you’ll wind up with a zero-width “rectangular” selection in which the carets do not line up. Switching to another tab and back will leave you with a rectangular selection that seems barely related to anything.

              See these GitHub issues:

              https://github.com/notepad-plus-plus/notepad-plus-plus/issues/15139

              https://github.com/notepad-plus-plus/notepad-plus-plus/issues/15151

              for some of the oddities encountered.

              The solution for users, for now, is that if you want the familiar behavior when pasting rectangular selections, do not paste into a rectangular selection; instead, just click at the top of the column where you want to paste. This operation still works the same as it always did, which is to insert the copied selection line by line into the document at the same column as the cursor.

              Pre-8.6.1, all pasting a copied rectangular selection into a rectangular selection did was to delete the contents of the rectangular selection, then paste as if there were an empty selection (i.e., just a caret) at the top of the deleted section. It did not matter how deep the selection was; it just deleted it and then inserted the new text (which could be fewer, the same or more lines than the deleted selection). The new behavior has so many oddities — if you are used to rectangular selections — that it’s easiest just to do the delete and reposition the cursor if you need to, then paste.

              1 Reply Last reply Reply Quote 2
              • C Coises referenced this topic on Jun 3, 2024, 12:30 AM
              • C Coises referenced this topic on Jun 4, 2024, 1:32 PM
              4 out of 6
              • First post
                4/6
                Last post
              The Community of users of the Notepad++ text editor.
              Powered by NodeBB | Contributors