moonshot

technical

skrift

skrift is moonshot's text editor. it runs inside a kakel window and reads and writes files through jakel. type edit (filename) in skalman to open a file. quitting saves it, and sync in the shell puts it on disk.

modes

insert mode is home, you open a file and start typing. escape enters command mode, where single keys trigger actions, and i or escape goes back. arrow keys move the cursor in both modes, and h in command mode shows a key reference.

q
save and quit.
x, dd, yy
delete the character under the cursor, delete the line, copy the line. a count in front repeats, so 3dd deletes three lines.
cc, cw
change the line, or the rest of the word, and go to insert mode.
u
undo the last change. undo is single-level.
gg, G, 5G
go to the first line, the last line, line 5.
e, E, r
evaluate the current line as c0 through the repl and show the result, insert it as a comment below, or run the whole buffer.

ctrl-a and ctrl-e jump to the start and end of the line, ctrl-k deletes to the end of the line and ctrl-d deletes the character under the cursor, in both modes.

selection

hold shift with the arrow keys to select text. in command mode d and x delete the selection, y copies it and e evaluates it. typing in insert mode replaces it.