The editor
The parts of the editor, project tabs, code tabs, quick open, keyboard shortcuts and editor settings.
On this page
Open the editor from Temper › Editor. From top to bottom it has the project strip, the toolbar, and the work area: the file list, the code, an optional preview, and the side panel.
The toolbar#
| Item | What it does |
|---|---|
| Project name | Shows the theme or plugin you're in and a dot for its state: active, installed but not active, or not installed yet. Click it for Download name as .zip (the working copy, unpublished changes included) and View all themes and plugins…. |
| Status | "n unpublished changes", "Matches the installed version", or "Nothing published yet". |
| New | Create a block, template, pattern or any file. See Starters. |
| View site | Opens the site in a new tab with your working copy in place. See Preview. |
| Git Pro | Pull, commit and choose repositories. See Link a repository. |
| Activate / Deactivate | Shown for installed themes and plugins. See Activating themes and plugins. |
| Publish or Install | Publishes the working copy, or installs a new theme or plugin. See Publishing. |
| Panel buttons | Show or hide the file list, the preview, and the side panel. |
| Gear | Opens the settings. |
Projects and tabs#
The strip at the top shows the theme or plugin you have open. Click + ("Switch to another theme or plugin") to open another one, or choose View all themes and plugins… to go to Themes & Plugins.
With Temper, one project is open at a time: opening another takes its place. Its working copy and unpublished changes stay. Pro With Temper Pro, several stay open as tabs, each with its own open files and preview page:
- Drag a tab to reorder it. Right-click it to Pin or Close it.
- Up to 5 tabs stay open. Past that, the unpinned tab opened longest ago closes; its working copy stays.
- Each tab shows how many unpublished changes it has.
The file list#
The file list shows every file in the working copy, with a letter for each changed file: A added, M modified, D deleted. Images, video, audio, fonts and PDFs open in a read-only viewer.
Right-click a file (or press Shift+F10 or the menu key) for Open, Compare with live, New file here…, Rename…, Duplicate…, Copy path, Undo changes, Restore file for a deleted file, and Delete. Right-click a folder for New file here…, Rename folder…, Copy path, Delete folder… and Collapse all folders.
The file that identifies the project, style.css in a theme or the main plugin file, can't be renamed or deleted.
Code tabs#
Each file you open gets a tab above the code. A dot on the tab means it has unsaved edits.
- Drag tabs to reorder them. Middle-click a tab to close it.
- Right-click a tab for Close, Close others, Close to the right, Close all, Pin, Compare with live, Copy path, Rename…, Duplicate…, Undo changes and Delete. Pinned tabs stay at the front.
- Unsaved edits are kept in this browser, so they're still there if you reload the page.
Quick open#
Press ⌘P or Ctrl+P to go to a file. Type part of its name or path. A name that starts with what you typed ranks first, then names that contain it, then paths. Move with ↑ and ↓ (or Ctrl+N and Ctrl+P), open with Enter, close with Esc.
Keyboard shortcuts#
On Windows and Linux, use Ctrl where the table says ⌘, and Alt for ⌥.
| Shortcut | What it does |
|---|---|
| ⌘S | Save the open file to the working copy |
| ⌘P | Go to a file |
| ⌥W | Close the code tab |
| ⌘W | Close the code tab, when Temper runs in its own app window |
| ⌘Enter | Send the instruction in the AI tab |
| ⌘F | Find and replace in the file |
| ⌘Z / ⌘Shift+Z | Undo / redo |
| ⌘/ | Comment or uncomment the line |
| Tab / Shift+Tab | Indent / outdent |
| Ctrl+Space | Show completions |
| Arrow keys on the divider | Resize the preview |
In a normal browser tab, ⌘W always closes the browser tab, because browsers don't let pages change that. To make ⌘W close code tabs, install Temper as an app: in Settings › Appearance, click Install Temper as an app, or in Chrome or Edge use the browser menu's Cast, save and share › Install page as app.
The side panel#
The panel on the right has one tab at a time:
- Changes: the files that differ from the live version. Click a modified file to compare it, or ↺ to undo its changes. Files in
vendor/,node_modules/anddist/are grouped into one line each. It also shows Site Editor edits that aren't in your files. - Build Pro: asset builds and PHP packages. See Asset builds.
- AI: change the open file from a description. See AI with your own key.
- History: snapshots and recent activity. See Snapshots and rollback.
The status bar#
Under the code, the status bar shows whether the open file passes the save checks (or its first error), how many warnings it has, whether it's saved, the cursor's line and column, and the file's language. With Pro, it also shows the build state.
Editor settings#
Temper › Settings › Appearance sets how the code looks and behaves. These settings are saved to your user profile, so they follow you to any browser.
| Setting | Default |
|---|---|
| Theme | One Dark. Light themes are marked "(light)". |
| Font | System default. Web fonts load from Google Fonts only when you pick one. |
| Font size | 13 |
| Line height | 1.6 |
| Indent with | Tabs (WordPress standard), or Spaces |
| Tab width | 4 columns |
| Wrap long lines | Off |
| Autocomplete | On. Includes every WordPress function in PHP files. |
| Close brackets and quotes | On |
| Check files while typing | On. Marks syntax errors before you save. |
| Build automatically after saving | On. For themes with a build step; stored in this browser. Pro |
The editor highlights PHP, HTML, SVG and XML, CSS, SCSS and Sass, JavaScript and TypeScript, JSON and Markdown. theme.json, style variations in styles/ and block.json get completions from their schemas.