A small terminal editor that comes ready to use.
rev is a text editor for the terminal, written in Rust and strongly inspired by Emacs. It has the everyday things in the box: buffers, split windows, search and replace, a file tree, syntax highlighting and Org mode. No packages to install, and light on CPU and memory.*
$ rev notes.txt
What is in the box
C- is
Control, M- is Alt. Every binding is also a named
command you can reach from M-x.
- Buffers
- Open, switch, list and close.
- C-x C-f C-x b C-x k
- Windows
- Split horizontally or vertically. Each view keeps its own cursor.
- C-x 2 C-x 3 C-x o
- Search
- Incremental search, and query-replace.
- C-s C-r M-%
- File tree
- Browse, create, rename and delete files from a side pane.
- C-x t t C-x t f
- Kill ring
- Mark, kill, yank, and rotate through the last 32 kills.
- C-SPC C-w C-y M-y
- Rectangles
- Select, cut and paste columns of text.
- C-x SPC C-x r k C-x r y
- Bookmarks
- Name a position and jump back to it, also after a restart. Positions follow your edits.
- C-x r m C-x r b C-x r l
- Undo
- Per buffer.
- C-/ C-x u
- Commands
- Run any command by name, with completion.
- M-x
- Org mode
- Outlines, folding, tasks and dates, agenda, capture, clocks, tables and export.
- TAB S-TAB C-c a C-c c
- Terminal
- Run shells and other terminal programs inside the editor. Pipe text through shell commands such as sort.
- M-! M-|
- Git
- Review diffs, stage changes and commit. Browse history, manage branches and resolve conflicts.
- C-x g
- Completion
- Built in for Rust, C, Go, JavaScript, TypeScript, HTML and CSS. Add a language server for semantic completion in any language.
- AI
- Save AI commands for repeated edits, or prompt once to change the buffer. Explain code, or implement at point.
Absolute or relative line numbers, mouse clicks, scrolling and drag selection,
goto-line, tabify and untabify.
The full list is in the
key bindings reference.
Also, prefer modal editing? rev has Vim motions and : commands too.
One file of settings
Settings live in ~/.config/rev/config.toml. Change
what you need and restart.
[editor]
# "spaces" or "tabs"; global policy, overridable per language.
indent_style = "spaces"
indent_width = 4
[gutter]
# "absolute" or "relative" logical line calculation.
mode = "relative"
[mouse]
enabled = true
scroll_lines = 3
Install
rev builds from source into a single executable that works offline. You need Linux, Rust 1.98 or newer and a C compiler.
$ git clone https://forge.adrianpk.com/adrianpk/rev.git
$ cd rev
$ cargo install --path .
$ rev
C-x C-s saves, C-g cancels whatever is happening, C-x C-c quits.