xless is a viewer-first TUI editor for macOS, Linux, and Windows, built in Rust. It opens very large files (100 MB to GB) quickly, stays responsive under heavy operations, and provides a simple, explicit Edit mode (no vim semantics).
Most terminal editors either:
- load too much into memory,
- freeze on big logs,
- or expect you to worship modal editing.
xless is optimized for the common workflow: open a huge file, inspect/search it fast, and only edit when you explicitly switch to Edit mode.
- Fast open for big files (read-mostly mode for very large inputs)
- Viewer-first UX (less-style navigation and search)
- Explicit modes:
- View mode (default): safe navigation/search
- Edit mode: predictable editing (nano/FAR-like)
- No full-file copying: piece table (original + add buffer)
- UTF-8 safe editing: operations respect code point boundaries
- Async heavy work: search/highlight/indexing runs in workers, UI stays responsive
- Windowed rendering: renders only the visible viewport
This project is in active development. Core phases (0–7) are implemented: stable TUI lifecycle, piece table model, UTF-8 safety, viewport rendering, basic editor, modes, less-style search, and async job architecture.
- Rust stable (latest recommended)
# Build (optimized)
cargo build --release
# Run
cargo run --release -- path/to/file.txtFor very large files xless can enter read-mostly mode to avoid expensive operations and keep memory usage predictable. In this mode, editing may be disabled or limited by design (viewer-first).
If your build has a specific size threshold (for example 200 MB), document it here. If you changed the threshold in code, update this README accordingly.
-
View mode (default)
- Safe navigation
- Search and match navigation
- Paging and jumps
- Designed to behave like a familiar viewer (less/FAR)
-
Edit mode
- Explicitly enabled
- Normal typing, delete/backspace, line breaks
- Undo/redo
- Intended for focused edits, not bulk transformations
The status line shows the current mode and prompts.
- Search is asynchronous to avoid UI freezes on large inputs.
- Matches can be navigated forward/backward.
- After edits, search results are invalidated and must be rerun (prevents stale offsets).
Note: search may support regex depending on the current implementation.
xless intentionally keeps bindings simple and viewer-first. The exact mapping may evolve while the project stabilizes.
- Arrow keys: move cursor
- PageUp/PageDown: page navigation
/: search promptn/N: next/previous matchg/G: jump to start/end (if implemented)q: quit (or via Ctrl-Q, depending on platform)
- Typing: insert text
- Backspace/Delete: remove text
- Ctrl-S: save
- Ctrl-Z / Ctrl-Y: undo/redo (or other configured bindings)
If your actual bindings differ, update this section to match the code. (Prefer documenting only what is implemented.)
# Unit tests
cargo test
# Optional: large-file smoke tests (if present in the repo)
./tests/test_large_file.shRecommended additional checks:
- Open a multi-hundred-megabyte log file and confirm UI remains responsive during async search.
- Validate behavior on non-UTF-8 input (should remain visible, not disappear).
- More robust line/column mapping for long lines and extreme horizontal scroll
- Viewport-only syntax highlighting (tree-sitter “on window”)
- Bulk operations in view mode (filter/export)
- Optional AI-assisted analysis as an external process (kept out of the core editor)
Apache-2.0
Copyright Modcrafter © 2026