Skip to content
Terminal > Code

Built-in editor

A fast editor with syntax highlighting, completion, and save-time checks.


Mel ships a real editor so quick fixes never force a context switch. It opens files from the project explorer, global search results, and the code review panel, and it speaks to the same language servers as the rest of the app.

Opening files

  • Project explorer (tools panel, ctrl+\): double-click any file.
  • Global search (ctrl+shift+F): click a hit — the editor opens at that exact line, in a side panel next to your terminal.
  • Code review panel: click ✎ on a file card, or ctrl+click an identifier in a diff to jump to its definition. Files opened from inside the review flow fill the window.

The editor always opens scrolled to the target line when there is one.

What you get

  • Header: a back button (✕), the file path, a dirty-state ● when you have unsaved changes, and a live status — saved, "ctrl+S to save", checking…, or ✗ N errors.
  • Gutter: line numbers rendered in the same monospace font as the code, so everything lines up.
  • Highlighting: full syntax highlighting (syntect) via a custom layouter — the buffer stays a plain editable text field underneath.
  • Diagnostics: with a language server enabled, the document syncs on a short debounce as you type and errors stream into the footer live — no save needed. Without a server, Rust files fall back to running cargo check on save.

Completion

Type two or more identifier characters and a popup appears with matching identifiers drawn from the current buffer:

  • / — move the selection
  • Tab — accept the selected completion
  • Escape — dismiss

These keys are consumed by the popup before the text field sees them, so accepting a completion never inserts a stray tab.

Saving

ctrl+S (cmd on macOS) writes the file to disk. If you opened the editor from the review panel, closing it reloads the diff so the cards reflect what you just changed.

Promote to a tab

The path area in the editor header is a drag handle. Drag it out of the panel and release: Mel creates a new tab titled with the file path, and the editor expands to fill it. Use this when a "quick look" turns into a real editing session and you want your terminal split back.