Code Editor

A built-in Monaco-powered code editor with syntax highlighting, language detection, and direct file read/write — all without leaving the Rift Panel workspace.

The code editor panel embeds the same Monaco editor that powers VS Code. It connects to the Rust backend for file system operations, reading and writing files through Tauri's IPC bridge. This means you can view and edit project files in the same window where your terminal sessions are running, eliminating the need to switch between a separate editor and your terminal workspace.

Opening Files

There are several ways to open a file in the code editor:

  • From the File Explorer — Click any file in the File Explorer panel to open it in the nearest editor panel. If no editor panel exists, one is created automatically in a new split.
  • From the Command Palette — Press Ctrl+Shift+P and type "Open File" to launch the file picker. You can type a file path directly or browse the file system.
  • Drag and drop — Drag a file from your operating system's file manager into an editor panel to open it.

When multiple files are open, each file gets its own tab in the editor panel's tab bar. Click a tab to switch between files, or use Ctrl+Tab to cycle through open tabs.

Editor Features

The Monaco editor provides a rich editing experience out of the box:

  • Syntax highlighting — Language-specific tokenization and coloring for dozens of languages. The editor uses TextMate-compatible grammars for accurate highlighting of nested structures, strings, comments, and keywords.
  • Automatic language detection — The editor detects the language from the file extension and applies the correct syntax grammar. You can also manually override the language from the status bar at the bottom of the editor.
  • Line numbers — Line numbers are displayed in the gutter. Click a line number to select the entire line. Click and drag to select a range of lines.
  • Minimap — A minimap on the right side of the editor provides a zoomed-out overview of the file. Click anywhere on the minimap to jump to that section. The minimap can be toggled off from the editor settings.
  • Find and replace — Press Ctrl+F to open the find bar, or Ctrl+H for find and replace. Supports regular expressions and case-sensitive matching.
  • Bracket matching — Matching brackets are highlighted when the cursor is adjacent to one. This works for parentheses, square brackets, and curly braces.
  • Code folding — Collapse and expand code blocks using the fold indicators in the gutter. Folding is language-aware, so it respects function boundaries, class definitions, and block structures.

Saving Files

Press Ctrl+S to save the active file. The save operation writes the buffer contents back to disk through the Rust backend. A brief save indicator appears in the status bar to confirm the write was successful.

When a file has unsaved modifications, the editor tab displays a dot indicator next to the file name. This modified indicator is visible even when the tab is not active, so you can quickly scan the tab bar to see which files have pending changes.

If a file is modified on disk by another process while you have it open, the editor detects the change and prompts you to reload the file or keep your current version.

Supported Languages

Monaco ships with built-in syntax support for a wide range of languages. The following are the most commonly used languages in Rift Panel workflows:

LanguageExtensions
TypeScript.ts, .tsx
JavaScript.js, .jsx, .mjs
Python.py
Rust.rs
Go.go
HTML.html, .htm
CSS / SCSS.css, .scss, .less
JSON.json, .jsonc
YAML.yaml, .yml
Markdown.md
Shell.sh, .bash, .zsh
Dart.dart
C / C++.c, .cpp, .h
Java.java
SQL.sql
DockerfileDockerfile
TOML.toml

If a file type is not automatically recognized, you can manually set the language mode from the language selector in the editor status bar.

The code editor is designed for quick edits and file review. For heavy development workflows, you may prefer to use your full IDE alongside Rift Panel and use the editor panel for fast reference and small changes.