Overview
The Knot Code Editor gives you full control over your store’s source code with a powerful, professional editing experience. Whether you’re making quick tweaks or implementing complex features, the editor provides all the tools you need to work efficiently.
The Code Editor interface with syntax highlighting, file explorer, and live preview
Key Features
Intelligent Code Editing
- Syntax Highlighting: Automatic language detection and color coding
- Auto-completion: Smart suggestions as you type
- Error Detection: Real-time error highlighting and diagnostics
- Code Formatting: Automatic formatting with customizable rules
Advanced Navigation
- File Explorer: Browse and manage your project files
- Quick Open: Fast file switching with
Cmd/Ctrl + P
- Go to Definition: Jump to function and variable definitions
- Find & Replace: Powerful search across files with regex support
Getting Started
1
Access the Code Editor
Click the code icon in the top navigation to open the editor
2
Navigate your files
Use the file explorer on the left to browse your project structure. Click any file to open it in the editor.
3
Make your changes
Edit code with full syntax highlighting and auto-completion support. Changes are tracked automatically.
4
Save your work
Press
Cmd/Ctrl + S
to save the current file, or use auto-save to save changes automatically.File Management
File Explorer
The file explorer panel shows your entire project structure:- Create new files: Right-click in the explorer and select “New File”
- Rename files: Right-click and select “Rename” or press
F2
- Delete files: Right-click and select “Delete” (with confirmation)
- Move files: Drag and drop to reorganize your project

File explorer showing project structure with context menu options
Supported File Types
The editor provides specialized support for:- React/JSX: Component editing with JSX syntax support
- TypeScript: Full type checking and IntelliSense
- CSS/SCSS: Style editing with color previews
- JSON: Configuration files with schema validation
- Markdown: Documentation with live preview
Editor Features
Multi-Cursor Editing
HoldAlt/Option
and click to add multiple cursors, allowing you to edit multiple locations simultaneously.
Code Folding
Click the arrow icons in the gutter to collapse/expand code blocks, making it easier to navigate large files.Split View
Open multiple files side-by-side by dragging tabs or usingCmd/Ctrl + \
to split the editor.

Split view showing HTML and CSS files side-by-side
Keyboard Shortcuts
Essential Shortcuts
Action | Windows/Linux | Mac |
---|---|---|
Save file | Ctrl + S | Cmd + S |
Open file | Ctrl + P | Cmd + P |
Find in file | Ctrl + F | Cmd + F |
Find & Replace | Ctrl + H | Cmd + H |
Comment line | Ctrl + / | Cmd + / |
Duplicate line | Ctrl + D | Cmd + D |
Move line up/down | Alt + ↑/↓ | Option + ↑/↓ |
Multi-cursor | Alt + Click | Option + Click |
Advanced Shortcuts
Action | Windows/Linux | Mac |
---|---|---|
Go to definition | F12 | F12 |
Find all references | Shift + F12 | Shift + F12 |
Rename symbol | F2 | F2 |
Format document | Shift + Alt + F | Shift + Option + F |
Toggle terminal | Ctrl + `` | Cmd + `` |
Working with Git
The Code Editor includes Git integration:- View changes: Modified files are marked in the explorer
- Diff view: See what changed in each file
- Stage changes: Select which changes to include
- Commit: Write commit messages and push changes
Version Control: All changes are automatically tracked. You can view file history and revert changes at any time.
Tips for Efficient Coding
Pro Tips:
- Use
Cmd/Ctrl + Shift + P
to open the command palette for quick access to all editor commands - Enable auto-save in settings to never lose your work
- Use the minimap on the right for quick navigation in large files
- Customize your theme and font size in editor settings
Important: While the Code Editor gives you full control, be careful when modifying core files. Always test your changes in preview before publishing.
Common Use Cases
Customizing Components
- Locate the component file in the explorer
- Make your modifications
- Preview changes in real-time
- Save when satisfied
Adding Custom CSS
- Open your stylesheet file
- Add new styles or modify existing ones
- Use the color picker for easy color selection
- See changes reflected immediately in preview
Implementing New Features
- Create new component files
- Import necessary dependencies
- Write your implementation
- Test thoroughly before publishing
Troubleshooting
Code Not Updating
- Ensure you’ve saved your changes (
Cmd/Ctrl + S
) - Check for syntax errors in the problems panel
- Refresh the preview window if needed
IntelliSense Not Working
- Wait a moment for the language server to initialize
- Ensure your file has the correct extension
- Check for errors in imported modules
Need Help? The editor includes built-in documentation. Hover over any function or component to see its documentation, or press
Cmd/Ctrl + Click
to jump to its definition.