Moving the cursor
The editing in the GFA-BASIC editor is supported by a whole range of keyboard commands. Using the cursor block results in the following:
Arrow left | move cursor one character left |
Arrow right | move cursor one character right |
Arrow up | move cursor one line up |
Arrow down | move cursor one line down |
End | move cursor to line end |
Home | move cursor to the first character of the line. Press twice to place the cursor at the beginning of the line. |
Pg up | scroll one page up |
Ctrl + Pg up (+ Shift) | Jumps (and selects) to the first line of the current Proc, or if already there to the previous Procedure/Sub/Function. |
Pg down | scroll one page down |
Ctrl + Pg down (+ Shift) | Jumps (and selects) to first line of the next Procedure/Sub/Function. |
Ctrl + End | move cursor to end of file |
Ctrl + Home | move cursor to start of file |
Holding down Shift together with some of the keyboard shortcuts above will result in selecting a range of characters, words, and lines.
The cursor can also be moved by using the mouse. To do this, move the mouse pointer to the desired position and click the left mouse button once.
Mouse Button Commands
Left-DblClick | Locates the next word under the mouse pointer, no change here. Improved: locates all occurences of a variable, whether or not a postfix is used. |
Ctrl + Left-DblClick | Locates the previous word under the mouse. Reverse of Left-DblClick. |
Shift + Left-DblClick | Selects a word. Same as Ctrl+W. |
Shift + Left-Click (in margin) | Toggles one of seven breakpoints. |
Unnamed bookmarks
Shift + Ctrl + Up | Set unnamed bookmark |
Shift + Ctrl + Down | Set unnamed bookmark |
Ctrl + Arrow Up | move cursor up to line with bookmark |
Ctrl + Arrow Down | move cursor down to line with next bookmark |
Mouse | click with left mouse button in the margin in the editor to set or remove a boomark. |
Control Keys
A range of editor functions can be invoked by pressing together the control key (Ctrl,^) and a character, without having to open the corresponding menu first. Furthermore, you can invoke editor functions which are not implemented in the menus as follows:
Ctrl + A | Selects all text |
Ctrl + B | Toggle Bookmark |
Ctrl + C | Copy selection to clipboard. (Ctrl + Delete) |
Ctrl + D | [Since IDE v2.6.2.2626] Duplicate the current line. [Before IDE v2.6.2.2626] Toggle Debug output window (same as Alt-3). |
Ctrl + F | Search text. Use F3 to find the next occurrence of the text. Use Shift + F3 to find the previous occurrence. |
Ctrl + G | invokes a Dialog box for entry or a line number. The cursor then jumps to this line. |
Shift + Ctrl + H | Displays a Prompt to provide a memory address from which to display a HexDump. The address can be followed by a comma and a value for the number of bytes to show (default = 256 bytes). |
Ctrl + I | Insert ° comments, current line only without a selection. |
App + I | Shows a context menu to insert miscellaneous: Gfa_FileName, ..., and Date (see also Shift + Ctrl + O). |
Ctrl + J | Remove ° comments, current line only without a selection. |
Ctrl + K | Invokes the set bookmarks context menu. |
Ctrl + M | Starts Extension Manager. |
Ctrl + N | inserts a blank line above the line with the cursor. |
Shift + Ctrl + N | Inserts a new procedure (Proc, Sub, Function, FunctionVar) without unfolding surrounding procedures. |
Ctrl + O | inserts the last portion of a line previously deleted with Ctrl+P at the current cursor position. |
Shift + Ctrl + O | Shows a context menu to insert miscellaneous: Gfa_FileName, ..., and Date (since IDE v.2.6.2.2626 - same as App + I) |
Ctrl + P | deletes the remainder of the current line from cursor position. |
App + P | Inserts the actual procedurename into the text. |
Ctrl + Q | Invokes the bookmarks selection context menu. |
Ctrl + R | Replace text. Use Ctrl+F3 to replace the next occurrence of the text. Use Ctrl + Shift + F3 to replace the previous occurrence. |
Ctrl + S | Save current file. |
Ctrl + T | Transpose characters (swaps the character at the left with the character at the right). |
Ctrl + U | performs an "undelete line". The last deleted line (Ctrl + Y) is inserted back into the text at the current position. After a Ctrl+U the recovered line remains in the internal buffer. This means that after a Ctrl+Y the function Ctrl+U can be invoked repeatedly to perform a primitive copy of the deleted line. |
Ctrl + V | Paste clipboard contents (Shift + Insert) |
Ctrl + W | Selects current word (same as Shift+Left-DblClick). |
Ctrl + X | Cut selection to clipboard. (Shift + Delete) |
Ctrl + Y | deletes the line with the cursor. |
Ctrl + Z | Undo (Ctrl + Backspace). |
Function keys
F1 | Keyword Help |
Shift + F1 | Index Help |
F3 | Next Find |
Shift + F3 | Previous Find |
Ctrl + F3 | Next Replace |
Ctrl + Shift + F3 | Previous Replace |
F4 | Next line containing a syntax error |
Shift + F4 | Previous line containing a syntax error |
F5 | Compile and Run |
Shift + F5 | Compile only (Test). This performs a full compile to test whether all loops, subroutines, and conditional statements of the program are complete. It also collects all variables and checks their correct use. |
Ctrl + F5 | Saves the current file (when Dirty) and then compiles (Test) the program. |
Alt + F5 | Saves the current file and then compiles the program to a stand-alone EXE, GLL, or Lg32. If the program file has been changed - due to changing compile settings - it is saved after compiling. This is a shortcut to Ctrl-S (save) > Ctrl-E (compile) > Ctrl-S (save), including checks for Gfa_Dirty and success. |
F6 | Cycle through the sidebar tabs from left to right. Activates the sidebar when it isn't visible. |
Shift + F6 | Cycle through the sidebar tabs from right to left. Activates the sidebar when it isn't visible. |
Ctrl + F6 | 1. Cycle through the sidebar and code editor. Activates the sidebar when it isn't visible. 2. Cycle through forms in the Form Editor. |
Shift + Ctrl + F6 | In the Form Editor cycles backwards through the forms. |
F7 | Toggle between the code and form editor. Activates the sidebar when it isn't visible. |
Shift + F7 | Creates a new form in the form editor. Activates the sidebar when it isn't visible. |
Ctrl + F7 | Toggles format lines delineating tabbed code structures. |
F10 | Activate the menu bar |
F11 | Toggle folding of current procedure. |
Shift + F11 | Selects the current Proc (or Sub, Func). |
Ctrl + F11 | Sets the Proc to the top of the editor. |
Alt + F11 | Prints the current Proc. (Selects the proc and invokes Gfa_Print). |
F12 | Toggle folding of current procedure and all below. |
Shift + F12 | Folds all procedures, sets the caret to the first line of the current Proc. |
Ctrl + F12 | Folds all procedures, except the current Proc. |
Alt + F12 | Disassembly of the current Proc in the output window. |
Alt keys
These key combinations are a shortcut for some of the menu items.
Alt + 0 | Switch to Code Editor ( F7) |
Alt + 1 | Switch to Form Editor ( F7) |
Alt + 2 | Enable OCX Properties sidebar |
Alt + 3 | Toggle Debug Output Window |
Alt + 4 | Split window |
Alt + 5 | OCX Overview for tab order (TreeView overview of all Forms) |
Alt + Backspace | Undo ( Ctrl +Z) |
Alt + Return | Properties dialog box. |
Alt + Ctrl + R | Record keys, or end recording when recording has started. |
Alt + Ctrl + P | Play recorded keyboard macro, or pause recording when recording has started. |
Other keys
Insert | Toggle between insert and overwrite mode |
Delete | delete the character under cursor and move the remainder of the line left. |
Esc | cancels the Auto Complete Listbox, or cancels the selection with an active selection or, without an active selection, brings you back to the previous position in the history list (same as Ctrl+ -). OR stops searching in Incremental Search mode. |
Tab | Indent the selected text one tab stop (8 spaces) to the right. In overwrite mode Tab moves the cursor in multiples of 8 to the end of the line. TabWhen sidebar has the focus,resets the focus to the editor window. |
Ctrl + Tab | Jump in multiples of 8 to the beginning of the line. |
Ctrl + Break | Break program (Stop) |
Ctrl + Shift + Break | Break and continue using the debugger |
Enter | When in the sidebar jumps to the first line of the selected procedure, or inserts the text of the Import element. |
{Created by Sjouke Hamstra; Last updated: 17/02/2023 by James Gaite}