The Scope of Search and Replace

Ideas for new features

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply

Should the default scope for search and replace when text is highlighted be Selected Text regardless of the presence of a newline character?

Poll ended at Sat Sep 06, 2003 7:08 pm

Yeah, that'd be swanky
5
50%
Doesn't bother me either way
1
10%
ACK!! Slay the infidel for his blasphemy
2
20%
Huh?
2
20%
 
Total votes: 10

User avatar
talleyrand
Posts: 624
Joined: Mon Jul 21, 2003 6:56 pm
Location: Kansas City, MO, USA
Contact:

The Scope of Search and Replace

Post by talleyrand »

The one thing that kills me if I'm not thinking, is the default scope behaviour of search and replace.

* If there is a newline character in the highlighted text, the scope defaults to Selected Text.
* If there is no newline in the highlighted text, the scope defaults to Active Document.
* If there is nothing highlighted, it defaults to Active Document.

The first and the last, I understand but the second I don't. It would seem proper to me to default the behaviour to Selected Text if there is highlighted text. Am I the only one who gets bit by this quirk?
User avatar
webmasta
Posts: 168
Joined: Mon Jul 28, 2003 8:16 pm
Location: Toronto

Post by webmasta »

Thats one royal PITA for sure, esppecially when you only want to search a specific column. :roll:
User avatar
Angantyr
Posts: 11
Joined: Mon May 05, 2003 5:45 pm

Post by Angantyr »

On the contrary, I think that would hamstring the way the search windows work... i.e. Currently, all you need to do to search/replace for a word is highlight it and hit F8. It automatically puts the highlighted word into the Find edit box and you just go from there. (No cutting and pasting or typing.) If it defaulted to "Selected text" you would always have to change it to active document or all documents, otherwise you would only find the word you had highlighted to begin with.
User avatar
MudGuard
Posts: 1295
Joined: Sun Mar 02, 2003 10:15 pm
Location: Munich, Germany
Contact:

Post by MudGuard »

So which of the options should a non-native English speaker (or more precisely: someone who does not understand the gibberish) select?

Could you please use understandable texts for the poll options?
User avatar
webmasta
Posts: 168
Joined: Mon Jul 28, 2003 8:16 pm
Location: Toronto

Post by webmasta »

Ok Angantyr.. so we select our term and clik find/replace, the term drops into the find box automajically...

We are searching a database with columns and only want to replace the term if its found in a specific column.... so we go to block select and select our column ...

The result?? all instances of the term is replaced in the active document because the column does not have newline char... thats what we dont want.

Good one MudGuard... :wink:
jlacasse
Posts: 7
Joined: Thu Aug 28, 2003 5:28 pm

Post by jlacasse »

If they created a separate command for search for word under cursor or selection then it would be great, if not then I think it should stay the same, I personally do word/selection searchs all the time.
User avatar
webmasta
Posts: 168
Joined: Mon Jul 28, 2003 8:16 pm
Location: Toronto

Post by webmasta »

If they created a separate command for search for word under cursor or selection then it would be great, if not then I think it should stay the same, I personally do word/selection searchs all the time.
What would constitute a word under the cursor?? How would a word be defined with hyphens and underscors and exclamanation marks and whatever more?

But the issue is not what to search for,,, its where to search ,, the active document or the highlited selection after the search term has already been selected and a new selection made before startimg the search/replace.. see my reply to Angantyr to better understand the scenario... bottom line is that you could wreck an entire file if your head is not on ure shoulders or paying attention...
jlacasse
Posts: 7
Joined: Thu Aug 28, 2003 5:28 pm

Post by jlacasse »

My apologies, I was refering to just the search case, not the search and replace case which is obviousely not what's being discussed here. I guess I have "the ability to just search within a selection" on the mind :)
User avatar
talleyrand
Posts: 624
Joined: Mon Jul 21, 2003 6:56 pm
Location: Kansas City, MO, USA
Contact:

Post by talleyrand »

The correctly formatted poll exists here
I choose to fight with a sack of angry cats.
Post Reply