EDIT

command

Open the colour TUI editor (menu bar, tabs, status). With no file, uses the current program name if set.

EDIT [file$]

file$ - path to edit (optional); must be a string, e.g. “HI.BAS” (an

unquoted token such as HI.BAS is a ?SYNTAX error)

Menus: Alt+F File Alt+E Edit Alt+R Run Alt+T Theme Alt+H Help F10 File. Help: Keys… (shortcut list) and Manual (opens interactive HELP; Esc/Ctrl+C returns to the editor). File: New, Open, Save, Save As, Quit. Run saves dirty files and RUNs the entry point: a MAIN.BAS tab, else MAIN.BAS in the current directory, else the focused tab. Dirty untitled buffers are skipped. New opens an unnamed buffer; Save asks for a name. Quit or Close tab on a dirty untitled buffer asks Save, Discard, or Cancel. After Run, press any key to return to the editor. MODE is restored. PAGE WRITE and PAGE DISPLAY return to 0 (BREAK / Ctrl-C does the same so the editor is not left on a black off-screen page).

Crash resume: while a named buffer is dirty it is checkpointed about once a minute to a sidecar <file>.rec; OPTION AUTOSAVE OFF disables that periodic checkpoint (the leave-time save still writes the real file). If a sidecar is newer than the saved file when EDIT opens it, a Recover/Discard/Cancel prompt appears. Recover loads the sidecar into the buffer (the real file is overwritten only when you save). Discard removes the sidecar. A clean save removes it too.

Theme menu (Alt+T): 10 colour schemes. Syntax colours follow the theme. Non-VGA themes use custom palettes. Default is Slate. Saved with OPTION EDIT THEME and restored next time you open EDIT.

Edit menu (Alt+E): Jump to break controls whether a run BREAK or error moves the cursor to the offending line. It is off by default, so the cursor stays where it was; the error bar still shows the message. The setting persists.

Keys: F1 keyword HELP F2 save F3 open F4 #include F9 run ^S save

Alt+X quit  ^C copy  ^X cut  ^V paste  ^W close tab
Alt+Left / Alt+Right switch tabs (no wrap)
^R save and run  ^K cut line  ^U paste
^Z undo  ^Y redo (per tab; typing groups into one step)
Shift+Arrows select text (QBasic-style)
^Ins copy  Shift+Del cut  Shift+Ins paste
Del erases the selection (no clipboard)
Tab inserts 4 spaces; with a selection, Tab indents and Shift+Tab outdents
Enter copies line indent
^P quick open (files under the start folder)
^O outline (SUB/FUNCTION/TYPE in the current file; target line is centred)
^F find in file (Enter/F3 next match; opens empty unless text is selected,
   Esc leaves cursor at the match)
^H find and replace (Tab switches fields, Enter replaces, ^Enter all; Esc leaves cursor at the match)
F1 opens HELP for the word at the cursor (Esc returns)
F4 opens the #include file on this line (or switches to its tab)
Alt+1..9 switch tabs

Open/Save As: Name field plus Files and Directories (.BAS and .INC). Tab cycles. Enter opens a file or enters a folder. Esc cancels. CR in a file is ignored (not drawn as a CP437 glyph).

Example:

EDIT "HI.BAS"

Source: docs/help/edit.txt inmmcore. On the computer, typeHELP EDIT.