Page 1 of 1
Problem with search & replac on selected text
Posted: Tue Dec 28, 2004 1:17 am
by Thad Smith
I am running TP 4.7.2. If I select a block of text, open Seach and Replace window, enter Find and Replace strings, then select Scope:Selected text, the Find Next button is greyed out. It should be active, allowing me to find the first occurrance in the selected text.
Thad
Posted: Fri Feb 18, 2005 11:33 pm
by dougwong55
I believe this is the expected, though annoying, behavior. If you do not have any text selected and perform a Search and Replace, TextPad highlights the found text. This allows you to confirm each replacement individually. When there is a selection, the selected text is highlighted and there is no way to distiguish between the found text and the selected text. I would think a solution would be to have two different highlighting colors, one for the selection and the other for the found text.
Posted: Sat Feb 19, 2005 10:48 am
by Lostgallifreyan
There's an easy and very fast way round this one.
Select lines.
While holding Ctrl, press C N V Home.
Press F8, do the manual search/replace you want, then press Esc to close the dialog.
While holding Ctrl, press A C Tab V.
If you do this a lot you might want to close temporary documents to avoid growing clutter.
It's almost as easy with block select (Alt and drag to select), but remember to select the same way before pasting back.
This has the advantage that you can't accidentally change stuff elsewhere in the main file (as might happen if the selection got disturbed), in fact nothing gets changed till the edited transplant is complete and pasted back.
Posted: Mon Feb 21, 2005 3:46 pm
by Thad Smith
Lostgallifreyan wrote:There's an easy and very fast way round this one.
Select lines.
While holding Ctrl, press C N V Home.
Press F8, do the manual search/replace you want, then press Esc to close the dialog.
While holding Ctrl, press A C Tab V.
Thanks, Mr. Lostfallifreyan!
My previous editor was TSE (ne Semware QEDit), which allows selective replacement within a block. The block gives insurance against changing elesewhere, as you note. It would be nice, though, to have this feature built in.
Thad