Community
    • Login

    [New Plugin] BetterMultiSelection

    Scheduled Pinned Locked Moved Notepad++ & Plugin Development
    14 Posts 7 Posters 8.3k 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.
    • dailD
      dail
      last edited by

      @OverlordBR

      I’m glad you are finding it useful.

      From the gif it looks like this is correct behavior. By default Notepad++ does not treat $ and @ as “word characters”. If you are able, you can verify that this is just Notepad++ behavior by placing only 1 cursor in the file on line 3 and performing the same cursor movements.

      1 Reply Last reply Reply Quote 1
      • OverlordBRO
        OverlordBR
        last edited by

        Oh… you are right! Notepad++ has the same behavior. :(

        1 Reply Last reply Reply Quote 0
        • OverlordBRO
          OverlordBR
          last edited by

          @dail

          i only saw the latest version of your plugin now (it didn’t show on Plugin Manager’s updates tab)
          but… the new feature of “press Enter to insert newlines” works great and is super useful!

          Thank you!

          1 Reply Last reply Reply Quote 0
          • E. de MiguelE
            E. de Miguel
            last edited by

            Hi! excellent one, but I will love to have multi carets selected with Shift+ALT working like the multi-carets we get with CTRL+click.

            Example: I have 200 hundred lines and I want to add some text at the end of each line. I would love to multi-select all the lines with Shift+Alt and press End to go till the end of all selected lines with the carets enabled yet (now the N++ loses those multi-carets) .

            I know I can do this doing 200 Ctrl+click, but it’s a bit time consuming.

            Another way can be to do a search and replace of the end of the line, but If I only want to do that on a little section of the file I need to do the search and replace controlled by line, clicking on replace on each line I want to do the change.

            PeterJonesP Alan KilbornA astrosofistaA 4 Replies Last reply Reply Quote 0
            • PeterJonesP
              PeterJones @E. de Miguel
              last edited by

              @E-de-Miguel said in [New Plugin] BetterMultiSelection:

              Hi! excellent one, but I will love to have multi carets selected with Shift+ALT working like the multi-carets we get with CTRL+click.

              Shift+Alt is not multi-select; it is column select, which is a different selection feature, and the END key will not work the same as multi-select.

              Another way can be to do a search and replace of the end of the line, but If I only want to do that on a little section of the file I need to do the search and replace controlled by line, clicking on replace on each line I want to do the change.

              I don’t know if you’re interested in workarounds:

              • You could temporarily copy that “little section” into a temporary document, do the search and replace, then paste it back in the real document.
              • You could temporarily add in some sort of STARTBLOCK and ENDBLOCK indicators, and develop a regex that would only work between those indicators. If you want to go this route, let us know, and one of the regex experts should likely step in and suggest an implementation.
              PeterJonesP 1 Reply Last reply Reply Quote 0
              • PeterJonesP
                PeterJones @PeterJones
                last edited by

                @E-de-Miguel ,

                I just thought of another alternative: Make your normal selection of all 200 lines (or whatever), then in the Replace dialog, enable the In Selection checkbox. now the search/replace will only affect lines in your active selection.

                1 Reply Last reply Reply Quote 0
                • Alan KilbornA
                  Alan Kilborn @E. de Miguel
                  last edited by

                  @E-de-Miguel said in [New Plugin] BetterMultiSelection:

                  Example: I have 200 hundred lines and I want to add some text at the end of each line. I would love to multi-select all the lines with Shift+Alt and press End to go till the end of all selected lines with the carets enabled yet (now the N++ loses those multi-carets) .

                  I have no problem doing this (with BetterMultiSelection installed and enabled). I make a column-block on (any) parts of all the lines I want to affect – doesn’t have to be something that boxes in the entire line – and then I press the End key and blammo! – I get a bunch of carets at the end of each individual line.

                  dailD 1 Reply Last reply Reply Quote 3
                  • Alan KilbornA
                    Alan Kilborn @E. de Miguel
                    last edited by Alan Kilborn

                    @E-de-Miguel said in [New Plugin] BetterMultiSelection:

                    Another way can be to do a search and replace of the end of the line, but If I only want to do that on a little section of the file I need to do the search and replace controlled by line, clicking on replace on each line I want to do the change.

                    I don’t have any trouble doing this sort of thing, either.
                    This time I don’t even use features of the Better Multiselection plugin.
                    Just stream (not-column) select the lines you want to effect, and then when you run the replacement operation (presumably using the $ assertion), tick the In Selection checkbox so that the replacement only affects the pre-selected lines. Requires Replace All not Replace though.

                    Regarding “clicking replace on each line” – that part doesn’t make sense, because you start out talking about getting a caret at the end of each line to add/remove some text, but now you are talking about selectively choosing which lines you’d want to modify. Which is it, all or individually…you can’t have it both ways.

                    Plus if you want to make a decision on each line, just stop when you are past the point (presumably of the original block you were talking about making) where you want to affect.

                    Bottom line is I see no real difficulty in achieving the goals here.

                    1 Reply Last reply Reply Quote 1
                    • astrosofistaA
                      astrosofista @E. de Miguel
                      last edited by

                      Hi @E-de-Miguel,

                      As @Alan-Kilborn and @PeterJones told you, the BetterMultiSelection plugin works as you were wishing. If you still are not convinced, please take a look at these animations and follow the instructions to better grasp how the plugin works

                      https://community.notepad-plus-plus.org/post/53667
                      https://community.notepad-plus-plus.org/post/54925
                      https://community.notepad-plus-plus.org/post/51906
                      https://community.notepad-plus-plus.org/post/53168 (explanation)
                      https://community.notepad-plus-plus.org/post/51915
                      https://community.notepad-plus-plus.org/post/51786

                      Take care and have fun!

                      1 Reply Last reply Reply Quote 4
                      • dailD
                        dail @Alan Kilborn
                        last edited by

                        @Alan-Kilborn said in [New Plugin] BetterMultiSelection:

                        @E-de-Miguel said in [New Plugin] BetterMultiSelection:

                        Example: I have 200 hundred lines and I want to add some text at the end of each line. I would love to multi-select all the lines with Shift+Alt and press End to go till the end of all selected lines with the carets enabled yet (now the N++ loses those multi-carets) .

                        I have no problem doing this (with BetterMultiSelection installed and enabled). I make a column-block on (any) parts of all the lines I want to affect – doesn’t have to be something that boxes in the entire line – and then I press the End key and blammo! – I get a bunch of carets at the end of each individual line.

                        @E-de-Miguel

                        @Alan-Kilborn is describing the expected behavior and I also do this frequently.

                        1 Reply Last reply Reply Quote 2
                        • Nick KatN Nick Kat referenced this topic on
                        • First post
                          Last post
                        The Community of users of the Notepad++ text editor.
                        Powered by NodeBB | Contributors