Article View: comp.editors
Article #74AE Oct 92 manual correction
From: Anthony Howe
Date: Wed, 04 Nov 1992 22:20
Date: Wed, 04 Nov 1992 22:20
348 lines
9908 bytes
9908 bytes
Find below an update to the ae.man file from the AE October 92
distribution made earlier in this news group. A correction was
required to the installation section since the source for AE is
no longer a single file, and is built using "make". Also included
is a more generic makefile that has altered the CC, CFLAGS, LD, and
LDFLAGS so as not to be dependant on GNC C.
-ant
---->8 ae.man >8----
0. NAME
ae Anthony's Editor October '92
1. SYNOPSIS
ae [-f config_file] [filename]
2. OPERANDS
config_file The pathname of an AE configuration file. The
pathname may be absolute, relative the current
directory, or relative the user's home directory.
filename The name of a existing or new file to edit.
3. DESCRIPTION
AE is a simple full screen text editor that can be configured for
either a modual (VI-style interface) or a modeless (EMACS-style
interface).
Text files consist of lines of printable text or tab characters.
A line can be of arbitary length and is delimited by either a
newline or the end of file. Carriage return is mapped to newline
on input and ignored on output. Carriage returns already in the file
are preserved. Tab stops are every eight columns.
4. COMMANDS
Two default configuration files are supplied. One of them should be
renamed to "ae.rc" and placed in the user's home directory. The two
supplied files are "mode.rc" and "modeless.rc" which configure the
editor for either modual (VI-style) or modeless (EMACS-style)
operation.
4.1 MODUAL CONFIGURATION
h j k l Left, down, up, right cursor movement.
H J K L Word left, page down, page up, word right.
[ ] Beginning and end of line.
t b Top and bottom of file.
i ESC Enter insert mode, escape to leave.
x Delete character under the cursor.
X Delete character left of the cursor.
? Toggle help on/off.
B Toggle block on/off.
C Cut block to scrap.
P Paste scrap into buffer.
u Undo last cut, paste, read, insert, or undo.
R W Read and write file to and from the buffer.
r Refresh the screen.
q Quit with query.
Q Quit no questions asked.
:ver Display version.
4.2 MODELESS CONFIGURATION
cursor keys Left, down, up, right cursor movement (ansi defined).
^A ^D Word left, word right.
^P ^N Page down, page up.
ESC left Beginning of line.
ESC right End of line.
^T ^B Top and bottom of file.
backspace Delete character left of the cursor.
^X Delete character under the cursor.
F1 Toggle help on/off.
F2 Toggle block on/off.
F3 Cut block to scrap.
F4 Paste scrap into buffer.
^U Undo last cut, paste, read, or undo.
^R ^W Read and write file to and from the buffer.
^L Refresh the screen.
^C Quit with query.
^K^C Quit no questions asked.
^K^V Display version.
5. CONFIGURATION
The user is able to configure the editor with the help text and keys
that the user likes. It is possible to define a modual or modeless
key interface and support multi-character key sequences.
The configuration file layout is fairly simple. All control words
begin on a line starting with a period (.). Invalid keywords are
ignored. The following keys words are used:
.help_text
All the subsequent lines upto the next keyword are considered
help text. The terminating keyword is discarded. There may
be more than one .help_text given.
.insert_enter <string>
.insert_exit <string>
Enter and exit insert mode. The use of .insert_enter denotes
a modual user interface.
.delete_left <string>
.delete_right <string>
Delete character to the left or right of the cursor.
.block <string>
.cut <string>
.paste <string>
Block on/off toggle, cut block, and paste before.
.undo <string>
Undo last cut, paste, insert mode, or undo.
.cursor_up <string>
.cursor_down <string>
.cursor_left <string>
.cursor_right <string>
Cursor motion in four directions. Typically the arrow keys.
.page_up <string>
.page_down <string>
Previous or next screen full of text.
.word_left <string>
.word_right <string>
Move to word left or right of the current cursor.
.line_left <string>
.line_right <string>
Move to the beginning or end of the line.
.file_top <string>
.file_bottom <string>
Move to the top and bottom of the file buffer.
.help <string>
Toggle the help text and ruler line on and off.
.quit <string>
.quit_ask <string>
Exit the editor.
.redraw <string>
Force a screen redraw.
.file_read <string>
.file_write <string>
Read or write a file to or from a buffer.
.itself <character>
The following character represents itself. This is really a
redundant keyword since any key not defined by a keyword,
automatically represents itself.
.stty_erase
.stty_kill
Declare that the terminal's values for the erase and kill
characters should be used in insert mode to backspace-erase,
or discard and restart input.
.show_version <string>
Display the release information.
The parameters <string> and <character> can be any text other than
whitspace (blank, tab, carriage-return, and newline). It is possible
to specify control keys by prefixing the following characters with a
caret (^):
@ a b c d e f g h i j k l m n o
p q r s t u v w x y z [ \ ] ^ _
Also numeric and literal escapes are possible. A numeric escape
begins with a backslash followed by either an octal number with
leading '0', a hex number with leading '0x', or a decimal number.
The value must be between 0 to 255 decimal.
A literal escape also begins with a backslash but is then followed
by a character that is not a digit.
eg.
.insert_enter i <-- single character string
.insert_exit ^[ <-- defines ASCII ESC
.delete_right \0x7f <-- defines ASCII DEL
.cursor_up ^[[A <-- defines sequence ESC [ A
6. EXIT STATUS
0 Success termination.
1 General error.
2 Usage error.
3 Failed to initialize the screen.
4 Problem with the configuration file.
5 Failed to allocate necessary memory.
7. INSTALLATION
Requires K&R C and a CURSES library for the given target machine.
To build AE on most unix-like systems, type
make
The supplied makefile is configured for a BSD environment. Some
systems may require that the macros CC, CFLAGS, LD, LDFLAGS, and LIBS
be configured.
For a System V environment alter the LIBS macro to be only
LIBS = -lcurses
To build AE on systems that have POSIX.1 or System V termios library,
modify the CFLAGS macro to
CFLAGS = -O -DPOSIX=1
If the constants CHUNK, HUP, or CONFIG are not defined by CFLAGS then
the defaults used are
CHUNK = 8096L
HUP = "ae.hup"
CONFIG = "ae.rc"
CHUNK is the size by which the buffer is expanded when the buffer
becomes full while inserting text. HUP should define the name of the
fall-back write file. CONFIG is the name of the default configuration
file. The name chosen aims to satisfy both unix and personal systems.
Unix affectionados may want to reconfigure this to ".aerc".
POSIX should be defined for systems that have POSIX.1 termios support
(which is based on System V termios). This has the affect of
disabling the INTR, QUIT, and SUSP signals. XON/XOFF is left
unchanged. If POSIX is not defined, then cbreak() and nocbreak() are
used which do not disable the above mentioned signals.
Most EBCDIC machines use block mode terminals. This is a problem
that has not been addressed and/or tested for.
8. BUGS
No known bugs.
9. REFERENCES
[Fin80] Craig A. Finseth, "Theory and Practice of Text Editors or
A Cookbook For An EMACS", TM-165, MIT Lab. for Computer
Science
[KeP81] Kernighan & Plauger, "Software Tools in Pascal",
Addison-Wesley, 81, chapter 6
[Mil86] Eugene W. Myers & Webb Miller, "Row-replacement Algorithums
for Screen Editors", TR 86-19, Dept. of Compter Science,
U. of Arizona
[MyM86] Eugene W. Myers & Webb Miller, "A simple row-replacement
method", TR 86-28, Dept. of Compter Science, U. of Arizona
[Mil87] Webb Miller, "A Software Tools Sampler", Prentice Hall, 87
ISBN 0-13-822305-X, chapter 5
[net90] "Editor 101/102" articles from comp.editors
10. FILES
ae.man Manual.
ae.rc Default configuration file used by AE.
mode.rc Sample configuration file for modual style.
modeless.rc Sample configuration file for modeless style (ansi cursor keys).
11. NOTICES
Public Domain 1991, 1992 by Anthony Howe.
---->8 makefile >8----
#
# makefile
#
# Anthony's Editor October '92
#
# Public Domain 1991, 1992 by Anthony Howe.
#
CC = cc
CFLAGS = -O
LD = cc
LDFLAGS = -O
LIBS = -lcurses -ltermcap
CP = cp
MV = mv
RM = rm
E =
O = .o
OBJ = command$(O) data$(O) display$(O) gap$(O) key$(O) main$(O)
ae$(E) : $(OBJ)
$(LD) $(LDFLAGS) -o ae$(E) $(OBJ) $(LIBS)
command$(O): command.c header.h key.h
$(CC) $(CFLAGS) -c command.c
data$(O): data.c header.h
$(CC) $(CFLAGS) -c data.c
display$(O): display.c header.h
$(CC) $(CFLAGS) -c display.c
gap$(O): gap.c header.h
$(CC) $(CFLAGS) -c gap.c
key$(O): key.c key.h header.h
$(CC) $(CFLAGS) -c key.c
main$(O): main.c header.h
$(CC) $(CFLAGS) -c main.c
clean:
-$(RM) $(OBJ) ae$(E)
install:
-$(MV) ae$(E) $(HOME)/$(HOSTNAME)/bin
--
ant@mks.com Anthony C Howe
Mortice Kern Systems Inc. 35 King St. N., Waterloo, Ontario, Canada, N2J 6W9
"Nice legs. For a human that is." - Worf (Q-pid)
Technical Details
Message-ID:
<1992Nov4.222037.5964@mks.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!utcsri!torn!watserv2.uwaterloo.ca!watserv1!mks.com!antShow Full Headers
Complete Article Headers
Newsgroups: comp.editors Path: arc1-ca.pugleaf.net!sparky!uunet!utcsri!torn!watserv2.uwaterloo.ca!watserv1!mks.com!ant From: ant@mks.com (Anthony Howe) Subject: AE Oct 92 manual correction Message-ID: <1992Nov4.222037.5964@mks.com> Sender: ant@mks.com (Anthony Howe) Organization: Mortice Kern Systems, Waterloo, Ontario, CANADA Date: Wed, 4 Nov 1992 22:20:37 GMT Lines: 348