diff --git a/README.org b/README.org new file mode 100644 index 0000000..f03bd61 --- /dev/null +++ b/README.org @@ -0,0 +1,44 @@ +* 文 (wen) + +[[file:wen.jpg]] + +~wen~ is an experimental terminal text editor, written during the Winter 2022 batch at the [[https://www.recurse.com/][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 + +#+begin_src shell +wen [file] +#+end_src + +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 + +#+begin_src shell +go install code.chimeric.al/dwrz/wen/cmd/wen@latest +#+end_src diff --git a/wen.jpg b/wen.jpg new file mode 100644 index 0000000..19a4398 Binary files /dev/null and b/wen.jpg differ