1.7 KiB
文 (wen)
wen is an experimental terminal text editor, written during the Winter 2022 batch at the Recurse Center. It was an exploration of terminal raw mode, ANSI escape sequences, and UTF-8 / wide-character glyph rendering. It works only as a very simple text editor.
A motivating idea behind wen was to keep the editor itself minimal. Text manipulation would be delegated to external programs and saved shell snippets. Selected regions would be piped through standard input and output; for example:
- Convert case:
tr '[:lower:]' '[:upper:]' - Sort and deduplicate lines:
sort -u - Reflow paragraphs or align columns:
fmt -w 72,column -t - Search and replace:
sed 's/foo/bar/g'
This piping mechanism was left unimplemented, along with undo/redo, line numbers, jumping to characters, Unicode combining marks, and bidirectional text support.
Usage
wen [file]
If no file is specified, wen opens a scratch buffer in $XDG_CACHE_HOME/wen/scratch.
Logs are written to $XDG_CACHE_HOME/wen/log.
Controls
| Key | Action |
| Arrow keys | Move cursor |
Home / End |
Start / end of line |
PageUp / PageDown |
Scroll up / down a page |
Ctrl-s |
Save buffer |
Ctrl-x |
Save buffer as |
Ctrl-q |
Quit |
Escape |
Cancel prompt |
Installation
go install code.chimeric.al/dwrz/wen/cmd/wen@latest
