Fresh - A Next-Generation Terminal Editor Written in Rust
Fresh - A Next-Generation Terminal Editor Written in Rust
Fresh is a modern, full-featured terminal text editor (TUI) written in Rust, designed to bring a VS Code or Sublime Text-like experience to the terminal. For users who find Vim/Emacs too steep a learning curve, yet find Nano too limited, Fresh offers a “zero-config, out-of-the-box” middle ground.
1. Core Design Philosophy
Zero Learning Curve: Fresh abandons traditional “modal editing” (like Vim’s command mode), adopting the same keybindings as modern desktop editors: Ctrl+S to save, Ctrl+C/V to copy/paste.
Extreme Performance: Powered by Rust, it can open multi-GB log files instantly with minimal memory footprint (a 2GB file typically uses only a few dozen MB of RAM).
Ready Out of the Box: Built-in file tree, command palette, and LSP support — no need to write complex init scripts like configuring Neovim.
2. Key Features
Extreme Performance
Fresh uses a Persistent Piece Tree data structure with lazy loading. It only loads the visible portion of a file rather than reading the entire file into memory, enabling near-instant opening of massive files.
Modern IDE Features
- LSP (Language Server Protocol) Support: Native code completion, go-to-definition, hover docs, and error diagnostics.
- Multiple Cursors: Select and edit multiple locations simultaneously, like Sublime.
- Built-in Command Palette: Press
Ctrl+Pto quickly find files or execute commands. - Built-in Terminal: Open a fully functional terminal directly within the editor.
Full Mouse Support
In traditional terminal editors, mouse support is often an afterthought. Fresh fully supports mouse click positioning, drag selection, scroll zoom, and menu operations — an experience very close to GUI software.
Plugin & Extensibility
Fresh’s plugin system is based on TypeScript (running in a sandboxed Deno/QuickJS environment). Developers can extend the editor using a familiar frontend language without learning complex low-level APIs.
3. Installation
# Node.js (temporary tryout)
npx @fresh-editor/fresh-editor
# Rust (Cargo)
cargo install fresh-editor
# Arch Linux (AUR)
yay -S fresh-editor-bin
# Install script (recommended)
curl https://raw.githubusercontent.com/sinelaw/fresh/refs/heads/master/scripts/install.sh | sh
4. Common Keybindings
| Action | Keybinding |
|---|---|
| Save file | Ctrl + S |
| Quick file search | Ctrl + P |
| Sidebar file tree | Ctrl + E |
| Find/Replace | Ctrl + F |
| Undo/Redo | Ctrl + Z / Ctrl + Y |
| Multi-line indent | Tab / Shift + Tab |
5. Who Is It For?
- Developers: Need to do complex code editing on SSH remote servers but don’t want to memorize Vim keybindings.
- DevOps: Often need to view multi-GB log files.
- Beginners: Want a terminal tool more powerful than Nano yet friendlier than Vim.
It represents the direction of next-generation TUI tools: as powerful as command-line tools, yet as intuitive as GUI software.