# Keyboard shortcuts

Overleaf provides a number of keyboard shortcuts for common tasks. The table below lists the most common shortcuts. A more comprehensive list of keyboard shortcuts can be found in [this Overleaf project template](https://www.overleaf.com/articles/overleaf-keyboard-shortcuts/qykqfvmxdnjf).

For Mac users, the below commands will use the Cmd key instead of Ctrl. Some keyboard shortcuts in this list may not be available on non-US keyboards or in vim/emacs\
modes.

| Command                            | Operation                                                                                                                                               |
| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Ctrl + F                           | Find and replace                                                                                                                                        |
| <p>Ctrl + Enter<br>or Ctrl + S</p> | Compile the project                                                                                                                                     |
| Ctrl + Z                           | Undo                                                                                                                                                    |
| Ctrl + Y                           | Redo                                                                                                                                                    |
| Ctrl + Home                        | Go to the first line of the current file                                                                                                                |
| Ctrl + End                         | Go to the last line of the current file                                                                                                                 |
| Ctrl + Shift + L                   | Go to a specific line (opens a dialog)                                                                                                                  |
| Ctrl + /                           | Toggle commenting for selected lines (Comment/uncomment selected text)                                                                                  |
| Ctrl + D                           | Delete the current line                                                                                                                                 |
| Ctrl + A                           | Select all                                                                                                                                              |
| Tab                                | Indent the selection                                                                                                                                    |
| Shift + Tab                        | Un-indent the selection                                                                                                                                 |
| Ctrl + U                           | Change the selected text to upper case                                                                                                                  |
| Ctrl + Shift + U                   | Change the selected text to lower case                                                                                                                  |
| Ctrl + B                           | Bold                                                                                                                                                    |
| Ctrl + I                           | Italics                                                                                                                                                 |
| Ctrl + Space                       | <p>Open the autocomplete menu, inside of <code>\cite{...}</code> search the bibliography<br>(Use Ctrl + Space also on Mac, rather than Cmd + Space)</p> |

A more comprehensive list of keyboard shortcuts can be found in [this Overleaf project template](https://www.overleaf.com/articles/overleaf-keyboard-shortcuts/qykqfvmxdnjf).


---

# Agent Instructions: 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:

```
GET https://docs.overleaf.com/navigating-in-the-editor/keyboard-shortcuts.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
