Editor Basics
The Prompt Editor uses Monaco Editor — the same editor that powers VS Code — providing a familiar, powerful editing experience with syntax highlighting, autocomplete, and professional keyboard shortcuts.
Editor Interface
Layout Overview
+--------------------------------------------------+
| [Prompt] [Deployments] [History] [Actions] | <- Header with tabs
+--------------------------------------------------+
| |
| Your prompt content here... | <- Editor area
| {{ variables }} highlighted |
| [[ injections ]] highlighted |
| |
+--------------------------------------------------+Header Elements
| Element | Description |
|---|---|
| Tab Bar | Switch between Prompt, Deployments, and History views |
| Save Indicator | Shows current save state (Saving, Saved, Error) |
| Playground | Toggle the quick testing panel |
| Lab | Toggle the test cases panel |
| Outline | Toggle document outline view |
| Metadata | Toggle variables and tags panel |
Keyboard Shortcuts
Essential Shortcuts
| Action | Mac | Windows/Linux |
|---|---|---|
| Save | Cmd + S | Ctrl + S |
| Quick Run | Cmd + Enter | Ctrl + Enter |
| Command Palette | Cmd + Shift + I | Ctrl + Shift + I |
| Quick Insert | Cmd + Shift + I | Ctrl + Shift + I |
Text Editing
| Action | Mac | Windows/Linux |
|---|---|---|
| Find | Cmd + F | Ctrl + F |
| Find & Replace | Cmd + H | Ctrl + H |
| Add Cursor | Cmd + D | Ctrl + D |
| Undo | Cmd + Z | Ctrl + Z |
| Redo | Cmd + Shift + Z | Ctrl + Y |
Navigation
| Action | Mac | Windows/Linux |
|---|---|---|
| Go to Line | Cmd + G | Ctrl + G |
| Go to Start | Cmd + Home | Ctrl + Home |
| Go to End | Cmd + End | Ctrl + End |
Command Palette
Press Cmd + Shift + I (Mac) or Ctrl + Shift + I (Windows) to open the command palette with quick access to:
- Run — Execute the prompt in playground
- Save — Manually save changes
- Deploy — Create a production deployment
- Find — Open search
- Replace — Open find and replace
- Insert Variable — Add a variable reference
- Insert Injection — Add a prompt reference
- Toggle Preview — Switch between edit and preview modes
Quick Insert Popup
The Quick Insert popup (Cmd + Shift + I) provides fast access to:
Variables Tab
- Shows all defined variables (both own and inherited)
- Displays variable name, type, and description
- Inserts
{{ variableName }}at cursor position
Injections Tab
- Lists all available prompts in your workspace
- Shows prompt path and preview
- Inserts
[[ folder/prompt-name ]]at cursor position
Navigation:
Tab— Switch between tabsArrow Up/Down— Navigate itemsEnter— Insert selected itemEscape— Close popup- Type to filter items
Slash Commands
Type / in the editor to access a quick command menu for inserting variables, prompt injections, and prompt engineering patterns.
Trigger Behavior
| Context | Triggers? | Example |
|---|---|---|
| Start of line | Yes | /json |
| After whitespace | Yes | text /cot |
| Inside URLs | No | https:// |
| Inside paths | No | /usr/bin |
Command Priority
When typing /, suggestions appear in this order:
| Priority | Command | Action |
|---|---|---|
| 1 | /var | Opens Quick Insert popup (Variables tab) |
| 2 | /prompt | Opens Quick Insert popup (Injections tab) |
| 3 | System snippets | /cot-standard, /json-strict, etc. |
| 4 | Individual variables | /var username, /var email |
| 5 | Individual injections | /prompt folder/my-prompt |
Namespace Pickers
The /var and /prompt commands open the Quick Insert popup with the appropriate tab pre-selected:
/var— Opens popup with Variables tab active/prompt— Opens popup with Injections tab active
System Snippets
24 pre-built prompt engineering patterns organized by category:
Guardrails & Security:
/xml-boundaries— Prompt injection defense/chain-verify— Hallucination detection/no-yap— Strict conciseness/deny-mode— Safe refusal patterns/context-minimize— Least-privilege contexts/structured-constraint— JSON schema enforcement
Reasoning & Logic:
/cot-standard— Chain of Thought/cot-math— Math-specific CoT/few-shot-block— Few-shot template/self-consistency— Voting mechanism/tot-explore— Tree of Thoughts/react-loop— ReAct pattern/step-back— Abstraction prompting/graph-of-thought— Graph-based reasoning
Structure & Formatting:
/json-strict— JSON enforcement/xml-wrapper— XML tag wrapping/delimiter-clean— Section delimiters/output-declare— Output type declaration/code-block— Code generation format
Personas:
/role-setting— Dual-stage persona/expert-prompt— Expert persona/audience-frame— Audience-centric framing
Bonus:
/rag-inject— RAG context header/token-preserve— Token efficiency
Snippet Tab Stops
Snippets use tab-stop placeholders (${1:placeholder}) for quick editing:
- Insert the snippet
- Cursor moves to first placeholder
- Press
Tabto jump to next placeholder - Edit each placeholder as needed
Syntax Highlighting
The editor uses the N8N language mode for intelligent highlighting:
| Syntax | Color | Description |
|---|---|---|
{{ variable }} | Purple | Variable expressions |
[[ prompt ]] | Cyan | Prompt injections |
$helper() | Pink | Helper function calls |
| Comments | Muted gray | Standard text |
Validation Indicators
The editor shows visual indicators for issues:
- Red underline — Undefined variable
- Yellow underline — Warning (variable name with hyphens)
- Lightbulb icon — Quick fix available (click to see options)
Auto-Save
The editor automatically saves your work using an intelligent debounce strategy:
How Auto-Save Works
- Wait for pause — After you stop typing for 2 seconds, save triggers
- Periodic backup — If you keep typing, saves every 10 seconds
- Retry on failure — If save fails (network issue), retries up to 3 times
- Exponential backoff — Retry delays: 1s, 3s, 5s
Save States
| State | Indicator Color | Description |
|---|---|---|
| Idle | — | No changes to save |
| Saving | Blue | Saving in progress |
| Saved | Green | Successfully saved |
| Retrying | Orange | Retrying after failure |
| Error | Red | All retries failed |
Manual Save
Press Cmd + S to save immediately. This also:
- Creates a version snapshot for history
- Updates the “last modified” timestamp
- Shows a toast confirmation
Mobile Experience
The editor is optimized for mobile devices:
- Larger text — 16px font to prevent iOS zoom
- Touch scrollbars — Wider (20px) for easy touch control
- Icon-only buttons — Compact header on small screens
- Disabled suggestions — Prevents keyboard interference
Mobile Gestures
- Tap — Position cursor
- Long press — Show context menu
- Pinch — Not supported (use browser zoom)
Multi-Cursor Editing
Create multiple cursors for simultaneous editing:
- Add cursor at next match:
Cmd + D(Mac) /Ctrl + D - Add cursors manually:
Option + Click(Mac) /Alt + Click - Type to edit all positions simultaneously
Useful for:
- Renaming variables across a prompt
- Adding prefixes/suffixes to multiple lines
- Batch-editing similar text patterns
Double-Click Navigation
Double-click on an injection reference to navigate directly to that prompt:
[[ folder/my-prompt ]]
↑ double-click hereThis opens the referenced prompt in a new editor tab, making it easy to explore prompt dependencies.
Drag and Drop
Drag prompts from the sidebar into the editor to insert injection references:
- Find the prompt you want to inject in the sidebar
- Drag it into your editor at the desired position
- The editor inserts
[[ folder/prompt-name ]]automatically
Tips for Efficient Editing
- Use Command Palette — Faster than clicking buttons
- Master Cmd+D — Multi-cursor editing saves time
- Quick Insert for variables — Don’t type
{{manually - Double-click injections — Navigate quickly between prompts
- Watch the save indicator — Ensure your work is saved before leaving