Highlight all occurrences of a string/word in the text

Find, replace, find in files, replace in files, regular expressions

Highlight all occurrences of a string/word in the text

Postby MentholMoose » Thu Oct 13, 2005 12:47 pm

Hi,

I want to know if I can search for a word in the text and UltraEdit can highlight (select) all the occurrences of the word in the document, instead of selecting the first one and I have to hit F3 to see where is the next occurrence.

Regards.
User avatar
MentholMoose
Newbie
 
Posts: 1
Joined: Tue Aug 23, 2005 11:00 pm

Re: Highlight all occurrences of a string/word in the text

Postby mrainey56 » Thu Oct 13, 2005 12:54 pm

I don't think you can do that. You could write a macro to bookmark all lines containing the search string, but there's an upper limit to the number of active bookmarks (not sure how many, used to be fifty I believe.)

You could also copy all lines containing the search string to the clipboard by using the "List Lines Containing String" option in the Find dialog.

Those are the best options I can think of right now.
User avatar
mrainey56
Master
Master
 
Posts: 212
Joined: Tue Jul 27, 2004 11:00 pm
Location: Spartanburg, South Carolina

Re: Highlight all occurrences of a string/word in the text

Postby Bego » Mon Oct 17, 2005 7:13 am

Hi Menthol,

You can "do" it if you take the word you look for in your wordfile.txt in a section, where only this word is inside.
Use "loud" colors for this syntax section and: voila !

Example:
Code: Select all
/C3"MYHIGHLIGHT"
mywordonly

rds, Bego :wink:
User avatar
Bego
Master
Master
 
Posts: 357
Joined: Wed Nov 24, 2004 12:00 am
Location: Germany

Re: Highlight all occurrences of a string/word in the text

Postby dsunde » Fri Dec 02, 2005 4:48 pm

I agree with this request. EmEditor has this feature. Any time you are going to do a search/replace, it highlights all the matches for you before doing any replacing. That makes it very easy to decide if you want to do a "Replace All". That is a great feature that you don't know you need until you have it. Then you are spoiled and want it all the time.

To fend off the comments that this will probably cause, I want to say that EmEditor doesn't even begin to compare to UltraEdit. I tested it while I was trying different editors, and that is the one thing I really liked about it.
User avatar
dsunde
Newbie
 
Posts: 8
Joined: Fri Dec 02, 2005 12:00 am

Re: Highlight all occurrences of a string/word in the text

Postby dsunde » Thu Jul 13, 2006 1:24 pm

I just noticed that this feature almost exists in ver. 12.10a. In the Find box, there is a check for Highlight All Items Found. You can even do this, then close the Find box and open a Replace box. The matches will all still be highlighted. Then you can do the replace command.

Could you add the check for Highlight All Items Found into the Replace dialog box? That would give us what we are asking for.
User avatar
dsunde
Newbie
 
Posts: 8
Joined: Fri Dec 02, 2005 12:00 am

Re: Highlight all occurrences of a string/word in the text

Postby wadezone » Fri Jan 19, 2007 4:29 pm

I don't quite understand how to highlight found search items using the wordfile.txt in a section. I guess I will have to figure this out.

But regarding the Highlight All Items Found does help, but that is not a option for the Find in Files. I use it when dealing with large raw data file and you can put the results in a different window.

I would like to request having the Highlight All Items Found when doing the Find in Files functionality too. Thanks

Theresa
User avatar
wadezone
Newbie
 
Posts: 1
Joined: Thu Jan 18, 2007 12:00 am

Re: Highlight all occurrences of a string/word in the text

Postby vhdluser » Wed Jan 31, 2007 7:47 pm

It seems like what is being discussed here already exists in 12.20b+1, but...
It is only in Found dialog. (Replace doesn't have it.)
Also, I would like to refine the wishlist to:

  1. The option "Highlight All Items Found" should not default to OFF every time you open the Find dialog, but should remember the last setting. If we can't agree on that, then let's have two checkmarks: "this time" and "always", the latter being static/sticky.
  2. It should be available in Replace dialog (makes sense with the request below).
  3. It should search and highlight as you type, perhaps with a minimum string length threshold of 2 or 3 characters. Let's face it, while editing, most of us don't use even 1% of our computing power. Let's make some use of it.
  4. The highlighting colour should be a box found in the same dialog.
What do you think? Do I like my creature comforts or what?

- vhdl guy
User avatar
vhdluser
Basic User
Basic User
 
Posts: 23
Joined: Tue Jan 30, 2007 12:00 am

Re: Highlight all occurrences of a string/word in the text

Postby hichen » Tue May 27, 2008 12:02 pm

I'd like to echo vhdluser in that the option "Highlight All Items Found" should not default to OFF. This is very annoying.
hichen
Newbie
 
Posts: 1
Joined: Tue May 27, 2008 11:44 am


Return to Find/Replace/Regular Expressions