Skip to content

This article explains two ways to search for text within your Overleaf project:

Project-wide search is currently available only to selected users participating in Overleaf’s Beta Program. A project-wide text replacement feature is still in development and currently unavailable for beta testing.

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

Use either of the following methods to access this feature:

  1. Keyboard shortcuts:
    • Windows/Linux: Ctrl+f
    • Mac OS: Cmd+f
  2. Select the Toggle Search icon located above the editor:
  3. Image showing location of file search

Either method displays the search-and-replace panel 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

  1. You can choose to configure your search by selecting one or more of the following options or proceed to search without selecting any of them.
    • Icon for case sensitive search: use a case-sensitive search
    • Icon for searching using regular expressions: use regular expressions
    • Icon for whole word search: search for whole words only
    • Icon for searching within selected text: search only within text highlighted in the editor
  2. After selecting any 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.
  3. Use the next and previous buttons to find any additional search results.
  4. Image showing control for previous and next search result

  5. 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.

Project-wide search

Project-wide search is currently available only to selected users participating in Overleaf’s Beta Program. A project-wide text replacement feature is still in development and currently unavailable for beta testing.

This feature allows you to search for text across all files in your project, provided they are under 2MB. Files larger than 2MB are excluded from the search results (see the video for an example of that).

How to access project-wide search

Use either of the following methods to access this feature:

  1. Keyboard shortcuts:
    • Windows/Linux: Ctrl+Shift+f
    • Mac OS: Cmd+Shift+f
  2. Select the Search icon located above the file tree:
  3. Image showing location of project-wide search icon

Either method displays a search box that temporarily hides the file tree.

Image showing the project-wide search box

How to use project-wide search

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

    • Icon for case sensitive search: use a case-sensitive search
    • Icon for searching using regular expressions: use regular expressions
    • Icon for whole word search: search for whole words only
  3. Type your search term in the box provided and select the search icon (Image showing project-wide search icon), or press return.
  4. Any search results are listed and grouped by file.
  5. Select a search result to jump to the corresponding file location.

Video demonstrating project-wide search

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 2MB size limit and is excluded from the search results.

Overleaf guides

LaTeX Basics

Mathematics

Figures and tables

References and Citations

Languages

Document structure

Formatting

Fonts

Presentations

Commands

Field specific

Class files

Advanced TeX/LaTeX