Editor Guide
Complete reference for the FORGE integrated editor.
Overview
The FORGE IDE includes a full-screen editor for writing and editing BASIC programs. All editor commands use the CONTROL key in combination with another key.
Keyboard Shortcuts Reference
| Shortcut | Command | Description |
|---|---|---|
Ctrl-A | Move to beginning | Moves cursor to the beginning of the current line |
Ctrl-E | Move to end | Moves cursor to the end of the current line |
Ctrl-U | Page up | Moves cursor 19 lines up |
Ctrl-I | Page down | Moves cursor 19 lines down |
Ctrl-Z | Undo | Reverts all editing of the current line |
Ctrl-C | Set Mark | Sets the current line as source for copy operation |
Ctrl-V | Paste | Copies line from marked position to current cursor position |
Ctrl-Q | Quit | Returns to DOS, abandoning changes |
Ctrl-S | Save | Saves the current file to disk |
Ctrl-L | Load | Loads a file from disk |
Ctrl-N | New file | Starts editing a new file |
Ctrl-R | Run | Parses and runs the current program |
Ctrl-W | Compile | Compiles the program to a binary file |
Ctrl-G | Go to line | Moves cursor to a specific line number |
Navigation Commands
Line Navigation
CONTROL-AandCONTROL-E: Moves the cursor to the beginning or the end of the line respectively.
Page Navigation
CONTROL-UandCONTROL-I: Moves the cursor 19 lines up or down respectively. This provides quick page-by-page navigation through your program.
Go to Line
CONTROL-G: Moves the cursor to a specific line. The editor will prompt you for the line number.
Editing Commands
Undo
CONTROL-Z: Reverts all editing of the current line. Note that changing the line clears the undo buffer, so you can't undo more than one line.
Copy and Paste
CONTROL-C: Sets the current line as the source for a copy operation.CONTROL-V: Copies one line from the source marked withCONTROL-Cto the current cursor position. After the copy, the source line is advanced, so by pressingCONTROL-Vmultiple times you can copy multiple consecutive lines.
Example workflow:
- Move to the line you want to copy
- Press
CONTROL-Cto mark it - Move to where you want to paste
- Press
CONTROL-Vto paste (repeat to paste multiple lines)
File Operations
New File
CONTROL-N: Starts editing a new file. If the current file has unsaved changes, you'll be prompted to save.
Load File
CONTROL-L: Loads a file from disk. You'll be prompted for the filename.
Save File
CONTROL-S: Saves the file being edited. You'll be prompted for the filename if it's a new file.
Tips:
- Press
ESCto cancel any file operation prompt - Use
BACKSPACEto edit the proposed filename - Save often to avoid losing work
Quit
CONTROL-Q: Returns to DOS, abandoning any changes in the current file. You'll be prompted to confirm if there are unsaved changes.
Program Execution
Run Program
CONTROL-R: Parses the current program and runs it. If there are syntax errors, the cursor will move to the error location.
Compile Program
CONTROL-W: Compiles the current program and saves it to a binary file. You'll be prompted for the output filename.
See Compiling for more details on compilation.
Cursor Movement
In addition to the CONTROL key combinations, you can use:
- Cursor keys:
CONTROLand-,=,+or*to move the cursor - BACKSPACE: Delete character before cursor
- DELETE: Delete character at cursor (or
CONTROL+BACKSPACE) - RETURN: Move to next line
- DELETE at end of line: Join two lines together
Workflow Tips
Efficient Editing
- Use keyboard shortcuts - They're much faster than menu navigation
- Learn the abbreviations - Many FORGE statements can be abbreviated
- Use copy/paste - For repetitive code patterns
- Save frequently - Use
CONTROL-Soften
Code Organization
- Use comments - Start lines with
'or.for comments - Indent logically - While not required, indentation improves readability
- Group related code - Keep related statements together
Debugging
- Use
CONTROL-R- Run frequently to catch errors early - Check error location - Cursor automatically moves to syntax errors
- Use
CONTROL-G- Jump to specific line numbers when debugging
Editor Features
Line Numbers
The editor displays the current line number on the right side of the first line of the screen.
Empty Lines
Lines that show an arrow pointing to the top-left are empty lines beyond the last line of the current file.
File Name Display
The name of the currently edited file is shown on the first line of the screen.
Limitations
- Undo is limited - Only the current line can be undone
- No multi-line selection - Copy/paste works one line at a time
- No search/replace - Manual editing required
Next Steps
- Editor Optimization - Performance tips
- Language Reference - Learn FORGE syntax
- First Steps - Write your first program