Skip to Content
DocsPrompt EditorEditor Basics

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

ElementDescription
Tab BarSwitch between Prompt, Deployments, and History views
Save IndicatorShows current save state (Saving, Saved, Error)
PlaygroundToggle the quick testing panel
LabToggle the test cases panel
OutlineToggle document outline view
MetadataToggle variables and tags panel

Keyboard Shortcuts

Essential Shortcuts

ActionMacWindows/Linux
SaveCmd + SCtrl + S
Quick RunCmd + EnterCtrl + Enter
Command PaletteCmd + Shift + ICtrl + Shift + I
Quick InsertCmd + Shift + ICtrl + Shift + I

Text Editing

ActionMacWindows/Linux
FindCmd + FCtrl + F
Find & ReplaceCmd + HCtrl + H
Add CursorCmd + DCtrl + D
UndoCmd + ZCtrl + Z
RedoCmd + Shift + ZCtrl + Y
ActionMacWindows/Linux
Go to LineCmd + GCtrl + G
Go to StartCmd + HomeCtrl + Home
Go to EndCmd + EndCtrl + End

Command Palette

Press Cmd + Shift + I (Mac) or Ctrl + Shift + I (Windows) to open the command palette with quick access to:

  1. Run — Execute the prompt in playground
  2. Save — Manually save changes
  3. Deploy — Create a production deployment
  4. Find — Open search
  5. Replace — Open find and replace
  6. Insert Variable — Add a variable reference
  7. Insert Injection — Add a prompt reference
  8. 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 tabs
  • Arrow Up/Down — Navigate items
  • Enter — Insert selected item
  • Escape — 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

ContextTriggers?Example
Start of lineYes/json
After whitespaceYestext /cot
Inside URLsNohttps://
Inside pathsNo/usr/bin

Command Priority

When typing /, suggestions appear in this order:

PriorityCommandAction
1/varOpens Quick Insert popup (Variables tab)
2/promptOpens Quick Insert popup (Injections tab)
3System snippets/cot-standard, /json-strict, etc.
4Individual variables/var username, /var email
5Individual 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:

  1. Insert the snippet
  2. Cursor moves to first placeholder
  3. Press Tab to jump to next placeholder
  4. Edit each placeholder as needed

Syntax Highlighting

The editor uses the N8N language mode for intelligent highlighting:

SyntaxColorDescription
{{ variable }}PurpleVariable expressions
[[ prompt ]]CyanPrompt injections
$helper()PinkHelper function calls
CommentsMuted grayStandard 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

  1. Wait for pause — After you stop typing for 2 seconds, save triggers
  2. Periodic backup — If you keep typing, saves every 10 seconds
  3. Retry on failure — If save fails (network issue), retries up to 3 times
  4. Exponential backoff — Retry delays: 1s, 3s, 5s

Save States

StateIndicator ColorDescription
IdleNo changes to save
SavingBlueSaving in progress
SavedGreenSuccessfully saved
RetryingOrangeRetrying after failure
ErrorRedAll 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:

  1. Add cursor at next match: Cmd + D (Mac) / Ctrl + D
  2. Add cursors manually: Option + Click (Mac) / Alt + Click
  3. 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 here

This 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:

  1. Find the prompt you want to inject in the sidebar
  2. Drag it into your editor at the desired position
  3. The editor inserts [[ folder/prompt-name ]] automatically

Tips for Efficient Editing

  1. Use Command Palette — Faster than clicking buttons
  2. Master Cmd+D — Multi-cursor editing saves time
  3. Quick Insert for variables — Don’t type {{ manually
  4. Double-click injections — Navigate quickly between prompts
  5. Watch the save indicator — Ensure your work is saved before leaving
Last updated on