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 of it.
Work with tabs
- Click a tab to switch to that file.
- Press
Alt+Wto 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.
All keys are listed in Keyboard shortcuts.