This section describes commands typically found in the configuration file ae.ini and explains why they are there, what they do, and what changes could easily be made.

Enter and Tab

If the Enter (=^M) key is pressed then a newline character is inserted into the current line. This is not the usual desired behaviour. The following line causes the line to be split at the cursor which is what people expect. Indeed without this line, files can be created with carriage returns and linefeeds on their own, which can cause problems.

key_bind "^M" "line_split"

If the Tab (=^I) key pressed then a tab character is inserted into the current line. This is not always the usual desired behaviour, so the following line causes either a tab character or a certain number of spaces to be inserted, depending on the current editor tab setting.

key_bind "^I" "character_tab"


Simple traversal of buffers may be acheived by bindings like these below. The control key versions are present in the default configuration file since most machines have control keys. In particular the traditional WordStar cursor diamond is defined in the default configuration file.

key_bind "^D"    "character_right"
key_bind "^X"    "line_down"
key_bind "Right" "character_right"
... etc.

Entering and exiting of folds (and virtual folds) may be performed by bindings like these.

key_bind "F3" "fold_in"
key_bind "F4" "fold_out"

Exit without prompt

This next binding allows you to exit the editor (without a 'sure?' prompt).

key_bind "@X" "other_exit yes"

Block commands

Rudimentary block commands are made available by bindings like these. The @C block copy command works by yanking a copy of the block in the current fold onto the deleted stack and then undeleting it to the current cursor position. The block move @M definition works in a similar manner.

key_bind "@C" "block_yank other_undelete"
key_bind "@M" "block_delete other_undelete"
key_bind "@D" "block_delete"
key_bind "@Y" "block_yank"
... etc.

The next definitions set up double-key key-bindings by first specifying that ^K will prefix a following key to form a dual key-press 'key'. For example, ^K ^S. When this is done, you can no longer bind to ^K on its own. When ^K is pressed the editor displays ^K ... until a second key is pressed and the two of them are used to look up a key binding.

key_prefix "^K"
key_bind "^K ^S" "block_mark_1"
key_bind "^K ^E" "block_mark_2"
key_bind "^K ^H" "block_unmark"
... etc.

Example illustrating escaping

As the arguments to key_bind are strings, and the second argument is an editor command (which may itself include strings), escaping of nested strings may be necessary. In the next example, see that the argument to line_create is escaped.

key_bind "^L ^C" "line_create \"\""

Language definitions

These language definitions allow AE to recognise Pascal and Ada programs when it loads them. The escaped quoting in the filename recognising parts are especially confusing.

language_create "pascal" "{..." "}" ".*\\.pas" no yes yes 2 "_"
language_create "ada" "--..." "" ".*\\.ada" no yes yes 2 "_."

To match the traditional wildcard *.pas, the Extended Regular Expression .*\.pas is required. Note how the \ is quoted because it is within a string argument to language_create.

The languages defined in the default ae.ini have been very carefully written so as to be largely portable across platforms. An example of this is that the definition of the language make has a matching string with [Mm]akefile in it despite are filenames being mapped to lower case in the OS/2, Windows and DOS versions. ie: makefile would be enough. It is done this way because under UNIX, capital letters are allowed, and both makefile and Makefile are valid makefile names.

Your own bindings

To configure AE to your own liking, simply edit ae.ini changing key names and possibly actions too. If you make a mistake, AE will complain at run time, saying "error in file F at line N, press any key to continue". It will continue to process the rest of the file, so you will probably still be able to correct your mistake(s).

AE could also complain when you press the key you have bound, saying that it had got an invalid command. eg:

key_bind "^F11" "silly_command"