FocusView is a highly sophisticated extension to RealTime Search. It is available in ISESteroids Enterprise.

When you use RealTime Search and found a number of matches, you can use FocusView to only show matching lines. Any line that has no match will be hidden.

FocusView is especially helpful in large scripts and with a large number of matches. You can use FocusView to quickly navigate from one match to another.

Enabling and Disabling FocusView

To toggle FocusView, press CTRL+F3. FocusView will focus the visible view on search results, so you first need to perform a RealTime Search:

  1. Load a large script
  2. Double-click on a word inside the script that occurs multiple times
  3. Press CTRL+F to quickly mark all instances of this word
  4. Press CTRL+F3 to focus the view. You now only see the lines that contain the selected word
  5. Press CTRL+F3 again, or edit the script, to disable FocusView

Here is a sample result. This is what the editor looks like before FocusView is enabled:

Before Focus View

RealTime Search has selected the phrase “Col” and marked all matches in the editor. By pressing CTRL+F3 now, FocusView is enabled:

After Focus View

Take a look at the line number margin, and you will understand how FocusView has shrink-wrapped a large script and is now showing only the lines with matches inside.

Using FocusView for Navigation

You can use FocusView to quickly navigate, too. Select a keyword and enable FocusView. Then, place the caret in the line you want to navigate to, and press CTRL+F3 to disable FocusView again.

ISESteroids automatically remembers the caret position and restores the code. You effectively moved to a different location in your script.

Auto-Enable FocusView

By default, FocusView is an on-demand feature and controlled by CTRL+F3. If you click the settings button  on the right side of the RealTime Search box, you can auto-enable FocusView. Choose “Show Result Lines Only”.

While this option is enabled, whenever you enter a search term inside the RealTime Search box, the editor immediately hides all lines with no matches. Press ESC to clear both the RealTime Search box and FocusView.