Skip to content

File search

File search finds text inside files in your workspace, such as SQL scripts, without opening each file individually.

To search file contents for a string, select the Search button () on the main toolbar, or the arrow next to it, then File Search on the dropdown menu.

The Search window opens showing the File Search tab:

Search settings

Enter your search text in Containing text, and refine the search with these settings:

Setting Description
Case sensitive Match the exact case of your search text (on by default)
Regular expression Search using regular expressions
Whole word Match whole words only, not text inside longer words
File name patterns Limit the search to files matching these patterns, separated by commas
Derived resources Include generated files in the search
Binary files Include binary files in the search
Scope Choose whether to search the whole workspace, only selected resources, projects that contain the selected resources, or a saved working set

Tip

In Containing text, use * to match any string, ? to match a single character, and \ to search for a literal *, ?, or \. In File name patterns, use the same wildcards, and prefix a pattern with ! to exclude it, for example !*.html.

Select Replace instead of Search to find and replace the text across all matching files.

Select Search. The results appear in a Search view. The results represent a tree or list of files with the search combination highlighted:

The toolbar of the Search view for File search provides more tools in addition to those available for all search types:

Button Name Description
Show Next / Previous Match Open the file in a separate viewer and move the highlight to the next/previous match, respectively
Remove Selected Matches Removes selected row (row in focus) of the results
Remove All Matches Removes all results in the view
Expand/Collapse All Expand/collapse the tree of results

The view also provides a view menu (select the View Menu button (), in the upper-right corner of the view) that contains the following items:

Menu item Description
Show as List Presents the results in the form of list
Show as Tree Presents the results in the form of tree
Filters Opens Search Filters dialog box
Preferences Opens the Preferences window on the Search page

Double-click a results row to open it in a separate viewer.