The Code Editor

The development environment includes an integrated Text editor to manage, edit, and print source files. Most of the procedures for using the editor will seem familiar if you have used other Windows-based text editors. In addition, GFA-BASIC 32 has enhanced the Text editor with several new timesaving features such as statement completion, dynamic syntax checking, and "intellisense" for OCX objects and event subs.

You can change many of the default settings for the Text Editor to conform to your preferences.

Folding

A particular feature of the GFA-BASIC editor is the ability to fold whole subroutines. The contents of these subroutines are then shown in the editor only by displaying the title line of the Procedure or Function. To indicate that this is a folded Procedure or Function the title line is prefixed with a greater-than character ">". To fold a Procedure or Function move the cursor into the subroutine ( or its title line if folded) and enter:

F11 folds a Procedure, Sub or Function which has the cursor. Pressing F11 again unfolds the corresponding Procedure, Sub, or Function.

F12 folds all Procedures, Subs and Functions. Pressing F12 again unfolds all Procedures, Subs, and Functions.

Recording keys

Next to the information panel in the status bar you'll find a red dot and a grey arrow button. They provide the macro or key recording facility. It is able to store commands and characters. It stores most WM_COMMAND and WM_CHAR messages. The internal buffer for saving IDs and characters is 996 bytes long.

The status of the macro recording is reflected in the status bar with two buttons. The red circle indicates that currently nothing is being recorded. The arrow next to the circle is either solid black or gray. When black a macro is available and can be played back by clicking the arrow or by pressing Alt + Ctrl + P.

To start recording either click on the red circle or press Alt + Ctrl + R. Both Buttons will change, the red circle is replaced by a black rectangle representing the stop button, and the playback arrow is replaced by a pause button. Choosing pause skips recording until pause is selected again or when stop is selected. Selecting the stop button stops recording and redraws the red circle and arrow buttons. The arrow is now black filled: the macro can be replayed.

GLL Extension keyboard shortcuts.

GFA-BASIC 32 editor extension functions are often assigned to keyboard shortcuts to make them easily available. GFA-BASIC 32 has reserved 136 shortcuts to be assigned to a custom GLL extension event. These keyboard events are programmed by creating event subroutines with names that identify the keyboard shortcuts they must respond to. These keyboard subs have the fixed names Gfa_Ex_?, Gfa_App_? or Gfa_App_S?, where ? is a placeholder for one of the characters A-Z and the numbers 0-9. Thus, when you want to create an extension procedure that is invoked after pressing the combination Shift+Ctrl+X, the subroutine should be named Gfa_Ex_X.

PeekView

PeekView allows you to inspect text code-elements and this works both in editting and in debugging mode. When you hover the mouse over a text element, a popup text window appears displaying quick help, syntax, or a value. PeekView is able to show every kind of information that is available in the IDE. When hovering over a variable, it tells you whether its local or global and its type. In debugging mode, it displays its current value. See also: New in Debugging. Hovering over a subroutine name displays the first line of that subroutine; by using the scrollwheel you can display more or less lines of the subroutine. This shows the label's code.

Features of PeekView are:

Navigation History

You can now easily go back to previous editted lines using navigation history.

ESC or Ctrl + - will bring you back to the previous lines and Shift+Ctrl+ - allows you to walk the navigation stack in reverse order. Once you start editting a line the line is added to the navigation stack.

History and Find/Replace (New in version 2.5)
The current line is added to the history just before a Find or Replace action from the Find- or Replace dialog is executed. So, for instance, after a replace all command you can easily return to the line in which you started the action: just press ESC.

Auto Complete

Auto Complete helps by presenting a list of possible words in the current context. If the context is unclear the list doesn't popup before a letter is entered.

In auto mode the auto-complete-list automatically pops up after entering the first letter of a word. Auto mode is enabled by default, but can be disabled through the Properties dialog box. The Extra tab in the Properties dialog provides settings for new features. Here you can select whether the listbox should display automatically or only after pressing Ctrl+Space. In addition, you can allow the Auto Complete feature to initialize its database automatically by compiling a program just after it has been loaded. The Auto Complete feature depends on the internal variable databases and these databases are not available before compiling. The variables and constants that are declared while editting are stored in a temporary database. However new variables and constants are always assigned the Integer data type and do not provide enough information to the logic of auto complete to present a context dependent list. After the addition of new variables you best compile the code before continuing. (This limitation may be handled in future updates of GFA-BASIC 32)

Shortcuts inserting text

Incremental Search (Ctrl+Shift+I)

Incremental text search finds the match while you are typing, you rarely need to type the complete search string. If you are looking for a string that occurs multiple times in your file, you can use the F3 (FindNext) and Shift+F3 (FindPrev) commands while you are in Incremental Search mode. Incremental search stops when you press the ESC key.

To find a string using incremental search:

  1. From the Edit menu, choose Find & Replace; then choose Incremental Search or hit Shift+Ctrl+I.
  2. The cursor moves to the status bar and the mouse pointer chan
  3. As you type each character, the Text editor selects the matching string in your file. If necessary, press the F3 or Arrow-down key to go to the next match in your file.Press the ESC key or use any of the navigational commands to end the search. While you are in Incremental Search mode the search direction can be chanaged using Arrow-Up or by pressing Shift-F3 (the mouse image changes accordingly).
    Note If there is no match, the editor beeps.

Using Backspace to clear the search string brings you back to the start of the search. Then hit Esc to leave Incremental Search mode.

Next:Keyboard Accelerators

{Created by Sjouke Hamstra; Last updated: 16/05/2020 by James Gaite}