From b2de0ca5d703db8d6c2fe6a53a582b62bb105bbc Mon Sep 17 00:00:00 2001 From: Erik Osheim Date: Tue, 8 Feb 2022 01:16:06 -0500 Subject: [PATCH] document femto --- about.txt | 1 + femto.tal | 2 +- femto.txt | 30 ++++++++++++++++++++++++++++++ mksite.sh | 2 +- 4 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 femto.txt diff --git a/about.txt b/about.txt index cf5ac0c..65a3363 100644 --- a/about.txt +++ b/about.txt @@ -15,6 +15,7 @@ test-regex.tal some testing code for regex.tal grep.tal very simple grep program using regex.tal femto.tal very early work-in-progress terminal-based editor +femto.txt progress and documentation for femto femto launcher shell script for femto.tal rainbow.tal demo to draw ANSI colors directory to the terminal diff --git a/femto.tal b/femto.tal index 3023008..f8063b6 100644 --- a/femto.tal +++ b/femto.tal @@ -275,7 +275,7 @@ JMP2r @input-error "input 20 "error 00 -@demo-path "math32.txt 00 +@demo-path "math32.tal 00 ( col is 0-79, row is 0-23 ) @cursor [ &col 00 &row 00 ] diff --git a/femto.txt b/femto.txt new file mode 100644 index 0000000..6dc5eb1 --- /dev/null +++ b/femto.txt @@ -0,0 +1,30 @@ +femto text editor + +based on nano. + +draws graphics using ANSI control sequences. + +this means the terminal must be in raw mode with echo +turned off. the `femto` wrapper script achieves this +using `sttry raw -echo` (it also restores the previous +terminal settings on exit). + +current status: + - hardcoded input path + - can't save changes + - no page up/down + - at least one delete bug + - doesn't support long lines/horizontal scrolling + - no search (or search&replace) + - no help messages/status bar context + - hardcodes 80x24 dimensions even on larger terminals + +special key bindings + C-a go to beginning of line + C-b move back one character + C-d delete + C-e go to end of line + C-f move forward one character + C-n move down one line + C-p move up one line + C-x quit diff --git a/mksite.sh b/mksite.sh index b03beee..12756d4 100755 --- a/mksite.sh +++ b/mksite.sh @@ -1,5 +1,5 @@ #!/bin/sh -for NAME in about.txt math32.tal test-math32.tal tester.py primes32.tal regex.tal repl-regex.tal test-regex.tal grep.tal femto.tal femto rainbow.tal drums.tal drums2.tal bfloat16.tal fixed.tal; do +for NAME in about.txt math32.tal test-math32.tal tester.py primes32.tal regex.tal repl-regex.tal test-regex.tal grep.tal femto.tal femto.txt femto rainbow.tal drums.tal drums2.tal bfloat16.tal fixed.tal; do cp $NAME /var/www/plastic-idolatry.com/html/erik/nxu done