COSMIC Text Editor
The text editor for the System76 COSMIC desktop environment, written in Rust with the iced GUI library, featuring syntax highlighting and Vi mode.
COSMIC Text Editor is the official text editor for the COSMIC desktop
environment, developed by System76 entirely in Rust using the
iced GUI toolkit. It is part of a broader
effort to build a complete, modern Linux desktop from scratch in Rust, and
serves as the day-to-day editor for anyone running COSMIC on Pop!_OS or other
compatible distributions. As with the rest of the COSMIC suite, it is currently
pre-alpha — functional and actively developed, but expect rough edges.
Features
- Syntax highlighting — Broad language support powered by tree-sitter and syntect, with accurate, context-aware token colouring.
- Vi mode — Modal editing keybindings for users who prefer a Vim-style workflow without leaving the GUI.
- Multi-tab editing — Open multiple files simultaneously in a familiar tabbed interface.
- cosmic-text rendering — Built on the
cosmic-textlibrary for high-quality text shaping with full ligature support and correct bidirectional (BiDi) text rendering. - System theme integration — Automatically follows the COSMIC desktop's light or dark colour scheme preference.
- Find and replace — In-buffer search with regex support.
- Line numbers and minimap — Standard editor affordances present from the start.
- Git diff gutter — Highlights added, modified, and removed lines alongside the line number gutter.
Installation
COSMIC Text Editor ships as part of Pop!_OS by default once the COSMIC session is installed. For other distributions, build from source using Cargo:
# Install build dependencies (Debian / Ubuntu)
sudo apt install just rustup libxkbcommon-dev libwayland-dev
# Install build dependencies (Fedora)
sudo dnf install just rust cargo libxkbcommon-devel wayland-devel
# Clone and build
git clone https://github.com/pop-os/cosmic-edit
cd cosmic-edit
just build-release
# Install to the system
sudo just install# macOS (via Homebrew for build deps, then Cargo)
brew install just
git clone https://github.com/pop-os/cosmic-edit
cd cosmic-edit
just build-release# Arch Linux (AUR)
paru -S cosmic-edit-git# Nix (unstable)
nix-env -iA nixpkgs.cosmic-edit
Note: COSMIC Text Editor is pre-alpha software. A stable versioned release has not yet been published. The
gittip on themainbranch is the recommended installation source.
Quick Start
Once installed, launch COSMIC Text Editor from your application launcher or via the desktop session. From the command line:
# Open a file directly
cosmic-edit path/to/file.rs
# Open the current directory
cosmic-edit .
Key default bindings:
| Action | Shortcut |
|---|---|
| Open file | Ctrl+O |
| Save | Ctrl+S |
| Save as | Ctrl+Shift+S |
| New tab | Ctrl+T |
| Close tab | Ctrl+W |
| Find | Ctrl+F |
| Toggle Vi mode | Menu → View → Vi Mode |
| Switch tab | Ctrl+Tab / Ctrl+Shift+Tab |
Vi Mode
Vi mode in COSMIC Text Editor provides standard modal editing semantics: Normal,
Insert, and Visual modes, with the usual motion commands (h j k l, w b e,
gg G, 0 $), operators (d y c), and counts. It is enabled per-buffer via
the View menu and persists across sessions once toggled on. The implementation
is actively expanding; check the repository issue tracker for the current
coverage of Vim commands.
The COSMIC Ecosystem
COSMIC Text Editor is one component of a full Rust-native desktop environment:
| Component | Repository |
|---|---|
| COSMIC Session | pop-os/cosmic-session |
| COSMIC Text Editor | pop-os/cosmic-edit |
| COSMIC Terminal | pop-os/cosmic-term |
| COSMIC Files | pop-os/cosmic-files |
| COSMIC Settings | pop-os/cosmic-settings |
| iced (GUI toolkit) | iced-rs/iced |
| cosmic-text (renderer) | pop-os/cosmic-text |
All components are written in Rust and rendered via iced on top of wgpu,
giving the entire desktop a single, coherent technology stack with no Electron
or web-view dependencies. cosmic-text — the shared text rendering library —
handles Unicode shaping, BiDi, and ligatures for every COSMIC application,
meaning COSMIC Text Editor inherits these capabilities automatically.
COSMIC Text Editor vs Helix
Both are Rust-native editors with Vi-influenced keybindings, but they serve different audiences:
| COSMIC Text Editor | Helix | |
|---|---|---|
| Interface | GUI (iced/Wayland) | TUI (terminal) |
| Primary input | Mouse + keyboard | Keyboard only |
| Vi mode | Optional toggle | Core design (selection-first) |
| LSP support | Planned | Built-in |
| Target user | COSMIC desktop users | Terminal power users |
| Release status | Pre-alpha | Stable |
Choose COSMIC Text Editor if you are building a workflow around the COSMIC desktop and want a GUI editor that matches the system aesthetic. Choose Helix if you live in the terminal and want a mature, LSP-driven modal editor today.