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:
| PgUp / PgDn | Move the highlight one block, bringing all of it into view if it fits |
| Ctrl+Up / Ctrl+Down | First block / after the last block (new code goes at the end) |
| typing | Goes 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 |
| Enter | Adds the field's code above the highlighted block, or replaces the yellow block with whatever the field holds. Unfinished code gets a new line |
| Esc | Let go of the yellow block and empty the field |
| Shift+Enter | New line in the field |
| Up / Down | Move the cursor in the field; see the switches above for moving the highlight |
| Alt+Up / Alt+Down | Move the current line (by block when moving by line is off, or while new code is waiting) |
| Shift+Ctrl+C | Copy the highlighted block into the field |
| Shift+Ctrl+X | Cut it: copy it into the field and take it out of the program. Enter puts it back |
| Shift+Ctrl+V | Like Enter, but the field keeps its text |
| Alt+C / X / V | The same three, for browsers that keep Shift+Ctrl+C for themselves |
| Ctrl+Del | Delete the highlighted block, while all of it is on screen (when switched on) |
| Ctrl+Z / Ctrl+Y | Undo / redo: in the field while an edit is open, otherwise in the program |