Skip to main content

Built-in Editor

GenieBuilder includes a full-featured code editor powered by a modern editing component. It provides syntax highlighting, editing capabilities, and integration with the workspace—all without leaving the desktop app.

Built-in Editor

Supported Languages

The editor provides first-class support for:

Programming Languages

LanguageSyntax HighlightingNotes
Java✅ Full
TypeScript✅ FullIncludes JSX/TSX support
JavaScript✅ FullES2023+ support
Python✅ FullPython 3.x syntax
Go✅ FullGo 1.21+ support
Rust✅ FullRust 2021 edition

Markup & Config

LanguageSyntax Highlighting
HTML✅ Full
XML✅ Full
JSON✅ Full
YAML✅ Full
Markdown✅ Full
CSS/SCSS✅ Full

Fallback

Files with unsupported extensions open as plain text with basic editing capabilities.

Editor Features

Core Editing

  • Multi-cursor editingAlt/Cmd + Click to place multiple cursors
  • Block selectionAlt/Cmd + Shift + Drag for column selection
  • Auto-indentation — Smart indentation based on language
  • Bracket matching — Highlight matching brackets
  • Code folding — Collapse/expand code blocks

Search & Replace

  • FindCtrl/Cmd + F
  • ReplaceCtrl/Cmd + H
  • Find in filesCtrl/Cmd + Shift + F (project-wide)
  • Regex support — Pattern matching in search
  • Go to lineCtrl/Cmd + G
  • Symbol navigation — Jump to definitions

Visual

  • Line numbers — Toggle in settings
  • Active line highlight — Current line indication
  • Selection highlight — Occurrence highlighting
  • Whitespace rendering — Optional visible whitespace

Workspace Integration

File Operations

Files are opened through workspace-scoped IPC:

  1. File selected in explorer
  2. IPC request to main process
  3. Path validation — Ensure within workspace root
  4. Size check — Reject files > 1 MiB
  5. Content loaded and sent to renderer
  6. Editor tab opened with content

Save Flow

User presses Ctrl+S

Editor content sent via IPC

Main process validates path

File written to disk

Success/error returned

Editor shows save status

Auto-save

Optional auto-save on:

  • Focus change
  • Delay after typing (configurable)
  • Window close

File Explorer Integration

Opening Files

  • Click — Open in current tab
  • Double-click — Open in new tab
  • Right-click — Context menu options

File Tree

  • Respects .gitignore — Hidden files filtered
  • Folder expansion — Lazy-loaded children
  • File icons — Language-based icons
  • Active file highlight — Current tab indicated

Limits

For predictable performance:

LimitValueRationale
Visible items5,000Prevent UI freezing
File size1 MiBLarge files open as unsupported
Nesting depth20 levelsPrevent stack overflow

Security Considerations

Path Validation

  • Workspace root enforcement — Files outside root rejected
  • Symlink rejection — Prevents path escape
  • Path normalization — Resolve .. segments

Content Handling

  • Binary file detection — Open as unsupported
  • Large file protection — Size limits enforced
  • Encoding — UTF-8 default, BOM handling

Editor Settings

Configurable options:

SettingOptionsDefault
ThemeLight, Dark, SystemSystem
Font size10-24px14px
Font familyMonospace fontsJetBrains Mono
Line numbersOn, OffOn
Word wrapOn, OffOff
Tab size2, 4, 84
Insert spacesYes, NoYes
Auto-saveOn, OffOff

Keyboard Shortcuts

The built-in editor supports standard keyboard shortcuts:

ShortcutAction
Ctrl/Cmd + SSave file
Ctrl/Cmd + /Toggle comment
Ctrl/Cmd + Shift + KDelete line
Alt + ↑/↓Move line up/down