document femto

This commit is contained in:
Erik Osheim 2022-02-08 01:16:06 -05:00
parent b5d87b3caa
commit b2de0ca5d7
4 changed files with 33 additions and 2 deletions

View File

@ -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

View File

@ -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 ]

30
femto.txt Normal file
View File

@ -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

View File

@ -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