---
title: Edit and save files
project: Code
version: 2.0
section: guides
language: en
license: MIT
url: https://totaljs.es/docs/code/2-0/guides/edit-files/
updated: 2026-11-19T04:32:04.377Z
---

# Edit and save files

> Open files in tabs, save your work and get back unsaved text.

Open a project, then click a file in the tree. The file opens in a new tab.

## Save a file

Press `Ctrl+S`, or `Cmd+S` on macOS. Code writes the file on the server and keeps a [backup](../backups/) of it.

## Work with tabs

- Click a tab to switch to that file.
- Press `Alt+W` to close the current tab.
- Code opens your tabs again the next time you open the project.

## Reload a file

Press `F5` to load the file from the server again.

## Get back unsaved text

Code keeps the text you haven't saved in your browser. When you open that file again, a message appears at the top of the editor:

> The content of this file wasn't saved before. Do you want to restore it?

Click **Restore** to get your text back, or **Cancel** to keep the saved version.

## Find text in the file

Press `Ctrl+F`, or `Cmd+F` on macOS, type in the **Search** box above the code and press `Enter`. To search a whole project, read [Search in files](../search/).

All keys are listed in [Keyboard shortcuts](../../reference/keyboard-shortcuts/).
