Tabs and splits
- Open files from the Explorer, with Go to File (CmdP), or from search results. Each opens in a tab.
- Split Editor Right (Cmd\) puts the file in a second group beside the first. Cmd1 focuses the first group; Join All Editor Groups brings them back into one.
- CmdW closes the tab. CmdN makes a new file.
- While the Code agent works, your tabs stay yours: the agent never takes the front tab or reopens tabs you closed.
Saving
- CmdS saves the file; Save All is CmdAltS on a Mac (CtrlShiftS elsewhere).
- Auto Save (Settings, General) saves changed files after a short delay (Save Delay, in milliseconds), the same way CmdS does.
- Compare Active File with Saved shows what you changed since the last save; Compare Active File with Clipboard compares it with what you copied.
Formatting
Format Document (ShiftAltF) and Format Selection (CmdKthenCmdF) use the project's own Prettier when it has one, else the language's own formatter. The project's settings (.editorconfig, Prettier) decide its style.
On save, Piye can (Settings, Code Intelligence):
- Format the file;
- Sort and clean the imports;
- Fix what can be fixed: every fix ESLint and the language server can make safely.
Problems as you type
Errors and warnings from the language servers, type checks and ESLint appear:
- underlined in the code, with details on hover;
- faintly at the end of their line (Problems at the end of their line);
- in the Problems panel, for the whole project.
Quick Fix (Cmd.) offers the fixes for the problem under the cursor. Organize Imports is ShiftAltO; Fix All is in the command palette.
Git in the editor
- Changed lines beside the code: added, changed and removed lines marked in the gutter; click one to see what it was.
- Who changed this line: the author and when, faintly at the end of the line your cursor is on.
Reading aids
All in Settings, Editor:
| Setting | What it does |
|---|---|
| Theme and File icons | The colour theme and the file icons. See Themes and icons. |
| Font size, Font, Line height | How the code is set. |
| Tab size | Spaces a tab stands for, unless the project says otherwise (.editorconfig, Prettier). |
| Word wrap | Wrap long lines in the open file. |
| Line numbers | Each line's number, its distance from the cursor's line, or none. |
| Minimap | The whole file in miniature at the right, to see where you are and jump. |
| Sticky scroll | The function or class you're inside stays at the top while you scroll. |
| Matching bracket colours | Each pair of brackets in its own colour, so nesting reads at a glance. |
Settings for one language only (for example a different tab size for Python) are under Settings, Languages.
Snippets
A snippet is text you type often, like a component, a test or a log line, brought up by a word. Type its trigger in a file and pick it from the suggestions: its text goes in, and Tab moves the cursor to each place marked $1, $2. Make and edit snippets in Settings, Snippets: a trigger (or several, with commas), a description, and the text it puts in.
Previews and other files
- Markdown files have a preview beside the source.
- Jupyter notebooks (
.ipynb) open as notebooks, with their cells and outputs. - Images and other files open in a preview.
- Change Language Mode (CmdKthenM) picks how a file is treated when its extension doesn't say.
Diffs and merge conflicts
Diffs open side by side. When a file has merge conflicts, Merge Conflict: Open in Compare View (or Resolve Merge Conflicts) shows both sides so you can choose, per conflict, which to keep.
Inline edit and Tab
Piye's AI also works inside the editor: gray Tab suggestions as you type, and inline edit (CmdK) on a selection. See Tab and inline edit.