Click the screen, then use the keyboard.

The Compy editor, by its principles

This page follows Compy's editor principles as I read them, with the gaps filled and a few decisions where the principles conflict, listed below. You talk to the computer through the field at the bottom of the screen, under the status line, and Enter sends what you typed. Your program above is valid Lua at all times, as far as the luaparse library checks.

Compare: editing a block in place.

The switches turn off the places where this page departs from the principles:

Keys

PgUp / PgDnMove the highlight one block, bringing all of it into view if it fits
Ctrl+Up / Ctrl+DownFirst block / after the last block (new code goes at the end)
typingGoes into the field; the highlight moves to the top of its block, where the new code will go
Tab (Edit)Copy the highlighted block into the field and make it yellow: Enter will replace it. On the yellow block again: undo your changes in the field
EnterAdds the field's code above the highlighted block, or replaces the yellow block with whatever the field holds. Unfinished code gets a new line
EscLet go of the yellow block and empty the field
Shift+EnterNew line in the field
Up / DownMove the cursor in the field; see the switches above for moving the highlight
Alt+Up / Alt+DownMove the current line (by block when moving by line is off, or while new code is waiting)
Shift+Ctrl+CCopy the highlighted block into the field
Shift+Ctrl+XCut it: copy it into the field and take it out of the program. Enter puts it back
Shift+Ctrl+VLike Enter, but the field keeps its text
Alt+C / X / VThe same three, for browsers that keep Shift+Ctrl+C for themselves
Ctrl+DelDelete the highlighted block, while all of it is on screen (when switched on)
Ctrl+Z / Ctrl+YUndo / redo: in the field while an edit is open, otherwise in the program

How this page reads the principles

Known limitations

Not implemented