SlickEdit Community

SlickEdit Product Discussion => SlickEdit® => Did you know? => Topic started by: Lisa on February 14, 2008, 03:55:56 pm

Title: Incremental Search Highlight
Post by: Lisa on February 14, 2008, 03:55:56 pm
A great way to start seeing search results immediately is to use incremental search, and an option is available to highlight matches. This way, everything that matches what you've typed so far is highlighted in the editor window.

To turn on the highlight, from the main menu, click Tools > Options > General, then select the Search tab. Under Additional search options, select Incremental search highlighting.

To start the incremental search, press Ctrl+I (bound to the i_search command in CUA emulation). The SlickEdit command line opens, ready for you to start typing.

Bonus tip: To modify the highlight color, go to Tools > Options > Appearance > Color. The screen elements to modify are I-Search Current Match and I-Search Highlight.
Title: Re: Incremental Search Highlight
Post by: DaveKellogg on March 27, 2008, 04:59:11 pm
Hi Lisa,
Is there some way to make the back-light coloring "sticky", so it remains visible after I close the incremental search?
Title: Re: Incremental Search Highlight
Post by: Lisa on March 27, 2008, 05:15:57 pm
Hi Dave. The only way I know to do this is to use regular find with the Find and Replace tool window (Search > Find) - check the option "Highlight all matches".
Title: Re: Incremental Search Highlight
Post by: chrisant on March 27, 2008, 05:38:56 pm
Dave, if you don't mind editing the built in macros (and dealing with upgrades overwriting your edits, etc), then it looks like you could tweak _end_incremental_search in search.e:


Code: [Select]
static void _end_incremental_search()
{
// chrisant: Try commenting out the next line to avoid clearing the highlights after an i_search.
//   _isearch_clear_markers();
}