AutoType can automatically expand text typed into VO's source code editor. It can be toggled on/off by pressing Ctrl-Alt-T when you are in VO.
For example, if you type IF into the source code editor, then press the AutoType trigger key it will automatically be expanded to:
IF
ENDIF
The default AutoType trigger key is is Tab but this can be configured in VOPP Plus!.
Definition File
There are many pre-configured expansions available and they are supplied in the VOPP AutoType.TXT file in the VOPP3 directory. The name of the file can be specified in VOPP Plus!.
Each line in this file represents an expansion rule. Each rule is made up of a set of trigger keystrokes, followed by a description on how to expand those keystrokes. Let us take a look at a simple example of how this works. One line from the supplied file is:
lo,local
This indicates that AutoType will watch for the letters "l" then "o" to be typed into the source code editor. If the next keystroke is the AutoType trigger key (by default this is Tab), then the letters "lo" will be replaced by the text following the comma, "local".
There are also some command sequences to help perform the expansions:
n \r performs a carriage return
n \b performs a backspace
n \t inserts a tab
n \c defines the position the cursor should finish
n \h inserts a header text file
n \d inserts the date
n \s inserts the time
n \u inserts the login name of the current user
n \a inserts the application name
n \m inserts the module name
So a more complex example is:
METSU,method \c() class \r\hlocal x as usual\r\rx := super:()\r\rreturn x\r
which results in the code below. The cursor is placed just before the two brackets on the first line, ready for the name of the method to be entered. Note also that the default header has been inserted.
METHOD () CLASS
// Copyright © 2000 <Copyright holder here>
LOCAL x AS USUAL
x := SUPER:()
RETURN x
Header File
The header text file is also configurable using the same command sequences and by default is called VOPP AutoType Header.TXT. The name of the file can be specified in VOPP Plus!.