Find in selected text.
-
Expected action of
- select text
- 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?
-
what about using the mark dialog?
Here you can specify that it should be marked only inside the selected text.Cheers
Claudia -
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.
-
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.?
-
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 -
@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…
-
Hi, @Scott-sumner,
As for me, Scott, the
Ctrl + Shift + 0
shortcut works as expected ! Just a remark : After several hits on theCtrl + 0
shortcut, I noticed that the FIRSTCtrl + 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