home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 5 Edit
/
05-Edit.zip
/
ae.zip
/
ae.txt
< prev
Wrap
Text File
|
1998-10-17
|
37KB
|
986 lines
Andys Editor Help-file
Minimum information required to get started using AE, using supplied .INI file.
~X means Shift-X, ^X means Ctrl-X and @X means Alt-X.
Esc to cancel current command, or bring up command menu.
Arrows Move around buffer (or traditional Wordstar cursor diamond).
F3 Enters fold (or ^L ^I).
F4 Exits fold (or ^L ^O).
@X Exits editor (or other_exit from command menu).
/*...sinstallation:0:*/
The usual supplied ae.zip file should be expanded using "unzip ae" on a UNIX
machine, or "unzip -a ae" on a PC.
The supplied package includes the following for PC users :-
ae_dos.exe runs on DOS, and in DOS boxes
ae_o16.exe runs on 16 bit OS/2, 32 bit OS/2, and Windows NT/95
ae_dual.exe runs on 16 bit OS/2, 32 bit OS/2, Windows NT/95 and DOS
ae_os2.exe runs on 32 bit OS/2
ae_win.exe runs on Windows NT/95
ae.ini Should work on any of the above
ae.ico For OS/2
Copy the executable of your choice to a directory on the PATH, calling it
ae.exe. Also place the ae.ini initialisation file there.
The following UNIX files are included :-
ae_aix4 RS/6000 executable compiled on AIX 4.1.
ae_linux Intel Linux executable.
ae_hpux HP/UX PA 2.0 executable
ae_sun Solaris executable
Put the ae binary on the PATH, put ae.ini in the same place as ae.
If you have your own ~/.aerc, this is used in preference to ae.ini.
AE for Linux currently uses ncurses 1.9.9e. This looks for the terminfo
terminal database along a path given by the TERMINFO environment variable (if
set), and then in /usr/lib/terminfo. Later versions of ncurses, such as that
in the RedHat distribution install the database in /usr/share/terminfo, often
without providing a symbolic link from /usr/lib/terminfo for backwards
compatibility. If you are told you 'cannot open the terminal', either add a
symbolic link, or set the TERMINFO environment variable.
Under RedHat Linux, if you want colour support, it may be necessary to change
your TERM environment variable from xterm to xterm-color. Slackware doesn't
seem to need this.
Basic text help is provided :-
ae.txt This help document
For those of you with WWW browsers, and who'd like better help :-
http://www.interalpha.net/customer/nyangau/
Remember, when uploading files to a UNIX machine, ae is a binary file,
and anything else is ASCII.
/*...e*/
/*...sintroduction:0:*/
Welcome to Andys Editor. This editor was designed as a language configurable
folding source code editor. This editor provides these features :-
Folding. The ability to group lines into a larger 'meta-line'.
Block operations.
Yank and put model for line copying etc.
Deleted item stack to allow multiple undeletes.
Extended regular expression searching.
Multiple buffers at any one time.
Portability across many machines.
Bracket matching.
User configurable keyboard binding.
Shelling of nested processes (and filtering of folds through commands).
The editor is relatively small for what it does.
This editor is a folding editor. This is a highly useful feature. Once you have
got used to the folding paradigm, you will not want to use a flat editor again!
/*...e*/
/*...swhat is a folding editor\63\:0:*/
Folding is an idea borrowed from the language occam by INMOS. A fold is a group
of lines that may be considered a unit and described by a single line.
Eg: Consider the flat piece of code :-
while not eof(f) do
begin
read(f, c);
write(c)
end
This could be folded to give :-
while not eof(f) do
/*...secho out another character from the file:10:*/
begin
read(f, c);
write(c)
end
/*...e*/
The ... line hides away the details of whats going on. Obviously it makes more
sense to fold larger and more complicated peices of code away. Its a bit like
inline subroutines. A particularly nice way to fold Pascal programs looks like
this :-
program fred(input, output);
{highly trivial example of folding}
var
i: integer;
/*...sinitialise:10:*/
procedure initialise;
/*...ssign_on:12:*/
procedure sign_on;
begin
writeln('FRED version 1.0')
end {sign_on};
/*...e*/
begin
sign_on;
i := 1
end {initialise};
/*...e*/
/*...smain_body:10:*/
procedure main_body;
begin
writeln('i is ',i:1)
end {main_body};
/*...e*/
begin
initialise;
main_body
end.
As you can see, this style of folding allows you to rapidly find any given
procedure and enables you to see the structure of the program as a whole. Also,
you no longer need to page up miles to find the variables!
Folds can be open or closed. The ones shown already were closed, but if they
are opened they look like this :-
while not eof(f) do
/*...Secho out another character from the file:10:*/
begin
read(f, c);
write(c)
end
/*...e*/
This allows the user to see whats in them without actually entering them.
There is a second kind of fold, called a virtual fold which allows links to
other files to be made. For example you might see :-
program fred(input, output)
{$I 'header.inc'}
/*...vheader\46\inc:8:*/
begin
etc.
If you use 'fold_in' on the virtual fold line, then the file is read and
selected. I suggest you don't try it on the virtual fold above, since it is
unlikely you have a file header.inc for AE to load!
If you later use 'fold_out' from within the top fold of header.inc file, then
the file is optiobally written if modified, discarded, then the original buffer
is selected. In this way many files may edited as if they were only one file.
Virtual folds may also be opened, in which case they look like this :-
/*...Vheader\46\inc:8:*/
You cannot see the contents of an open virtual fold, since they are in another
file, and are not loaded until the virtual fold is entered.
The significance of opening virtual folds becomes apparent in searching, where
it is possible to search just open virtual folds, and to skip closed ones,
during a global search.
/*...e*/
/*...swhat is on the screen\63\:0:*/
If you are in the editor now, looking at this fold you should see the following
on the top 3 lines :-
1) The name of this help file (probably c:ae.txt) at the top left.
2) The current folds tag just below that (whats on the screen?).
3) A blank line below that (where prompts and error messages appear).
4) The language name (probably top) for the current buffer.
5) The current line and column numbers at the top right.
The line number is the 'flat' line number (ie: over the whole file).
6) One or more of the words 'autoindent', 'overtype' and 'insert'.
These specify the current editing mode.
7) Either ^I or a number specifying either the number of spaces
per press of the tab key or that real chr$(9) tabs are in force.
Below that, you should see this text.
You will also see a line with a single ^ on it below this text. This marks the
end of the current fold. Typing on it automatically inserts a new line. Any
unused lines are marked with a ~ in UNIX vi(1) style.
/*...e*/
/*...scommand line and startup:0:*/
When this editor loads it does the following :-
Processes the command line arguments :-
ae [-l] [-r] [-w width] [-h height] [-i inifile] {filename}
-l means load filename arguments into buffers
-r restricted version (no shelling allowed)
-w width set screen mode to width columns
-h height set screen mode to height lines
-i inifile executes inifile instead of default name
Trys to initialise the screen driver. If -w and -h are not specified a default
screen size is used. Alternatively, the editor trys to initialise a screen of
the desired size. What are allowable screen sizes depend on the hardware
installed etc.
Next a buffer is created with no name. A virtual fold line is created for each
filename argument. On closedown the editor will not write this buffer, since it
has no name.
Then the configuration file is executed, line by line, stopping if an error
occurs. If an error occurs, the line number is given, and AE will continue
when the user presses a key.
If the -l switch is given the editor attempts to create a buffer for each
filename argument and then to load them.
If there is only one file, and the -l switch is not given, the file is read
in anyway.
If there is only one file, it is selected.
Then the editor signs on with its version date.
/*...e*/
/*...seditor commands:0:*/
This fold lists all the commands available in the editor to the user. These
may be executed in 3 ways :-
1) By pressing escape and selecting them from the menu system.
The main menu gives a list of sub-menus, grouped by function.
These sub-menus give command names, and prompt the user for
arguments.
2) By pressing escape, selecting 'COMMAND' and typing them in.
The 'COMMAND' menu selection is special in that it does not give
a second level menu, but rather it prompts the user for a
command string to be executed.
3) By using a key-binding that uses the required commands.
A key-binding is a connection between a key or a pair of keys and
a command string.
A command string is a list of command names followed by arguments.
/*...sarguments:0:*/
Arguments may be supplied with the commands, or interactively.
Character arguments may be supplied as unsigned decimal ASCII codes,
or as single quoted characters. They may also be specified in hex by preceeding
the number with a & symbol.
String arguments may be supplied quoted in "'s. Real quotes may be supplied
by escaping them with \'s and real \'s may be supplied by quoting themseleves.
Numbers may be supplied as unsigned decimal numbers. They may also be specified
in hex by preceeding the number with an & symbol.
Yes/No responses may be supplied as 'yes' or 'no'.
'When' responses (when to enter a fold during searching for example) may
be supplied as 'always', 'if_open' or 'never'.
Buffer and language arguments may be supplied by stating their names in
double quotes. Alternatively '.' may be supplied to indicate the current
buffer or language of the current buffer.
With all the arguments specifying ? will cause the user to be prompted
for the arguments value. This is usually via a menu.
Eg: character_overtype 65 overtype the current character with A
character_type 'A' type A
character_insert ? insert a character (to be decided later)
line_goto 100 goto 'flat' line number 100
buffer_write . no write the current buffer, no appending
line_insert "Hello \"Ace\"" insert Hello "Ace" as a new line
/*...e*/
/*...scharacter:0:*/
character_left Move the cursor one character keft.
character_right Ditto - but right.
character_insert c Insert character and move right.
character_overtype c Overtype character over existing one
or if at end of line then insert.
character_type c Either insert or overtype, depending on flag.
None of the 3 character entering routines
will do anything if supplied the NUL (ASCII 0)
character since this is used internally within
the program (written in "C").
character_delete_left Delete the character to the left of the cursor.
If the character is no an end of line mark,
the character is placed on the deleted stack,
along with a flag to say that if it is
undeleted then the cursor should move one
right afterwards.
character_delete_right Delete the character to the right of the
cursor. If it is not an end of line mark, it
is placed on the deleted item stack along
with a flag to say that if it is undeleted,
simply insert it at the cursor position and do
not move the cursor.
character_delete_eol Delete to end of line. Store the end of the
line on the deleted stack.
character_tab Inserts or overtypes as with either a tab
character (^I) or as many spaces as are
necessary to pad to the next tab stop.
eg:
character_type 'A'
character_delete_right
/*...e*/
/*...sstring:0:*/
string_insert s Insert a string (repeatedly character_insert's).
string_overtype s Overtype a string (repeatedly
character_overtype's).
string_type s Type a string (repeatedly character_type's).
eg:
string_insert "Hello World"
/*...e*/
/*...sword:0:*/
word_left Move left by a word (scope is current fold).
word_right Ditto - but right.
/*...e*/
/*...sline:0:*/
line_insert string Insert a new line, text of which is string.
line_insert... string open indent
Insert a fold line.
line_insert::: string open indent
Insert a virtual fold line.
line_delete Delete current line (if not last line).
Line is put onto deleted line stack.
line_yank Copy current line and put on stack.
line_up Move to the previous line in current fold.
line_down Ditto - but next.
line_start Move to the start of the line.
line_end Ditto - but end.
line_goto Goto a 'flat' line-number.
line_split Splits line at cursor and move to start of
new line
line_trans from to Convert letters in from to corresponding in to
line_exec Takes current text line from current buffer
and executes it. Good for testing key-bindings.
eg:
line_insert... "tag" yes 0
/*...e*/
/*...spage:0:*/
page_up Scroll a page up.
page_down Ditto - but down.
page_scroll_up Scroll the visible area up a line.
page_scroll_down Ditto - but down.
/*...e*/
/*...ssearch:0:*/
search_for pattern case_sens reg_exp ... ::: dir n confirm
Search for a pattern, which may or may not be
a regular expression, searching in either
direction, n times, possibly confirming each's
position.
Can specify when to enter nested folds and
virtual folds.
search_replace pattern replacement case_sens reg_exp ... ::: dir n confirm
Ditto - but replace occurences.
search_again Repeat last search or search and replace.
search_bracket If currently on a bracket character, find the
matching bracket. Scope of search is limited to
current fold.
eg:
search_for ".*\.c" yes yes if_open if_open yes 5 no
note:
If the search pattern is reg_exp, then the replacement string can use \n
notation to refer to parts of the match in the replacement string.
/*...e*/
/*...stag:0:*/
tag_line Place/remove a tag on current line.
There is no limit on the number of tags that
may be inserted into each buffer.
tag_error Examine current line after cursor and extract
a filename and line-number if present. Then
if we are editing such a file, place a tag in
the file's buffer at the given line number.
This is intended for use with the output of
the make(1) utility.
tag_goto dir Move to the next or previous tag in the
current buffer.
/*...e*/
/*...sfold:0:*/
fold_start Move to the first line in the current fold.
fold_end Ditto - but last.
fold_open open The cursor must be on a fold line.
Make the fold either open or closed.
fold_in The cursor must be on a fold line.
Enter the fold.
fold_out Leave the current fold and go to its parent.
/*...e*/
/*...sblock:0:*/
block_mark_1 Place marker one at the current line.
block_mark_2 Ditto - but marker two.
block_unmark Remove both markers.
block_to_mark_1 Move the cursor to the line with the first
marker. Do nothing if it is not set.
block_to_mark_2 Ditto - but marker two.
block_fold tag open indent Create a fold and insert the marked area into
it. If there is no marked area, simply create
the fold. The tag is a filename with any
embedded spaces quoted by preceeding them with
a '. Unquoted white space ends the filename.
block_unfold The cursor must be on a fold line.
Unfold the fold and make the nested lines
be marked.
block_entab For each line in the block, insert a tab at
its start. Error if line would become too long.
block_detab For each line in block starting with a full tab
remove the tab.
block_read filename Read filename into fold and mark as a block.
block_write filename append Write the marked block to a file, possibly
appending to it.
block_filter command Write marked block to temporary file 1.
Run the command with temporary file 1 as
its standard input and temporary file 2 as
its standard output. Delete marked block.
Read in temporary file 2 as the new block.
Important: fold information is also written out
for any nested folds. Therefore, if you pass
a fold through 'sort' the folding structure of
the file would almost certainly be corrupted. #
This takes a copy of the 'before' block on the
deleted item stack.
block_delete Delete currently marked block. Put on deleted
item stack. If this is subsequently undeleted,
the resulting lines will be re-marked as a
block.
block_yank Put a copy of the current block on the deleted
item stack.
block_trans from to Convert letters in from to corresponding in to
/*...sproblems with block_filter:0:*/
# This is a problem caused by the way fold information is stored in the file.
eg:
The fold used as the argument File before "sort" File after "sort"
{{{ this fold /*...sthis fold:0:*/ contents
contents contents /*...e*/
}}} /*...e*/ /*...sthis fold:0:*/
Note that the resulting file has its end reserved comment before its start!
If you passed the above file through an "uppercaseifier" then you would
find that the reserved comments would be "uppercaseified" as well. In the
reserved comment ...s implies closed fold, ...S would imply open. Therfore
such a command would, as a side effect, open all nested folds! Moral: only
use block filter on text, unless you know the program knows about folding.
/*...e*/
/*...e*/
/*...sbuffer:0:*/
buffer_create filename read select
Create a new buffer of name filename.
If read requested, read it in too.
If select requested, select the buffer too.
buffer_delete filename Delete the buffer and its contents.
Do not delete the file.
buffer_select filename Select a buffer for editing.
buffer_rename filename filename Change the name of a buffer.
buffer_read filename Read in the file into its buffer.
buffer_write filename append Write the buffer to its file.
eg:
buffer_write . no
/*...e*/
/*...slanguage:0:*/
language_create langname rc_st rc_end match visible auto insert_mode tab seps
Create a language which has reserved comments
rc_st and rc_end, matches filenames with an
extended regular expression, possibly
has autoindent, and has a tab size of tab.
The seps string determines what characters,
apart from white space seperate words.
as making up a word. eg: for "C" use "_" since
identifiers may contains _'s.
language_delete langname Delete a language.
language_select langname Change the language of the current buffer.
language_rename langname langname
Change the name of a given language.
eg:
language_create "pascal" "{..." "}" ".*\.pas" no yes yes 0 "_"
/*...e*/
/*...ssetup:0:*/
setup_visible Toggle the character visibility flag.
Determines how white space, control characters,
and other characters are shown on the screen.
setup_autoindent Toggle the autoindent flag.
setup_insert Toggle the insert/overtype flag.
setup_tabs Modify the tab size.
/*...e*/
/*...skey:0:*/
key_prefix key_name This is used to allow multiple key bindings.
eg: to get wordstar like block bindings
you should use key_prefix "^K".
key_bind key_name(s) stuff_to_end_of_line
Make key key_name(s) execute the commands on the
rest of the line each time it is pressed.
If the first key_name is a prefixed key then
a second key name will be expected, to complete
the binding.
eg:
key_bind "^B ^S" "buffer_select ?"
/*...e*/
/*...sother:0:*/
other_shell command Execute subprocess command.
other_redraw Redraw the entire screen.
other_exit confirm Leave Andys Editor. You will be prompted
about saving edited buffers.
other_abort confirm Leave Andys Editor. No prompts.
other_undelete Last deleted item is replaced at cursor
position into the text.
other_put Last deleted item is copied from deleted item
stack to text.
other_squeeze Discards deleted stack to free up memory.
other_colours t f s mt mf ms Set the colours used by the editor for
the text, fold lines, status information and
also their marked counterparts. These numeric
values used for the arguments vary from
machine to machine.
other_backups backup enable or disable making backups
eg:
other_shell "ls -al"
/*...e*/
/*...sconditional:0:*/
When AE processes its initialisation file, it can skip certain commands
depending upon the platform the editor is running on. This is acheived by
dollar directives, like in the following :-
$U
key_bind "F11" "block_write \"/tmp/ae1.cut\""
$P
key_bind "F11" "block_write \"c:/tmp/ae1.cut\""
$*
$U, means execute the following lines if on a type of UNIX. $P means on a type
of PC (ie: DOS, OS/2, or Windows version). $O is a sort of a catch all for
any other type of machine. $* means execute what follows on any type of
machine. Letters can be combined, so $UO means UNIX or other (but not PC).
/*...e*/
/*...e*/
/*...sdefault key bindings:0:*/
The configuration file is accessable from these virtual folds (provided you
are currently in the right directory).
/*...vae\46\ini:0:*/
Any line in these files starting with a ; is ignored by the editor. Any other
line is executed as-is by the editor at load time only. AE makes no attempt to
re-read this file after it has been edited. Any line in these files may be fed
to AE directly by pressing escape and typing in the line as a command (except
for comment lines).
/*...e*/
/*...sae file format:0:*/
This section is provided to allow people to write tools (including other
folding editors) that understand the folded file format.
The editor deduces the language of the file from the filename via the
extended regular expression specified in the languages language_create
statement which is usually done in the initialisation file.
eg: For "assembler", the extended regular expression ".*\\.(s|i|asm|inc|mac|as)"
is used to say all .s, .i, .asm,... etc. files are "assembler" files.
Also defined per language is <rc_st> and <rc_end> strings (reserved comment
start and end). <rc_st> is the most common comment introducer for the language,
followed by <unlikely> and <rc_end> is the comment completor (if required).
<unlikely> is a string the user is unlikely start a comment with. In practice
for all currently defined languages "..." is used, and is recommended for any
new languages, unless it is not allowed, in which case something else will do.
eg: For "pascal", the most common comment starter is "{", and ender is "}".
Hence <rc_st> is "{..." and <rc_end> is "}".
eg: For "assembler", comments start with ";" and need no ender.
Hence <rc_st> is ";..." and <rc_end> is "".
A text file is an ordered list of lines. If a line begins with <rc_st> in
column 1, then it is considered to be a 'crease'. Crease types defined are :-
<rc_st>s<tag>:<indent>:<rc_end> begin closed fold, shown as "... tag"
<rc_st>S<tag>:<indent>:<rc_end> begin open fold, shown as "{{{ tag"
<rc_st>e<rc_end> end fold
<rc_st>E<rc_end> end fold, shown as "}}}"
<rc_st>v<tag>:<indent>:<rc_end> closed virtual fold, "::: tag"
<rc_st>V<tag>:<indent>:<rc_end> open virtual fold, ">>> tag"
Any other letter after <rc_st> is reserved for future use and is an error.
Begin fold and end fold creases must nest correctly and all match up properly
within a text file. Consider them much like brackets.
( Aside: You might note than end fold can be either 'e' or 'E'. The "}}}" is
shown by the editor if it pairs with a 'S', not whether it is an 'E' ).
<tag> is a fold or virtual fold tag. The user may type in any character codes
to make up the <tag>. Alphanumeric, '_' and ' ' characters are represented in
the <tag> as-is, but anything else gets mapped to '\' followed by decimal
ASCII code followed by '\'.
eg: The fold tag "Hypen-ated" is represented in the file by "Hypen\45\ated"
For virtual folds (which are essential just references to another file),
the first part of the <tag> upto the first space or tab character is considered
to be the filename, the rest is disregarded when entering a virtual fold.
eg: Entering virtual fold with <tag> of "sort.c - do sorting" will attempt
to load the file "sort.c".
<indent> represents the columnar indent of the contents of the fold being
begun from the beginning of the file. Therefore it is an error if the <indent>
value for a nested fold is less than the <indent> of its parent. Looking back,
it might have been better to make +ve and <indent> relative to its parent.
Example of what is in a sample file, what it represents :-
<---- column 1
#include "check.h" #include "check.h"
/*...vcheck\46\h:0:*/ ::: check.h
static void check(void) static void check(void)
{ {
if ( condition ) if ( condition )
/*...Sdie:16:0*/ {{{ die
{ {
/*...Vwhywarn\46\txt:16:*/ >>> whywarn.txt
warn(); warn();
exit(1); exit(1);
} }
/*...e*/ }}}
} }
If the die fold used little 's' not big 'S', then the fold would be closed and
shown by the editor as "... die" only on the right, until the fold is entered.
There is no explicit limit to the levels of nesting allowed. In practice, many
of AEs internal functions are written recursively, so it is possible to blow
the (very large) stack. I envisage a least 500 levels being safe. In practice,
users don't tend to nest much more than 10 levels, so this is not a problem.
/*...e*/
/*...smisc stuff:0:*/
/*...sadding to AE:0:*/
Probably the easiest way of "adding" functionality to AE is to write a small
filter program and to bind a key like so :-
key_bind "^R" "block_filter \"reform -\""
The example uses a program reform to reformat a block. The program reform is
simply a filter that reforms its standard input to its output. This paragraph
itself was formatted using the very same key-binding.
Other filters could supply 'line-drawing-mode', 'white space stripping'.
Note that such filters could cause problems if you send folds through them.
/*...e*/
/*...smachines supported:0:*/
The editor is written in portable "C" and may easily be ported to new machines,
provided they have suitable screen and keyboard control.
The only things that change from version to version are filename
conventions, available keys for binding, colour support, and support
for screen sizes and modes.
/*...sfilenames:0:*/
On systems with forward slash pathname seperators (UNIX),
backslashes in filenames get converted to forward slashes.
On systems with backward slashes as pathname seperators (DOS, OS/2 and
Windows), forward slashes in filenames get converted into backward slashes.
After translation, the filenames get passed to the operating systems.
The DOS AE is limited to 8.3 filenames, but the OS/2 and Windows
versions support long filenames. Of course, UNIX does too.
/*...e*/
/*...skeyboard:0:*/
Keyboard support table :-
Keys DOS OS/2 Windows UNIX
---------------------- --- ---- ------- ----
^A-^Z ^\ ^] ^^ ^_ yes yes yes yes
Left Right Up Down yes yes yes yes #1
~Left ~Right ~Up ~Down - - - yes #2
^Left ^Right ^Up ^Down yes yes yes yes #2
@Left @Right @Up @Down yes yes yes yes #2
Home End PgUp PgDn yes yes yes yes #2
~Home ~End ~PgUp ~PgDn - - - yes #2
^Home ^End ^PgUp ^PgDn yes yes yes yes #2
@Home @End @PgUp @PgDn yes yes yes yes #2
@A-@Z @0-@9 @- @= yes yes yes yes #2 #3
F1- F12 yes yes yes yes #1 #4
~F1-~F12 yes yes yes yes #2 #4
^F1-^F12 yes yes yes yes #2 #4
@F1-@F12 yes yes yes yes #2 #4
#1: Subject to AE recognising the terminal type being used, and the
type having a termcap/terminfo database entry with suitable entries in it.
#2: Subject to AE recognising the terminal type being used, and the
type being one for which AE has hard coded knowledge
(vtxxx, xterm, aixterm or hft).
#3: AE has specific hard coded knowledge of the escape sequences
generated for the Alt keys by the linux terminal.
#4: Xenix only supported 10 function keys the last time AE was
compiled for it.
A few other obscure keycodes are also supported.
On DOS, OS/2 and Windows, searches can be interrupted using the
^Break key. On UNIX its the Esc key.
/*...sSpecial notes for UNIX:0:*/
The most basic level of keyboard support provided by termcap/terminfo
is support for Left, Right, Up, Down, and for function keys F1-F10.
If the termcap/terminfo database is incomplete, or your TERM environment
variable is wrong, then even this most basic level of support may not work
fully or at all.
AE for UNIX has a special 'feature' whereby pressing Esc followed by a key
is logically equivelent to pressing Alt and the key together. This helps out
in situations where the Alt keys do not make it to programs, perhaps because
the terminal emulator or windowing system won't pass them on.
^S and ^Q can be a problem if operating with xon/xoff flow control.
^Y and ^Z are often the suspend and delayed suspend keys on a terminal.
/*...sDEC terminals:0:*/
AE specifically knows the escape sequences for arrows
(application and cursor mode) and function keys (F1-F4) in the VT100
terminal (and family) definition.
AE specifically knows the escape sequences generated by function keys in
an xterm session.
It does this as emulators/terminals and/or terminfo/termcap definitions
often get the distinction between application and cursor mode wrong.
/*...e*/
/*...sIBM terminals:0:*/
AE knows the escape sequences for masses of keys from
the IBM aixterm and IBM hft terminals.
It even knows the variations generated by IBM Internal tool
HFTTERM.EXE for OS/2. Excellent keyboard support can be obtained using these.
The following additions to your ~/.cshrc file will
improve Ctrl key support, by avoiding the flow control and suspend
key problems explained above :-
stty -ixon -ixoff # Disable ^S ^Q flow control
stty susp undef # ^Y no longer suspends
stty dsusp undef # ^Z no longer suspends
Note that if you are working on an X-Station, then depending upon your
window manager, some of the keys may be intercepted before AE sees them.
For example, when I run the Motif-Window-Manager, mwm, I find
that @F4 is intercepted before AE sees it, and it is used to
close the aixterm window.
/*...e*/
/*...sLinux terminal:0:*/
AE knows some of the escape sequences generated for keystrokes from the
linux terminal.
/*...e*/
/*...sDefault Sun terminal:0:*/
The left-function keys (L1-L10)
are known to AE as the Alt+Fn keys @F1-@F10.
The right-function keys are arranged with the following mapping
(as the Sun keyboard doesn't actually have arrow-keys) :-
R7 = Home R8 = Up R9 = PgUp
R10 = Left R12 = Right
R13 = End R14 = Down R15 = PgDn
/*...e*/
/*...sDefault Xenix terminal:0:*/
Xenix supports 10 function keys.
The @Fn keypresses are intercepted by the Xenix
multi-terminal system and are used to switch between sessions.
If the user presses ^~Fn, then AE sees this as @Fn.
/*...e*/
/*...e*/
/*...e*/
/*...scolour:0:*/
Colour support table :-
Colour DOS OS/2 Windows UNIX
--------------------------- --- ---- ------- ----
8 foreground / 8 background yes yes yes yes #1 #2 #3
Bright foreground yes yes yes
Bright background yes
Flash yes yes
#1: Under AIX, if the termcap/terminfo entry supports it, and you are running
on a vtxxx, aixterm or hft terminal, then colour support is enabled.
I've seen a VT100 terminal terminfo definition on AIX which doesn't
support colour, although I see no reason why this can't easily be remedied.
#2: Under Linux or HP/UX, if the termcap/terminfo entry supports it, colour
support is enabled.
#3: Most terminals don't have colour support, and for these the standard
curses support is simply for one of 4 'colours' (none, some or all of which
may be supported by your particular terminal) :-
Normal = 0
Underline = 1 support for this often not present
Standout = 2 this is usually inverse or bold
Alternate = 3 this could be an alternate character set
However, in the general case, given the following defines :-
Black = 0 Flashing = 1
Blue = 1 Static = 0
Green = 2
Cyan = 3
Red = 4
Magenta = 5
Yellow = 6 Bright = 1
White = 7 NotBright = 0
Colour values may be computed as :-
DOS, OS/2 : value = fg + bg*16 + bright*8 + flash*128
Windows : value = fg + bg*16 + fg_bright*8 + bg_bright*128
UNIX : value = fg + bg*16 + fallback_one_of_4_colours*256
Clearly the portable approach is simply to avoid using flashing and/or
bright colours. Luckily hex notation (introduced by a & symbol) can be used
to specify numbers, including colours.
/*...e*/
/*...sscreen modes:0:*/
AE for DOS supports a wide variety of CGA, EGA, VGA and Super VGA screen
modes, including various 43,50 and 60 line modes, and also 132 columns modes.
It draws upon the services of the DOS Terminal Handler for its screen handling.
AE for OS/2 can operate in any mode provided by the Vio
interface, including the Super VGA modes detected by the SVGA.EXE
utility and stored in the SVGADATA.PMI file.
This includes the 132 column modes on XGA-2 for example.
AE for Windows is a regular Console application, and so will work in
any of the screen modes supported by Windows.
AE for UNIX cannot change the screen/window size, and so
simply runs with however many lines and columns are currently available.
/*...e*/
/*...e*/
/*...sbugs\44\ problems:0:*/
At this present time, AE for UNIX cannot differentiate between foreign
language keystrokes, such as a-with-unmlaut and Alt-characters. Both such
keystrokes generate keycodes in the range 0x80 to 0xff. Curses does not
appear to give me a way of telling the difference.
Also, AE for UNIX cannot display characters which do not satisfy the ctype.h
isprint(c) macro, as curses cannot promise that doing so will not upset your
terminal screen. So even if you could type a-with-umlaut, AE couldn't show it!
/*...e*/
/*...scopying this editor:0:*/
This editor is all my own work.
I hereby place it in the Public Domain.
Do what you like with it.
Please redistribute it as you received it.
Please don't try to sell it.
Please don't try to place restrictions on what others can do with it.
This software is supplied as-is, with no guarantee.
/*...e*/
/*...srevision history:0:*/
Significant and recent revisions are only listed. If you have a version between
listed dates, it will have some of the problems listed. You should always
upgrade if you can.
15/1/89 Initial version (Alpha-Test).
Various dates: Many minor bugfixes and various speed increases.
Extremely extensive testing (4 years worth)!
Brought OS/2, DOS, AIX and UNIX versions closer together.
Many releases to university and work collegues.
1/5/93 Made Public Domain.
First official external release to Internet.
1/7/93 Added readonly file test to UNIX versions.
Fixed backup filename of "../.login" etc..
Improved tag_error to work with "filename.ext", line NUM.
29/3/94 Converted all source to fully prototyped form.
Made source tree structure much safer.
Compilable with IBM C-Set++ for 32 bit OS/2.
Language redefinition fix.
Comments at ends of lines in .INI files now allowed.
1/11/94 Bugfix for append mode.
Bugfix for VESA support in DOS version.
Added HTML language in supplied .INI file.
1/4/95 Added default key bindings, if .INI file not found.
Replaced Norton Guide with HTML documentation.
9/4/96 Added Win32 version.
14/6/96 Added support for filename case preservation on OS/2 and Win32.
Added Java language definition.
3/3/97 Migration from IBM C-Set++ to IBM VisualAge C++ with CTC305.
Bugfix for illegal Extended Regular Expressions.
Fixed read-only file saving on 32 bit OS/2 version.
HTML documentation is now on the web, not in the package.
1/5/97 Added other_backups.
1/1/98 Extended max languages and buffers.
Worked around Windows 95 Console API bugs.
Added support for other screen sizes to Win32 version.
1/5/98 Increased number of key bindings from 150 to 250.
Rationalised UNIX terminal support.
Added Esc then X equivelent to Alt+X.
Added Linux version.
AIX version built on AIX 4.1 machine (rather than 3.2.5)
Misc UNIX keyboard improvements.
Fixed (widened) valid UNIX filename checking.
1/7/98 Improved Extended Regular Expression support.
1/8/98 Hex numbers, initial HP/UX and Solaris versions.
1/9/98 setup_visible affects ctrl and other characters too now.
Avoid display of chars >= 0x80 on UNIX, its unsafe.
Conditional processing of initialisation file.
1/11/98 Escape ' mechanism for spaces in filename and virtual folds.
Support for UNC \\server\share\path\file.ext filenames on PCs.
/*...e*/
/*...sobtaining this editor:0:*/
The easiest way to obtain this program is via the links on my homepage(s).
/*...e*/
/*...scontacting the author:0:*/
{{{ Andy Key
Email : nyangau@interalpha.co.uk
Homepage : http://www.interalpha.net/customer/nyangau/
(IBM) : http://grob.ssd.hursley.ibm.com/
/*...e*/
/*...e*/