For the complete documentation index, see llms.txt. This page is also available as Markdown.

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:

  • text files uploaded from an external URL, including files stored on Google Drive, and .bib files (reference libraries) imported from ReadCube, Mendeley, or Zotero

  • text files that exceed 2 MB in size because the editor treats them as read-only

How to access search and replace

To access search and replace, you can use a keyboard shortcut when your cursor is in the editor (Windows/Linux: Ctrl+F; macOS: ⌘+F), or select Search file The Search File icon located above the editor. Either method displays a search panel located at the bottom of the editor.

The File Search icon and panel in the editor

How to use search or search and replace

Overleaf will start to search as you type and highlight the first successful result. If you wish, you can configure your search by selecting one or more of the following options within the "Search for" field:

  • Aa: Match case

  • [.*]: Regular expression

  • W: Whole word

  • : Within selection

Use the up and down arrows to go to the previous or next search result, respectively.

Previous and next result arrows

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

  • Replace updates an individual match and then highlights the next match.

  • Replace All replaces all matches at once in the selected file.

The project-wide search feature allows you to search for text across all files in your project. To access project-wide search, select Project search The Search File icon in the left sidebar:

The Project-wide search panel

You can also launch the project-wide search panel from within the file search panel by selecting Search all project files located to the right of the up and down arrows.

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

  • Aa: Match case

  • [.*]: Regular expression

  • W: Whole word

Type your search term in the "Search all project files..." field, and select Search. Any search results are listed and grouped by file. Select a search result to jump to the corresponding file location.

Last updated

Was this helpful?