Fred Text — a super lightweight text editor written in Rust.
frext is a small GUI text editor built on egui/eframe. It aims to be minimal and fast while still offering the conveniences that make a daily driver pleasant: tabs, session persistence, and syntax highlighting.
- Tabs. Edit multiple buffers in one window.
- Session persistence. Unsaved work survives quitting and reopening. Every keystroke is written to a per-tab swap file under the platform state directory, so an unsaved buffer is exactly as you left it on the next launch — even after a crash.
- Catppuccin Mocha theme. The palette is defined in
frext-coreand applied directly to egui's visuals, so there is no theme-crate dependency to drift behind egui releases. - Bundled coding font with ligatures. frext embeds the CaskaydiaCove
Nerd Font (Cascadia Code) and installs it as the editor's monospace
face, so coding ligatures (
->,=>,!=, …) and a broad glyph set render out of the box, independent of what fonts the host has installed. - Emoji. frext discovers a usable system emoji font at startup and slots it into the font fallback chain, so emoji in a file render (monochrome — egui cannot draw colour emoji). Colour-bitmap fonts that egui cannot rasterise are skipped automatically.
- Native file dialogs for open and save.
- Open from the command line.
frext file.txtopens the file on launch (alongside any restored session). A file that is already open is focused rather than opened twice. - Syntax highlighting. Powered by syntect with the
batsyntax collection (viatwo-face), driven directly by frext, with the language auto-detected from the file extension. Untitled or extension-less buffers render as plain text. - Spelling and grammar checking. Powered by
Harper, entirely offline.
Misspellings get a red wavy underline and grammar issues a green one.
Untitled buffers, plain-text and Markdown files, commit messages, and
extensionless files such as
READMEare checked in full; in code (recognised by extension or by name, e.g.Makefile), only comments and string literals are checked. Files with an unrecognised extension are not checked. Right-click a squiggle for suggested fixes, "Add to dictionary" (saved todictionary.txtin the state directory), or "Ignore" (for the rest of the session). - File-tree sidebar. Launch
frext path/to/dirto open a directory in a resizable sidebar. Click a file to open it; the active file is highlighted in the tree. The workspace root and which folders you have expanded persist across sessions. - External-change reload. If a file's size changes on disk while it is open, frext reloads it automatically — unless the buffer has unsaved edits, which are never overwritten.
frext # restore the previous session
frext notes.txt a.rs # open files (added to the restored session)
frext path/to/project # open a directory in the file-tree sidebar| Shortcut | Action |
|---|---|
| Ctrl+N | New tab |
| Ctrl+O | Open file |
| Ctrl+S | Save active tab |
| Ctrl+W | Close tab |
State lives under the platform state directory (on Linux,
$XDG_STATE_HOME/frext, typically ~/.local/state/frext):
frext/
session.json # tab order, ids, paths, active tab, workspace
swap/
<id>.swp # full text of each tab's buffer
On launch, a tab's swap file is the source of truth for its content, so unsaved edits always win over what is currently on disk.
frext uses a Nix flake for a reproducible dev environment.
nix develop # enter the dev shell (or use direnv: `direnv allow`)
cargo run # build and runWithout Nix you will need the usual egui runtime libraries on Linux
(libxkbcommon, wayland, libGL) plus pkg-config.
Add frext to your flake inputs and import the Home Manager module:
{
inputs.frext.url = "github:fredsystems/frext";
# In your Home Manager configuration:
imports = [ inputs.frext.homeManagerModules.default ];
programs.frext.enable = true;
}The package is also exposed as an overlay (frext.overlays.default,
adding pkgs.frext) and directly as
frext.packages.${system}.frext.
frext is a Cargo workspace of two crates:
frext-core— the frontend-independent core: theEditorcontroller (driven byCommands, returningEffects), buffers, session persistence, the workspace tree, search, proofreading, syntax highlighting into styled spans, and the colour palette. It never depends on a UI toolkit.frext— the egui/eframe GUI front end and thefrextbinary.
Run the checks from the repository root, inside the dev shell
(nix develop); they cover both crates:
cargo fmt --all -- --check
cargo clippy --all-targets --all-features -- -D warnings
cargo test --all
cargo macheteMIT. See LICENSE.
frext bundles the CaskaydiaCove Nerd Font under the SIL Open Font License 1.1. See ATTRIBUTIONS.md for the full attribution and license details.