nxu/femto.txt

107 lines
3.0 KiB
Plaintext
Raw Normal View History

2022-02-16 19:24:35 -05:00
---- femto text editor ----
2022-02-08 01:16:06 -05:00
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
2022-04-09 00:16:22 -04:00
using `stty raw -echo` (it also restores the previous
2022-02-08 01:16:06 -05:00
terminal settings on exit).
2022-03-24 01:39:39 -04:00
---- WARNING ----
this is alpha quality software, still under active
development. although it seems to work fairly reliably
it has bugs!
please consider making backups (or using version control)
before using femto to modify important files.
2022-03-24 01:39:39 -04:00
---- getting started ----
2022-02-16 19:24:35 -05:00
you must provide a path to a file when starting femto:
./femto femto.tal
2022-04-09 00:16:22 -04:00
(if the file does not exist, femto will create it on save.)
2022-03-23 23:03:20 -04:00
the femto launcher script makes many assumptions:
- uxnasm and uxncli are both in the PATH
- femto.tal is in the same directory as femto
- femot.rom should be written in the same directory
once femto is not in active development a more robust
packaging process can be explored.
2022-03-24 01:39:39 -04:00
---- current status ----
2022-02-16 19:24:35 -05:00
2022-03-23 23:03:20 -04:00
- can't create new directories while saving
- doesn't support horizontal scrolling for long lines
2022-04-09 00:16:22 -04:00
- no search & replace
2022-03-25 00:15:42 -04:00
- no copy/paste
2022-03-24 01:35:35 -04:00
- doesn't support function keys, mouse, etc.
2022-03-23 23:03:20 -04:00
2022-03-24 01:39:39 -04:00
---- status line ----
2022-03-23 23:03:20 -04:00
the femto status line contains a lot of information:
1. if the file has unsaved changes (**) or not (--)
2. the file name (e.g. "scratch.tal")
3. the number of bytes/lines (e.g. "[49 bytes, 8 lines]"
4. the x/y cursor position (e.g. "(1,8)" for col 1, row 8)
2022-03-26 15:30:38 -04:00
5. whether tabs ("[t]") or spaces ("[s]") are inserted by tab key
6. how to run the help command (C-h)
2022-02-16 19:24:35 -05:00
2022-03-24 01:39:39 -04:00
---- special key bindings ----
2022-02-16 19:24:35 -05:00
2022-03-30 01:26:09 -04:00
C-g cancel (used with commands like save, search, etc.)
C-h help
2022-02-16 19:24:35 -05:00
C-x quit
C-o save
C-u undo
2022-02-08 01:16:06 -05:00
2022-03-25 00:15:42 -04:00
C-b move back one character (or LEFT ARROW)
C-f move forward one character (or RIGHT ARROW)
2022-04-09 00:16:22 -04:00
M-b move back by one word
M-f move forward by one word
2022-03-25 00:15:42 -04:00
C-n move down one line (or DOWN ARROW)
C-p move up one line (or UP ARROW)
M-v page up (or PAGE DOWN)
C-v page down (or PAGE UP)
2022-02-16 19:24:35 -05:00
2022-03-25 00:15:42 -04:00
C-a go to beginning of line (or HOME)
C-e go to end of line (or END)
2022-02-16 19:24:35 -05:00
M-< go to start of file
M-> go to end of file
2022-03-24 00:09:55 -04:00
M-g go to line
2022-03-26 15:30:38 -04:00
C-l center screen on cursor line
2022-02-16 19:24:35 -05:00
2022-04-09 00:16:22 -04:00
C-s search for a substring [1]
M-s search for matches using a regular expression [1]
2022-02-16 19:24:35 -05:00
C-d delete
2022-03-24 01:35:35 -04:00
M-c toggle color scheme
2022-03-25 00:15:42 -04:00
M-t toggle tabs-vs-spaces indentation
2022-02-16 19:24:35 -05:00
(C stands for Control)
(M stands for Meta, often Alt or Option)
2022-04-09 00:16:22 -04:00
---- search [1] ----
when searching femto will highlight matches and accepts
the following commands:
- C-g: cancel the search and restore the cursor
- Enter: end the search, leaving the cursor where it is
- n (or C-s): move forward to the next match, if any
- p (or C-r): move backwards to the previous match, if any
2022-05-03 22:30:15 -04:00
regex support is a work in progress, but basic regular expression
syntax is mostly working.
2022-05-03 22:30:15 -04:00
there are notable absences such as references to capture groups
(such as \1), repetitions (such as {n} or {m,n}), and symbolic
character classes (such as \w or \s).