[ANN] Fresh: A Terminal-Based Editor in Rust—Easy-to-Use, Extensible, and Light. Opens 2GB Log File in 600ms (with colors) using <40MB RAM.

114 points sinelaw 42 comments

Fresh is a new terminal-based text editor built in Rust, focused on ease-of-use, extensibility, speed and lightness. It is open source and developed by myself, individually.

sinelaw.github.io/fresh/

Fresh is open source (github) and developed by myself, individually.

💡 Design Focus

The Fresh text editor aims to provide modern features and ease-of-use of a contemporary GUI editor (e.g., VS Code), in a portable terminal setting. It aims to be as light and efficient as possible, handling huge files easily. It is not a modal editor and prioritizes a familiar user experience.

https://preview.redd.it/rfkt8nyigu4g1.png?width=1585&format=png&auto=webp&s=e5878650ea0295ee2951181a957d834bc4646580

✨ Features and Usability

  • Ease of Use: Features include mouse support (with scroll bars), a standard command palette (Ctrl+P), and common keybindings.
  • Built-in Tooling: Includes a native LSP client for intelligent code features, multi-cursor support, and standard syntax highlighting.
  • Extensibility: Plugins are written in Typescript. Current examples include Git Log navigation and a Git Blame inspector. More to come.

💨 Performance Data: Handling Huge Files

Fresh was engineered to handle large files lazily and efficiently. The following table compares performance when loading a 2GB log file containing numerous ANSI color codes:

Task / Editor Fresh Neovim Emacs VS Code
Initial Load Time ~600ms ~6.5 seconds ~10 seconds ~20 seconds
ANSI Color Rendering Yes No (raw control codes) No (raw control codes) No (raw control codes)
Peak Memory Usage ~36 MB ~2 GB ~2 GB OOM Killed (~4.3 GB available)

Fresh processes the large file data and renders colors simultaneously with minimal memory overhead.

🛠️ Status and Next Steps

This is the first public announcement!

I am seeking early adopters to use Fresh and report issues or provide feedback, and feature requests.

Website: sinelaw.github.io/fresh/

GitHub: https://github.com/sinelaw/fresh