Community
    • Login

    Find in selected text.

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    7 Posts 4 Posters 6.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.
    • minsikauM
      minsikau
      last edited by

      Expected action of

      1. select text
      2. control+F to find, type in search text,
        any mode does not appear to search in selected text.
        This is what i would have expected to be a basic action and it seems strange to not find anything. any clues on how to make this happen?
      Claudia FrankC Scott SumnerS 2 Replies Last reply Reply Quote 0
      • Claudia FrankC
        Claudia Frank @minsikau
        last edited by

        @minsikau

        what about using the mark dialog?
        Here you can specify that it should be marked only inside the selected text.

        Cheers
        Claudia

        1 Reply Last reply Reply Quote 1
        • Scott SumnerS
          Scott Sumner @minsikau
          last edited by

          @minsikau

          Probably the reason you can’t do a “find in selected text” is that Find Next / Replace uses the selection capability of the editor to show you the found match. Thus you couldn’t “walk through” your in-selection matches one at a time. Well I suppose you could if Notepad++ remembered where your original selection was before starting its work, but your original selection couldn’t be shown to you so that you’d remember what you searched over (maybe that is important, maybe not).

          One could argue that you should be able to do a Find-All-in-Current-Selection (such that the selection is kept and the results of the search appear in the Find result panel) and I would agree strongly with that.

          @Claudia-Frank 's suggestion about red-marking in-selection only is pretty good.

          What I sometimes do is take note of the line number range for the “selection” I want searched. Then I do a Find All In Current Doc. The line numbers appear in the Find-result panel and I do a mental filter to view (in my mind) only the line number range I took note of. It is rather a pain, but it does work.

          Another thing you could do is copy the selection to a New file and search THAT. This is not a great approach, but it can fit certain circumstances.

          1 Reply Last reply Reply Quote 1
          • minsikauM
            minsikau
            last edited by

            thanks to all replies.

            likely the mark will do it but then need a quick key for next mark and previous mark? I cant see that as default maybe need to set per user.?

            Claudia FrankC 1 Reply Last reply Reply Quote 0
            • Claudia FrankC
              Claudia Frank @minsikau
              last edited by

              @minsikau

              likely the mark will do it but then need a quick key for next mark and previous mark?

              the normal find key should work F3 and Shift+F3

              Cheers
              Claudia

              1 Reply Last reply Reply Quote 0
              • Scott SumnerS
                Scott Sumner
                last edited by

                @minsikau

                @Claudia-Frank 's F3 and Shift+F3 suggestion works for the most-recent search/redmarking. However, if you want to do other searches and then later find the redmarked text, or if you want to redmark the results from several searches and then be able to quickly find ANY of them, use these 2 menu commands:

                • Search (menu) -> Jump Up -> Find Style
                • Search (menu) -> Jump Down -> Find Style

                These commands will move your caret from its current position to the nearest redmarked text in the appropriate direction.

                The jump-down version has a default keycombo of Ctrl+0 (that’s zero) and that works, however jump-up’s default of Shift+Ctrl+0 curiously doesn’t seem to work for me (32-bit N++ 7.5.4). If it doesn’t work for you, and you want it to, try reassigning that function to something else using the shortcut mapper…

                1 Reply Last reply Reply Quote 1
                • guy038G
                  guy038
                  last edited by

                  Hi, @Scott-sumner,

                  As for me, Scott, the Ctrl + Shift + 0 shortcut works as expected ! Just a remark : After several hits on the Ctrl + 0 shortcut, I noticed that the FIRST Ctrl + Shift + 0 action, moves cursor from the end to the beginning of the current marked range selected :-))

                  And later hits on Ctrl + Shift + 0 matches, in upwards direction, previous marked zones, with the caret, normally, at beginning of each selection !

                  Cheers,

                  guy038

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