---
id: "arquivos-editor"
titulo: "The editor: tabs, modes and editing"
resumo: "Open tabs, switch between source, rich and preview, edit code, find and replace, save and autosave."
idioma: "en"
tipo: "guia"
categoria: "arquivos-git"
aplicavelDesde: "0.0.16"
capabilities: ["editor.open.tabs", "editor.edit.code", "editor.find.replace", "editor.searchInFiles", "editor.copyPathToLine", "editor.renameFile"]
estadoEditorial: "aprovado"
nivelEvidencia: "artefato-distribuido"
refFonte: "27574c339b58316408f6be2d62169d59041d07bf"
revisaoFonte: "2026-09-24"
revisor: "mantenedor (v1, 2026-10-03)"
rota: "/docs/en/ferramentas/arquivos/editor/"
fonte: "pt-br/ferramentas/arquivos/editor.md"
caminhoPublico: "docs/publica/en/ferramentas/arquivos/editor.md"
hashFonte: "sha256:73434e46ea265427466e6bb11109f119d3ac94aa75dd36634915dfd7797f4286"
hashDestaPagina: "sha256:9d31053736f8400e56e090d94222ab8af181e9f26d974dc985ffb7c2e1b6bcc7"
traducaoAssistidaPorIA: true
traducaoDesatualizada: false
corpoRetido: false
---
<!-- traducao-assistida-por-ia: idioma=EN fonte=pt-br/ferramentas/arquivos/editor.md fonteHash=sha256:73434e46ea265427466e6bb11109f119d3ac94aa75dd36634915dfd7797f4286 estado=atual -->

## Tabs

- Opening a file creates a tab. Opening another from the tree in **preview** replaces the previous tab; opening as a **permanent tab** keeps the new one beside the others.
- The tab bar lets you close, pin and switch between open files.
- **The same file can be open in different tabs** — for example, an editing tab and a diff tab. Each tab keeps its own scroll state.

## Display modes

The mode switcher changes what the tab shows, and the labels depend on the file type:

| Mode | What for |
|---|---|
| **Source** | The file's text, as it is |
| **Rich** | Markdown editing with formatting |
| **Preview** | The rendered result, without editing |
| **Edit** | Code editing (code files) |
| **Changes** | The file's own diff, inside the same tab |

Two details that avoid confusion:

- **"Changes" mode is orthogonal to the Markdown modes** — it replaces the tab's content, it does not coexist with the others.
- **CSV and notebook reuse the "rich" slot**, with their own metadata, but without editing: there the mode is a table or a viewer, not text editing.

## Edit code

- The code editor synchronizes content, cursor position and scrolling.
- **A read-only file or tab** disables editing.
- Pasting very large content may be refused, with a notice that the pasted text is too large.

## Find, replace and search in the project

| Action | Shortcut | Note |
|---|---|---|
| **Find** | the editor's search shortcut | Uses the editor's native search |
| **Replace** | its own replace shortcut | Also in the editor |
| **Search in the project** | the editor's context menu | Uses the **selection** or the cursor position as the query and opens the side search |

- Repeats of the find shortcut **do not reopen** the search: they are consumed so as not to interfere with what is already open.
- **Search in the project with no derivable query does nothing** — if there is no selection and no word under the cursor, there is nothing to search.

## Copy line reference

The editor's gutter menu copies the path **with the cursor's line number**, in two forms: absolute path and relative path. It is the practical format for pointing at an exact spot in the code in a message to the agent or in an issue.

## Rename from the header

The editor header has a path menu with the **rename** action, which opens an inline field:

- **Enter** confirms, **Escape** cancels, leaving the field confirms.
- The action only exists when the file can be renamed.
- **Virtual tabs do not offer renaming** — they do not correspond to a file on disk.

Renaming here is the same operation as renaming in the tree: the file changes name on disk.

## Saving and autosave

- **Save** has its own shortcut and works in any editable tab.
- **Autosave** writes by itself after an interval, but **does not apply to every tab**:
  - editing tabs and unstaged diffs of a file **may** have autosave;
  - **combined diff tabs and conflict review tabs have no autosave**;
  - autosave is **suspended** when the file changed on disk outside the app or when the comparison baseline was not verified.
- **New untitled files** are written to disk at creation, and the name is defined afterwards.

## Limits

- The editor **does not** keep its own backup copy: what protects your work is git and autosave.
- Pasting and opening very large files have limits; there is no promise of opening any size.
- Autosave does not replace a `commit`.

## Related

- [Opening and viewing files](/docs/en/ferramentas/arquivos/abrir-e-visualizar/)
- [Markdown: modes, formatting and notes](/docs/en/ferramentas/arquivos/markdown/)
