[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
How to use editor commands
The editor responds to a large set of editor commands. These commands
perform tasks from moving the cursor, to copying blocks. Each command has
a name and possibly a list of arguments that go with it. For example, the
line_insert command needs to be supplied with the text for the new line but
the character_left command simply moves the cursor left one space.
When any of the the 'non-special' keys (alphanumerics etc.) are pressed, the
editor internally creates a character_type X command and executes it.
Any command can be executed by pressing escape and selecting the command
from the 2 tier menu system.
eg: user presses Esc top level menu is brought up.
user selects line line menu is brought up.
user selects insert user has effectively selected
line_insert at this point, and now
line_insert prompts for the line.
user types Hello Hello is inserted as a new line.
At any point the user can press Esc to abort the process.
Alternatively the command and its arguments can be typed in directly if the
user selects COMMAND from the main menu. This is awkward since the user
does need to know exactly what arguments are expected and what the correct
spelling of the command required is.
eg: user presses Esc top level menu is brought up.
user selects COMMAND editor prompts for command.
user types line_insert "Hello" Hello is inserted as a new line.
Also, when AE loads up, the first thing it does is read the initialisation
file. It finds this by taking the full path of where it was loaded from and
replacing the .EXE with .INI. eg: if C:\AE\AE.EXE was loaded, the file
C:\AE\AE.INI will be used to initialise with.
Each line not starting with a ; is executed in this way. This is used set
up the initial key-bindings and language configurations.
The arguments can be of the types below :-
<number> The command expects a non-negative number.
eg: a line number or repeat count such as 5.
<string> The command expects a string.
eg: a filename or search pattern such as "grep.c".
<character> The command expects a character.
The ASCII code can be supplied instead if the menu
system is not being used.
eg: a character to insert such as 'A' or 65.
<yes/no> The command expects confirmation.
eg: confirmation of choice or direction is forwards?
<never/if_open/always>
This specifies when to enter folds. Never, if they are
open folds, or always.
Quite often when a string argument is required, it is known in advance what
the allowable replys are. So if you are supplying arguments interactively a
menu will be given of allowable replys. An example of this is when you use
the buffer_write command. The only allowable arguments are the names of the
buffers, so these are supplied in a menu, rather than having the user type
in the name.
If when not using the menu system to select commands you supply ? as an
argument, you will be prompted for the argument interactively.
eg: line_insert "Hello" Inserts Hello.
line_insert ? Prompts the user for a string
and then inserts it.
If you use the argment . as the argument that is intended to be a
buffer name or language name, the current setting of buffer name or
language name is used.
eg: buffer_write . Writes current buffer to disk.
See Also:
sample_command
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson