Searching within a project

Search and replace within the current file

This feature lets you find and replace text within an editable file displayed in the editor. This feature is not available for read-only files such as:

How to access search and replace

To o access search and replace, you can use a keyboard shortcut (Windows/Linux: Ctrl+f; Mac OS: Cmd+f), or select the Toggle Search icon located above the editor:

Image showing location of file search

Either method displays a search panel located at the bottom of the editor.

Image showing the location of the file search panel

The search panel provides the following controls.

Image showing controls provided on the file search panel

How to use search or search and replace

You can configure your search by selecting one or more of the following options, or proceed to search without selecting any.

  • : use a case-sensitive search

  • : use regular expressions

  • : search for whole words only

  • : search only within text highlighted in the editor

After selecting search options, type a search term in the box labeled Search for. Overleaf will start to search as you type and highlight the first successful result.

Use the next and previous buttons to find any additional search results.

To replace the text of search results, enter the replacement text in Replace with and use one of the following methods:

  • Manual replacement: select Replace to update an individual match and cause Overleaf to highlight the next match. Continue to navigate through the results using the previous/next buttons and click Replace to update additional matches.

  • Automatic replacement: select Replace All to replace all matches at once.

Selecting the search button () switches to project-wide search.

This feature allows you to search for text across all files in your project, provided they are under 2 MB. Files larger than 2 MB are excluded from the search results.

To access Project-wide search, you can use a keyboard shortcut (Windows/Linux: Ctrl+Shift+f; Mac OS: Cmd+Shift+f), or select the search icon above the file list.

Image showing location of project-wide search icon

You can also launch Project-wide search from within the project search panel by clicking the search button: .

Each of these methods displays a search box that temporarily hides the file tree.

Image showing the project-wide search box
  1. You can configure your search by selecting one or more of the following options, or proceed to search without selecting any.

Image showing the controls to configure project-wide search
  • : use a case-sensitive search

  • : use regular expressions

  • : search for whole words only

  1. Type your search term in the box provided and select the search icon (), or press return.

  2. Any search results are listed and grouped by file.

  3. Select a search result to jump to the corresponding file location.

The following video demonstrates project-wide searching using the Overleaf project Typeset, the source code documentation for TeX, e-TeX, or pdfTeX. That project was selected because it contains large .tex files including pdftex.tex, which exceeds the 2 MB size limit and is excluded from the search results.

Last updated

Was this helpful?