|
1 | 1 | \page edit edit program |
2 | 2 |
|
3 | | -A WYSIWYG editor, similar to GNU `nano` or MS-DOS `edit`. The editor can edit and save text files onto the file system. |
| 3 | +# Text Editor |
4 | 4 |
|
5 | | - |
| 5 | +The text editor provides a simple, full-screen way to create and modify text files. It behaves similarly to GNU `nano` or MS-DOS `edit`, with clear on-screen prompts and keyboard shortcuts. |
6 | 6 |
|
| 7 | +\image html edit.png |
| 8 | + |
| 9 | +## Starting the editor |
| 10 | + |
| 11 | +* To edit an existing file: |
| 12 | + |
| 13 | +```basic |
| 14 | +edit filename.txt |
| 15 | +``` |
| 16 | + |
| 17 | +* To begin a new file: |
| 18 | + |
| 19 | +```basic |
| 20 | +edit |
| 21 | +``` |
| 22 | + |
| 23 | +## Moving around |
| 24 | + |
| 25 | +* Use the **arrow keys** to move the cursor up, down, left, and right. |
| 26 | +* **Home** jumps to the start of the current line. |
| 27 | +* **End** jumps to the end of the current line. |
| 28 | +* **Page Up** and **Page Down** move through the file a screen at a time. |
| 29 | + |
| 30 | +## Editing text |
| 31 | + |
| 32 | +* Simply type to insert characters at the cursor. |
| 33 | +* **Enter** splits the line at the cursor and moves the text to a new line. |
| 34 | +* **Backspace** deletes the character to the left of the cursor. |
| 35 | +* **Delete** removes the character under the cursor. |
| 36 | +* Lines will join together automatically if you backspace at the start of a line or delete at the end. |
| 37 | + |
| 38 | +## Saving your work |
| 39 | + |
| 40 | +* Press **Ctrl+S** to save. |
| 41 | + |
| 42 | + * If the file already has a name, you’ll be asked whether to keep it. |
| 43 | + * If it’s a new file, you’ll be prompted to enter a name. |
| 44 | + |
| 45 | +## Searching and replacing |
| 46 | + |
| 47 | +* **Ctrl+W** starts a search. Type the text to look for, and the editor will highlight the first match. |
| 48 | +* **Ctrl+R** begins search and replace. |
| 49 | + |
| 50 | + * Type the text to search for. |
| 51 | + * Type the replacement text. |
| 52 | + * For each match you can choose: |
| 53 | + |
| 54 | + * **Y** – replace this one |
| 55 | + * **N** – skip |
| 56 | + * **A** – replace all |
| 57 | + * **Q** – quit replacing |
| 58 | + |
| 59 | +## Syntax highlighting |
| 60 | + |
| 61 | +* Press **Ctrl+T** to toggle syntax highlighting on or off. |
| 62 | +* When enabled, BASIC keywords are coloured for easier reading. |
| 63 | +* This affects only the display, not the saved file. |
| 64 | + |
| 65 | +## Exiting the editor |
| 66 | + |
| 67 | +* Press **ESC** to quit. |
| 68 | +* If you have unsaved changes, the editor will ask you to confirm before closing. |
| 69 | + |
| 70 | +## Quick reference |
| 71 | + |
| 72 | +| Key | Action | |
| 73 | +| -------------------- | -------------------------- | |
| 74 | +| **ESC** | Exit editor | |
| 75 | +| **Ctrl+S** | Save file | |
| 76 | +| **Ctrl+W** | Search | |
| 77 | +| **Ctrl+R** | Search and replace | |
| 78 | +| **Ctrl+T** | Toggle syntax highlighting | |
| 79 | +| **Arrows** | Move cursor | |
| 80 | +| **Home** | Move to start of line | |
| 81 | +| **End** | Move to end of line | |
| 82 | +| **PgUp** | Page up | |
| 83 | +| **PgDn** | Page down | |
| 84 | +| **Enter** | Split line | |
| 85 | +| **Backspace/Delete** | Remove characters | |
0 commit comments