Editor features
Syntax highlighting
The editor automatically detects JavaScript and CSS, applying language-specific highlighting for keywords, strings, functions, and more.Autocomplete
PressCtrl+Space (or Cmd+Space on Mac) to trigger autocomplete suggestions. The editor suggests:
- JavaScript keywords and built-in functions
- CSS properties and values
- Variables you’ve defined in your code
Bracket matching
Matching brackets, parentheses, and braces are highlighted when your cursor is next to them.Line numbers
Line numbers help you navigate and reference specific lines when debugging.Themes
Choose from 8 editor themes to match your preferences:| Theme | Description |
|---|---|
| One Dark | Dark theme with purple and cyan accents (default) |
| GitHub Light | Clean light theme matching GitHub’s style |
| GitHub Dark | Dark version of the GitHub theme |
| Dracula | Popular dark theme with vibrant colors |
| Nord | Arctic-inspired theme with cool blue tones |
| Solarized Light | Warm light theme designed for readability |
| Solarized Dark | Dark variant of Solarized |
| Material | Google Material Design inspired colors |
Keyboard shortcuts
| Shortcut | Action |
|---|---|
Ctrl/Cmd + S | Save script |
Ctrl/Cmd + Z | Undo |
Ctrl/Cmd + Shift + Z | Redo |
Ctrl/Cmd + / | Toggle comment |
Ctrl/Cmd + D | Select next occurrence |
Ctrl/Cmd + F | Find |
Ctrl/Cmd + H | Find and replace |
Tab | Indent |
Shift + Tab | Outdent |
Code validation
The editor performs basic validation as you type:- JavaScript
- CSS
- Syntax error detection
- Unclosed brackets and quotes
- Invalid expressions
Validation catches common errors but doesn’t replace testing your code in the browser.
Version History
Every time you save a script, GoodCraft Script creates a version. Access the full history to:- View previous versions
- Compare changes between versions
- Restore to any previous version
Viewing Version History
- Open a script in the editor
- Click the History button in the toolbar
- The version history panel opens showing all saved versions
- Version number
- When it was saved (relative time like “2h ago”)
- Source (manual save, auto-save, or git sync)
- Git commit SHA if synced from Git
Comparing Versions
Click any version to see a diff view comparing it to the previous version. Changes are highlighted:- Green: Added lines
- Red: Removed lines
Restoring a Version
- Select the version you want to restore
- Click Restore
- The script content is replaced with that version
- A new version is automatically created (so you don’t lose your current work)
Snapshots
Snapshots are named checkpoints in your version history. Unlike regular auto-saved versions, snapshots have memorable names and are easier to find later.Creating a Snapshot
Name your snapshot
Enter a descriptive name like:
- “Before refactor”
- “v1.0 release”
- “Working animation”
- “Client approved version”
Filtering Snapshots
In the version history panel, you can filter to show:- All: Every version including auto-saves
- Snapshots: Only named snapshots
When to Create Snapshots
- Before making major changes
- After completing a feature
- When code is client-approved
- Before experimenting with different approaches
- At release milestones