This was originally an example macro (Useful Macros Section) and was enhanced and added to Release 3.00.445.
Macro Features:
- Starts out with an empty search string and defaults to searching from the current cursor position down
- Every printable character you hit is appended to the search string and the search performed with the new search pattern
- Matched pattern is highlighted.
- Toggle word search options: whole word (Ctrl+W or Alt+W), prefix match only (Ctrl+B, Alt+B, mnemonic beginning of word), suffix match only (Ctrl+E or Alt+E, mnemonic end of word)
- Alt+Space will take the word at the current cursor location as a new search string, it will turn on whole word search option.
- Ctrl+Space will clear the search string, if pressed for the second time with the search string empty, it will take the word at the cursor location (same as Alt+Space)
- Backspace key removes characters from the end of the search string
- Ctrl+Backspace or Delete clear the string so you can enter a new one.
- Invoking this function while it is running will recall the last saved search string. Invoking it again will exit Incremental search mode.
- Mouse clicks exit incremental search mode.
- Escape restores the cursor to where it was when incremental search was invoked (cancels all cursor movements)
- Enter leaves the cursor where it is and saves the search string for use by F3 key or the next incremental search.
- Navigate to Next/Previous match using the arrow keys.
- Up key moves the cursor one line up and changes search direction to up and re-applies the search pattern, also has the effect of moving to a previous occurrence of the search string
- Down key does the opposite of up: changes the direction of the search down and has the effect of moving the cursor to the next occurrence,
- Left/Right same as up/down except they move the cursor left/right and too have the effect of moving to previous/next occurrence respectively.
- Displays the current search direction and the search string in the command line and additionally displays it in light yellow if pattern is non-empty and was not found else light green (if empty or found).
- The cursor will be moved to the next/previous occurrence of the search string (not case sensitive) and if not found will loop around to top or bottom of file and search from there just in case there is an occurrence there.
- The macro is assigned to the Ctrl+I key in the default template.
- Search is case insensitive.
- Will perform incremental search of the command line text if the cursor is in the command line when incremental search is started.