Jump back to relevant section after prompted find/replace overshoots?
-
-
I think the OP meant “replace”, not “find/replace”. because shift+f3 (find previous) works for the “find” case. But if you replace the find text with something else, doing a find-previous moves you to a different place, not where I think the OP is trying to “jump back to” (nearby to the last replacement made). Does this make sense?
-
UNDO (Ctrl-Z)
Then REDO (CTRL-Y) the replace and the caret stays there. -
Scott, yes, makes sense to me ;-)
Cheers
Claudia -
Regardless, I see @gstavi has a solution that I didn’t think of – I upvoted! :-)
-
@Scott-Sumner - me too :-D
Cheers
Claudia -
I always use it to go back to the last place I edited after browsing around the file.
-
Okay, so this new thing (to me, at least) that I discovered is unrelated, but I think it may fall into the same category of handy tips just like the above-discussed UNDO+REDO thing…and it is sort of similar (do an action, then reverse it).
Often I want to make a selection of whole lines with the mouse. More often than not, my code is indented quite a bit, making it uncertain that I am beginning my selection on the correct line when I click and drag on the line numbers in the margin (far away horizontally from the non-whitespace code). Sometimes I miss the correct line and have to start the selection over again. A minor frustration.
I found that if I make a selection that includes a PARTIAL first line (convenient because I can start the selection AT my indented code), any number of full lines, and then a PARTIAL last line…then press Tab, then Shift+Tab (this part reminded me of the UNDO+REDO thing)…I get a selection of complete lines which includes the WHOLE first and last lines (remember that these started out as partial lines).
Perhaps this technique will be useful to someone else…
-
Nice trick - indeed.
Cheers
Claudia -
This (PARTIAL lines selection -> Tab -> Shift+Tab -> FULL lines selection) may not be such a great thing after all. After using it in an editing session, and sometimes much later, when doing an unrelated Delete Line operation (via the Delete Line shortcut key, with no selection active), some odd behavior occurs: the wrong line is deleted, I get TWO carets in odd places (I have Multi-Editing enabled)… If I narrow down further what is actually going on, I’ll post here again, but for now: beware of this tip! : (