> For the complete documentation index, see [llms.txt](https://docs.overleaf.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.overleaf.com/navigating-in-the-editor/searching-within-a-project.md).

# 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](/managing-projects-and-files/adding-files-to-a-project/adding-a-file-from-a-url.md), including files stored on Google Drive, and `.bib` files (reference libraries) imported from [ReadCube](/integrations-and-add-ons/reference-manager-integrations/readcube.md), [Mendeley](/integrations-and-add-ons/reference-manager-integrations/mendeley.md), or [Zotero](/integrations-and-add-ons/reference-manager-integrations/zotero.md)
* 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** <picture><source srcset="/files/o4Mw0Z0UcAERKpFsQISm" media="(prefers-color-scheme: dark)"><img src="/files/o7ksalH0175ib5wO5Kuk" alt="The Search File icon"></picture> located above the editor. Either method displays a search panel located at the bottom of the editor.

<figure><picture><source srcset="/files/TLXi3lHjFnISNYIDrfbY" media="(prefers-color-scheme: dark)"><img src="/files/dmTVYQdY0j2heT1bxIcq" alt="The File Search icon and panel in the editor" width="563"></picture><figcaption></figcaption></figure>

### 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**
* <i class="fa-align-left">:align-left:</i>**: Within selection**

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

<figure><picture><source srcset="/files/BotdzES1XzEqt4aH589m" media="(prefers-color-scheme: dark)"><img src="/files/sPATpLWXL5J8EcOPCKFn" alt="Previous and next result arrows" width="188"></picture><figcaption></figcaption></figure>

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.

## Project-wide search

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** <picture><source srcset="/files/o4Mw0Z0UcAERKpFsQISm" media="(prefers-color-scheme: dark)"><img src="/files/o7ksalH0175ib5wO5Kuk" alt="The Search File icon"></picture> in the left sidebar:

<figure><picture><source srcset="/files/8qiVblAD81fvxdZ0zVIt" media="(prefers-color-scheme: dark)"><img src="/files/1WWu6G6F96fjG7jCrjyy" alt="The Project-wide search panel" width="313"></picture><figcaption></figcaption></figure>

{% hint style="info" %}
You can also launch the project-wide search panel from within the file search panel by selecting **Search all project files** <picture><source srcset="/files/hdLu3QYhMc74pfwxVaVy" media="(prefers-color-scheme: dark)"><img src="/files/ctgwSBozL769USoRyyVg" alt=""></picture> located to the right of the up and down arrows.
{% endhint %}

### How to use project-wide search

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.

{% hint style="warning" %}
Files larger than 2 MB are excluded from project-wide search results.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.overleaf.com/navigating-in-the-editor/searching-within-a-project.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
