home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
netdor3.zip
/
DISK_12
/
IMAGE11.ZIP
/
T2
/
T.DOC
next >
Wrap
Text File
|
1992-08-05
|
93KB
|
3,026 lines
TDoc-v200-0
===================================================================
T
A Tiny Editor
By Tim Baldwin
Version 2.00
(C) Copyright IBM Corporation 1987, 1992
(C) Copyright IBM Corporation 1987, 1992
PREFACE
This document describes T - a very small yet very powerful full
screen text editor for IBM PC, PS/2 and compatible machines. The
document is divided into two main parts: "Part 1. Using The
Editor" and "Part 2. Editor Reference".
Part 1 is a user's guide containing these sections:
- "1.0 Introduction". This describes T, giving an overview of its
main features and omissions. It also details the hardware and
software you will need to be able to use the editor and how you
can obtain a copy.
- "2.0 Getting Started". This describes how to install T ready
for use. It describes how to start up the editor, what the
screen looks like and how to use the help files.
- "3.0 Editing". Contains a brief introduction to editing with
T describing how to issue commands and functions and the basics
of editing. This section also covers searching and replacing,
the word processing features, the box drawing functions and
describes how to print documents when using the editor.
- "4.0 Customising". Describes how the editor can be customised
to change the screen colours, to redefine the keyboard functions
and to alter some other special editor settings. This section
also shows how to customise the help files supplied with
T.
Part 2 is the reference manual, divided into three sections:
- "1.0 Commands". An alphabetical list of all the editor's
commands.
- "2.0 Keyboard Functions". An alphabetical list of all the
editor's keyboard functions.
- "3.0 Settings". An alphabetical list of all the editor's
special settings.
Two appendices are also included:
- "Appendix A. Messages". Lists all the messages T can produce,
giving the meaning of the message and any possible action that
may need to be taken.
- "Appendix B. User Definable Keys". Lists all the valid names
and shift- combinations for the user-definable keys.
Preface i
(C) Copyright IBM Corporation 1987, 1992
CONTENTS
Part 1. Using The Editor . . . . . . . . . . . . . . . . . . 1
1.0 Introduction . . . . . . . . . . . . . . . . . . . . . . . 2
1.1 Features and Omissions . . . . . . . . . . . . . . . . . . 2
1.2 What You Need . . . . . . . . . . . . . . . . . . . . . . 3
2.0 Getting Started . . . . . . . . . . . . . . . . . . . . . 4
2.1 Starting T . . . . . . . . . . . . . . . . . . . . . . . . 4
2.2 Screen Layout . . . . . . . . . . . . . . . . . . . . . . 4
2.3 The Help File . . . . . . . . . . . . . . . . . . . . . . 5
3.0 Editing . . . . . . . . . . . . . . . . . . . . . . . . . 6
3.1 Simple Editing . . . . . . . . . . . . . . . . . . . . . . 6
3.1.1 The Command Line . . . . . . . . . . . . . . . . . . . 6
3.1.2 The Data Area . . . . . . . . . . . . . . . . . . . . 6
3.1.3 Marking and Copying Lines . . . . . . . . . . . . . . 7
3.1.4 Saving Documents . . . . . . . . . . . . . . . . . . . 7
3.1.5 Working On Several Documents . . . . . . . . . . . . . 7
3.2 Search and Replace . . . . . . . . . . . . . . . . . . . . 8
3.2.1 Searching . . . . . . . . . . . . . . . . . . . . . . 8
3.2.2 Replacing . . . . . . . . . . . . . . . . . . . . . . 8
3.3 Word Processing . . . . . . . . . . . . . . . . . . . . . 9
3.3.1 The Right Margin and Word Spill . . . . . . . . . . . 9
3.3.2 The ADJUST LINE Function . . . . . . . . . . . . . . . 9
3.4 Drawing Boxes . . . . . . . . . . . . . . . . . . . . . . 10
3.5 Printing . . . . . . . . . . . . . . . . . . . . . . . . 10
3.5.1 Printer Control Codes . . . . . . . . . . . . . . . . 11
3.5.2 Printer Set Up . . . . . . . . . . . . . . . . . . . 11
4.0 Customising . . . . . . . . . . . . . . . . . . . . . . . 12
4.1 The Custom Definition File . . . . . . . . . . . . . . . 12
4.1.1 Colour Commands . . . . . . . . . . . . . . . . . . . 13
4.1.2 Key Commands . . . . . . . . . . . . . . . . . . . . 14
4.1.3 Set Commands . . . . . . . . . . . . . . . . . . . . 16
4.2 The HELP and USER Functions . . . . . . . . . . . . . . . 16
4.3 The Enhanced Keyboard . . . . . . . . . . . . . . . . . . 17
Part 2. Editor Reference . . . . . . . . . . . . . . . . . . 18
1.0 Commands . . . . . . . . . . . . . . . . . . . . . . . . 19
1.1 APPEND . . . . . . . . . . . . . . . . . . . . . . . . . 19
1.2 CHANGE . . . . . . . . . . . . . . . . . . . . . . . . . 19
1.3 DOS . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
1.4 EDIT . . . . . . . . . . . . . . . . . . . . . . . . . . 20
1.5 FILE . . . . . . . . . . . . . . . . . . . . . . . . . . 20
1.6 GET . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
1.7 GOTO . . . . . . . . . . . . . . . . . . . . . . . . . . 21
1.8 LOCATE . . . . . . . . . . . . . . . . . . . . . . . . . 21
1.9 MARGIN . . . . . . . . . . . . . . . . . . . . . . . . . 21
1.10 NAME . . . . . . . . . . . . . . . . . . . . . . . . . . 22
1.11 PRINT . . . . . . . . . . . . . . . . . . . . . . . . . 22
1.12 PUT . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Contents ii
(C) Copyright IBM Corporation 1987, 1992
1.13 QUIT . . . . . . . . . . . . . . . . . . . . . . . . . . 22
1.14 SAVE . . . . . . . . . . . . . . . . . . . . . . . . . . 22
1.15 VERSION . . . . . . . . . . . . . . . . . . . . . . . . 23
2.0 Keyboard Functions . . . . . . . . . . . . . . . . . . . 24
2.1 ADJUST LINE . . . . . . . . . . . . . . . . . . . . . . . 24
2.2 BACKSPACE . . . . . . . . . . . . . . . . . . . . . . . . 24
2.3 BACKTAB . . . . . . . . . . . . . . . . . . . . . . . . . 24
2.4 BOTTOM OF FILE . . . . . . . . . . . . . . . . . . . . . 24
2.5 BOTTOM OF MARK . . . . . . . . . . . . . . . . . . . . . 25
2.6 BOTTOM OF SCREEN . . . . . . . . . . . . . . . . . . . . 25
2.7 CLEAR MARK . . . . . . . . . . . . . . . . . . . . . . . 25
2.8 COMMAND TOGGLE . . . . . . . . . . . . . . . . . . . . . 25
2.9 COPY MARK . . . . . . . . . . . . . . . . . . . . . . . . 25
2.10 DELETE CHARACTER . . . . . . . . . . . . . . . . . . . . 25
2.11 DELETE LINE . . . . . . . . . . . . . . . . . . . . . . 25
2.12 DELETE MARK . . . . . . . . . . . . . . . . . . . . . . 26
2.13 DOWN . . . . . . . . . . . . . . . . . . . . . . . . . . 26
2.14 EDIT . . . . . . . . . . . . . . . . . . . . . . . . . . 26
2.15 END OF LINE . . . . . . . . . . . . . . . . . . . . . . 26
2.16 ESCAPE . . . . . . . . . . . . . . . . . . . . . . . . . 26
2.17 FILE . . . . . . . . . . . . . . . . . . . . . . . . . . 26
2.18 HELP . . . . . . . . . . . . . . . . . . . . . . . . . . 27
2.19 INSERT LINE . . . . . . . . . . . . . . . . . . . . . . 27
2.20 INSERT TOGGLE . . . . . . . . . . . . . . . . . . . . . 27
2.21 JOIN LINE . . . . . . . . . . . . . . . . . . . . . . . 27
2.22 LEFT . . . . . . . . . . . . . . . . . . . . . . . . . . 27
2.23 MARK LEFT . . . . . . . . . . . . . . . . . . . . . . . 27
2.24 MARK LINE . . . . . . . . . . . . . . . . . . . . . . . 28
2.25 MARK RIGHT . . . . . . . . . . . . . . . . . . . . . . . 28
2.26 MOVE MARK . . . . . . . . . . . . . . . . . . . . . . . 28
2.27 NAME . . . . . . . . . . . . . . . . . . . . . . . . . . 28
2.28 NEW LINE . . . . . . . . . . . . . . . . . . . . . . . . 28
2.29 NEXT FILE . . . . . . . . . . . . . . . . . . . . . . . 29
2.30 NEXT LINE . . . . . . . . . . . . . . . . . . . . . . . 29
2.31 NEXT WORD . . . . . . . . . . . . . . . . . . . . . . . 29
2.32 NOTHING . . . . . . . . . . . . . . . . . . . . . . . . 29
2.33 PAGE DOWN . . . . . . . . . . . . . . . . . . . . . . . 29
2.34 PAGE UP . . . . . . . . . . . . . . . . . . . . . . . . 29
2.35 PREVIOUS FILE . . . . . . . . . . . . . . . . . . . . . 29
2.36 PREVIOUS WORD . . . . . . . . . . . . . . . . . . . . . 29
2.37 QUIT . . . . . . . . . . . . . . . . . . . . . . . . . . 30
2.38 REPEAT FIND . . . . . . . . . . . . . . . . . . . . . . 30
2.39 REPEAT LINE . . . . . . . . . . . . . . . . . . . . . . 30
2.40 RIGHT . . . . . . . . . . . . . . . . . . . . . . . . . 30
2.41 SAFE FILE . . . . . . . . . . . . . . . . . . . . . . . 30
2.42 SAVE . . . . . . . . . . . . . . . . . . . . . . . . . . 30
2.43 SCROLL DOWN . . . . . . . . . . . . . . . . . . . . . . 30
2.44 SCROLL LEFT . . . . . . . . . . . . . . . . . . . . . . 31
2.45 SCROLL RIGHT . . . . . . . . . . . . . . . . . . . . . . 31
2.46 SCROLL UP . . . . . . . . . . . . . . . . . . . . . . . 31
2.47 SPLIT LINE . . . . . . . . . . . . . . . . . . . . . . . 31
2.48 START OF LINE . . . . . . . . . . . . . . . . . . . . . 31
2.49 TAB . . . . . . . . . . . . . . . . . . . . . . . . . . 31
2.50 TOP OF FILE . . . . . . . . . . . . . . . . . . . . . . 31
Contents iii
(C) Copyright IBM Corporation 1987, 1992
2.51 TOP OF MARK . . . . . . . . . . . . . . . . . . . . . . 32
2.52 TOP OF SCREEN . . . . . . . . . . . . . . . . . . . . . 32
2.53 TRUNCATE LINE . . . . . . . . . . . . . . . . . . . . . 32
2.54 UNDO . . . . . . . . . . . . . . . . . . . . . . . . . . 32
2.55 UP . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
2.56 USER . . . . . . . . . . . . . . . . . . . . . . . . . . 32
3.0 Settings . . . . . . . . . . . . . . . . . . . . . . . . 33
3.1 AUTOMATIC INDENT . . . . . . . . . . . . . . . . . . . . 33
3.2 CGA SNOW . . . . . . . . . . . . . . . . . . . . . . . . 33
3.3 COMMAND RECALL . . . . . . . . . . . . . . . . . . . . . 33
3.4 COMMAND TOGGLE . . . . . . . . . . . . . . . . . . . . . 34
3.5 EXACT MATCH . . . . . . . . . . . . . . . . . . . . . . . 34
3.6 FINAL EOF . . . . . . . . . . . . . . . . . . . . . . . . 34
3.7 HELP COMMAND . . . . . . . . . . . . . . . . . . . . . . 34
3.8 HELP LINE . . . . . . . . . . . . . . . . . . . . . . . . 35
3.9 INSERT TOGGLE . . . . . . . . . . . . . . . . . . . . . . 35
3.10 KEYBOARD . . . . . . . . . . . . . . . . . . . . . . . . 35
3.11 MARGIN . . . . . . . . . . . . . . . . . . . . . . . . . 35
3.12 TAB EXPAND . . . . . . . . . . . . . . . . . . . . . . . 35
3.13 TAB SPACING . . . . . . . . . . . . . . . . . . . . . . 36
3.14 USER COMMAND . . . . . . . . . . . . . . . . . . . . . . 36
Appendix A. Messages . . . . . . . . . . . . . . . . . . . . 37
Appendix B. User Definable Keys . . . . . . . . . . . . . . 41
Contents iv
(C) Copyright IBM Corporation 1987, 1992
Part 1. Using The Editor
Part 1. Using The Editor 1
(C) Copyright IBM Corporation 1987, 1992
1.0 INTRODUCTION
T is a full screen text editor for the IBM PC, PS/2 and compatible
family of machines. It is designed to be quick and easy to learn
and simple to use, while remaining both extremely powerful and very
small - to DOS version being under 9K bytes in size.
A very small editor has a number of advantages:
- It may be used on machines with a limited amount of memory.
Even a PC with a full 640K of memory can have a large amount of
this used up when a number of terminate-and-stay-resident type
programs are installed - local area network drivers and terminal
emulators are prime examples.
- It may be used for editing large files, that would be too large
to load into memory with a bigger editor.
- It may be invoked from inside other programs yet still have
enough free memory to edit a good sized file.
- It loads and starts very quickly indeed. If you just wish to
make a small change to your CONFIG.SYS file it can be very
frustrating to spend time waiting for a large word processor to
start up.
1.1 FEATURES AND OMISSIONS
T has the following main features:
- Very small size, under 9K bytes.
- Fast, easy to use, full screen interface that adapts
automatically to use the full size of the display.
- Can edit very large files, subject to available memory.
- Can edit any number of files at once, subject to available
memory.
- On screen help
- Very fast search and replace functions.
- Customisable keyboard and screen colours.
- Any DOS command may be run without leaving the editor.
- A "right hand margin" and word-spill to allow some simple word
processing to be performed.
To keep T small it necessarily lacks some of the more advanced
features of larger editors. In particular:
Introduction 2
(C) Copyright IBM Corporation 1987, 1992
- Copying and moving data can only be performed on blocks of one
or more whole lines.
- Lines are limited to 255 characters maximum length.
- Word processing capabilities are very limited.
- No programmability, although the appearance and function may be
customised.
1.2 WHAT YOU NEED
T should run on any IBM PC, PS/2 or compatible machine. It needs
PC-DOS or MS-DOS version 2.00 or later, or any version of OS/2.
The DOS version may also be run as a DOS application under
Microsoft Windows. When used with OS/2 with appropriate versions
of MS Windows it may be run from both full screen and windowed
command lines, or may be started by placing an entry in one of the
OS/2 folders or Windows Program Manager groups.
Note: A very small number of non-IBM machines can give trouble with
the DOS version of T. Refer to "4.3 The Enhanced Keyboard" on page
17 for more details.
T is available from CompuServe and is supplied in a single file
called TINYED.ZIP. This .ZIP file should be expanded using PKUNZIP
in the usual manner and when expanded will give these files:
T.EXE This is the PC-DOS executable version of the editor.
T2.EXE This is the OS/2 executable version of the editor.
THELP.HLP This is a simple help file for the standard editor
configuration.
TKEY.EXE This is the customiser program. It will run under
either PC-DOS or OS/2 and will customise either
version of the editor.
TKEYS.DEF This is a sample custom definition file that describes
the standard editor configuration.
T.DOC This file, the full documentation.
TINYED.ABS A short introduction to installing and using the
editor.
Introduction 3
(C) Copyright IBM Corporation 1987, 1992
2.0 GETTING STARTED
This section describes how to get T up and running, what the screen
looks like and how to ask for help.
2.1 STARTING T
Only the executable file (T.EXE for PC-DOS or T2.EXE for OS/2) is
required to be able to use the editor; this should be located in
the current directory of the current drive, or in a subdirectory
listed in your PATH. The other files are only required if you want
to customise the editor or if you want to use the supplied help
file. These other files are normally be kept on a separate
diskette or in their own subdirectory (which need not be in the
PATH).
If you use OS/2 exclusively or use both DOS and OS/2 but keep DOS
and OS/2 programs in separate subdirectories you might want to
rename the OS/2 executable to T.EXE also. This avoids having to
remember whether to type T or T2 depending on the environment you
are using.
Since T is so small it makes sense to put it on a RAMDRIVE if you
have one installed, this means that it will load almost instantly.
To start T simply enter the following command at the DOS or OS/2
prompt:
T <filename> <filename> ...
You can put any number, including zero, of file names after the
T command and T will load each file you list into its memory.
2.2 SCREEN LAYOUT
The T screen is divided into four areas:
1. The Message Line and the Help line.
The bottom line of the screen is used to display error and
informational messages. When no messages are displayed this
line instead shows a single line of "help". Typically the
functions assigned to the F-keys are displayed, but this can be
customised to whatever you want.
2. The Status Line.
Above the message line is the status line. This shows the name
of the current document and the line and column number of the
cursor within the document. If a right-hand margin has been set
this will also be displayed following an "M" margin indicator.
The current typing mode (either "replace" or "insert") is also
indicated.
Getting Started 4
(C) Copyright IBM Corporation 1987, 1992
3. The Command Line.
Above the status line is the command line. Any any valid
T command may be entered here.
4. The Data Area.
The rest of the screen is used to display the document being
edited.
The size of the data area is automatically adjusted to fill the
whole of the screen. Most recent displays (EGAs or better) can
show more than 25 lines and some can show more than 80 columns.
T cannot change the size of the display but it will use whatever
number of lines and columns are set when it is started. So to see
rather more data on the screen first switch to a greater than 25
line mode then invoke T. For example, the following command will
switch to a 43 line mode under OS/2 or DOS (this needs DOS 4.00 or
later):
MODE CO80,43
2.3 THE HELP FILE
T is supplied with a simple help file which describes the default
key settings and the commands available. When using T for the
first time ensure that the help file, THELP.HLP, is available in
the current directory of the current drive. Later you can
customise the editor to allow the help file to be kept somewhere
else.
Press the F1 key to load and display the help file. Then use the
PgUp and PgDn keys to view the various help panels it contains. If
you have a 40-column display use the Home and End keys to view the
left and right hand panels.
Getting Started 5
(C) Copyright IBM Corporation 1987, 1992
3.0 EDITING
This section gives a brief introduction to editing with T. It
assumes the editor is used in its default configuration, as
supplied. Later sections describe how to customise the editor.
Anyone who is familiar with the IBM Personal Editor will recognise
the way T works immediately and should be able to skip most of this
section - although a glance at "3.3 Word Processing" on page 9 and
"3.4 Drawing Boxes" on page 10 might be worthwhile.
3.1 SIMPLE EDITING
If T is started without any filename (by just entering T on the
command line) it displays and edits a new, empty, un-named
document. A "Top Of File" marker line indicates the top of the
document and a "Bottom Of File" marks the bottom. These marker
lines are not part of the document and may not be edited, although
the cursor may be moved onto them.
3.1.1 THE COMMAND LINE
The cursor starts off on the command line, which is the third line
up from the bottom of the screen. Any T command can be entered on
the command line, it is executed when the Enter key is pressed. As
a command is typed in mistakes can be corrected using the cursor
Left, cursor Right and Backspace keys. When the editor is in
"replace" mode any characters typed overwrite those already on the
screen; when in "insert" mode any characters to the right of the
cursor are shifted right to make room for the new text. Switch
between "insert" and "replace" mode by pressing the Ins key.
When on the command line the cursor Up and cursor Down keys recall
any previous commands entered. These can then either be entered
again directly by pressing Enter or can be altered before being
reused.
3.1.2 THE DATA AREA
The cursor may be switched into the data area by pressing the Esc
key. When the cursor is on the command line a shadow cursor marks
the position in the data where the real cursor will appear when Esc
is pressed.
When the cursor is in the data area it may be moved anywhere
between the "Top Of File" and "Bottom Of File" markers using the
cursor keys. At any place text may be typed from the keyboard. If
the editor is in "replace" mode any text typed will overwrite
whatever was there before, if it is in "insert" mode anything to
the right of the cursor will be shifted to the right to make room
for the new text.
Editing 6
(C) Copyright IBM Corporation 1987, 1992
To add a new line press Ctrl-Enter, and to delete a line press
Ctrl-Backspace. Alternatively if the editor is in "insert" mode
just pressing Enter will insert a new blank line.
3.1.3 MARKING AND COPYING LINES
A block of one or more lines may be marked by pressing the key
Alt-L n the first and last lines of the required block.
Marked blocks may be deleted by pressing Alt-D or they be moved or
copied somewhere else. To move or copy first position the cursor
at the line above the desired new position, then press either Alt-M
or Alt-C respectively.
Marked blocks are also useful for limiting the scope of a CHANGE or
LOCATE command.
It is also possible to shift all marked lines one character to the
left or right by pressing Alt-F7 or Alt-F8 respectively. This can
be useful when writing programs to indent a block of code.
To duplicate a copy of the current line just press Alt-R.
3.1.4 SAVING DOCUMENTS
If a document has a name (displayed on the status line) it can be
saved to disk simply by pressing F2; once saved you may quit the
document by pressing F3. Alternately you can perform a save and
quit in one operation by pressing F4. If a document doesn't have a
name you must give it one: either use the NAME command to name the
document or use the SAVE or FILE commands along with a filename
parameter.
Note: Pressing F4 (the SAFE FILE function) will not cause the file
to be written to disk if it has not been changed. If you want to
force an unchanged document to be re-written to disk simply use the
FILE command from the command line.
3.1.5 WORKING ON SEVERAL DOCUMENTS
T can edit any number of documents at once. The documents are held
in an edit ring, and although only one can be displayed on the
screen at one time, you can cycle through the ring by pressing the
F10 and F11 keys. The actual number of documents you can hold in
the ring depends on the size of each document and how much memory
your machine has; each document has to be completely loaded in
memory.
To load multiple documents you can either enter several filenames
when T is started from the command line, or you can issue EDIT
commands to load more files once T is running.
Editing 7
(C) Copyright IBM Corporation 1987, 1992
The marked line functions move (Alt-M) and copy (Alt-C) are
particularly useful when editing several documents as lines can be
moved and copied to and from different documents.
3.2 SEARCH AND REPLACE
3.2.1 SEARCHING
To search for a particular word or phrase in a document switch onto
the command line and use the LOCATE command. In its simplest form
you just enter a command rather like this:
/word
This will search the document for the next occurrence of "word".
Remember this only searches from the current position onwards, to
search from the top you need to first move to the top by pressing
Ctrl-Home.
Having found a match you can repeat the search to find the next
match simply by pressing Alt-F. If no further matches can be found
before the end of the document the message "No match found" will be
displayed.
Normally LOCATE commands are case-sensitive i.e. a search for
"word" would not find "Word". To do a case-insensitive search add
the "c" option to the command:
/word/c
3.2.2 REPLACING
To change one word or phrase into something else switch onto the
command line and use the CHANGE command, for example:
C/this/that
This will search for the next occurrence of the word "this" and
then prompt for an action: "Yes/No/Go/Last/Quit?". Hit either Y,
N, G, L or Q as appropriate:
Yes To change this occurrence of "this" into "that" and to
search for the next occurrence of "this".
No To skip this change, but to continue searching.
Go To make this change and all further changes to the end of
the document without any further prompting.
Last To make this change and to stop searching, so this becomes
Editing 8
(C) Copyright IBM Corporation 1987, 1992
the last change.
Quit To skip this change and stop searching.
To avoid the prompt message and to make all changes straightaway
add the "*" option to the command:
C/this/that/*
3.3 WORD PROCESSING
T is not designed to be a word processor, but it does provide some
very simple word processing functions that are useful for creating
quick notes or for entering marked-up documents that will later be
formatted with a batch formatter.
3.3.1 THE RIGHT MARGIN AND WORD SPILL
The command MARGIN allows a right hand margin column to be set.
When a margin is set the status line indicates its column number
with "M nnn". To set the right hand margin to column 72 you would
enter the command:
MARGIN 72
As text is entered into the document any words that are typed
across the right hand margin are automatically word-spilled onto a
new inserted line. This means it is possible to type whole
paragraphs without having to worry about hitting Enter at the end
of each line. As words spill onto a new line they are
automatically indented from the left hand side so as they align
under the first non-blank character of the line above. This makes
it very simple to leave a left margin or to enter whole sections
indented.
3.3.2 THE ADJUST LINE FUNCTION
If corrections need to be made to text entered with a right margin
the text will not be reflowed automatically to keep the margins
correct. In fact after making a number of corrections it will tend
to end up in rather a mess. The ADJUST LINE function is provided
to tidy up this mess and re-align everything correctly. ADJUST
LINE is performed by pressing Alt-A and will adjust the current
line based on the current right margin setting. If the line is too
short it will be filled out with words from the next line down and
if it is too long it will be split in two. As with the word-spill,
when ADJUST LINE spills words onto the next line they are aligned
under the first non-blank character of the preceding line.
ADJUST LINE will ignore blank lines skipping over them and moving
the cursor to the next line down, and if a line needs to be split
Editing 9
(C) Copyright IBM Corporation 1987, 1992
in two the cursor will move down to the split-off portion. This
makes re-adjusting whole paragraphs very simple, just place the
cursor on the first line of the paragraph and keep pressing Alt-A
until it is re-flowed correctly.
Note: When a line is too short and ADJUST LINE fills with words
from the next line, these words are joined to the line with just
one intervening blank. If before the ADJUST LINE the last
character happened to be a full stop at the end of a sentence you
may need to go back and insert an extra space to maintain the
convention of two blanks following a sentence end.
3.4 DRAWING BOXES
The PC character set contains a group of special symbols that can
be used to draw boxes. T assigns the box corner and intersection
characters to the keys Alt-1 to Alt-9. As a reminder of which box
corner is assigned to which key, just look at the numeric keypad
which is arranged like this:
7 8 9
4 5 6
1 2 3
So the Alt-7 key produces a top left box corner, the Alt-3 a bottom
right and so on. Remember though that the keypad just provides a
mnemonic - you must actually enter characters using the Alt-key and
the numerals along the top of the main keyboard area.
The horizontal line is assigned to Alt-- (Alt-minus) and the
vertical line to Alt-= (Alt-equals). These two may need
reassigning to use other keys on non-English language keyboards,
where the "-" and "=" keys don't appear on the top row just after
the numerals. This can be done by customising the editor (see "4.0
Customising" on page 12).
3.5 PRINTING
To print the current document switch onto the command line and
enter the PRINT command. No special facilities are provided for
formatted printing, the PRINT command will simply write a copy of
the current document to the printer. If used with no parameters
PRINT will write to the device PRN, which for most people will be
the printer attached to their machine. If you have a serially
attached printer or use use a LAN printer you may need to specify a
device to print to, for example:
PRINT COM1
or PRINT LPT2
To print a piece of a document first mark the block of lines to be
printed, then use the PUT command to write them to a device. A
device must be specified with the PUT command, so normally you
Editing 10
(C) Copyright IBM Corporation 1987, 1992
would use:
PUT PRN
3.5.1 PRINTER CONTROL CODES
You may embed printer control codes directly in your documents if
you want to produce special effects such as bold or emphasised.
Control codes normally require the use of the function ESCAPE
(assigned to Alt-X) to allow them to be entered. Press Alt-X
followed by the control code you want.
All control codes can be entered using the keypad on the right of
the keyboard. After pressing Alt-X, press and hold down the Alt
key, then type the decimal number of the control code on the keypad
and release the Alt key. Most control codes show up on the screen
as odd little symbols.
You will need to refer to your printer manual to see what control
codes are available and what they do on your printer.
3.5.2 PRINTER SET UP
You may prefer not to place the printer control codes directly in
the document, but to keep the document as plain, readable text.
But you may want to send a few special characters to the printer
before printing a document, perhaps to switch the printer to NLQ
mode.
These printer set up sequences can be issued with a DOS ECHO
command, for example to put a Proprinter into NLQ mode issue the
following command:
DOS ECHO xG >PRN
where the "x" should be an ASCII "Esc" control code entered by
hitting Alt-X followed by the Esc key.
Editing 11
(C) Copyright IBM Corporation 1987, 1992
4.0 CUSTOMISING
This section describes how you can customise T to match your own
preferences for screen colours, keyboard layouts and special
settings. Even if you like T exactly the way it is supplied and
don't want to change any of the colours or keys, you will probably
still need to customise some of the special settings, at least to
tell the editor where you keep its help file.
To customise T you must first construct a Custom Definition
File, which is described in detail in the next section. Then use
the TKEY.EXE customiser program to customise your copy of the
editor, by entering this command:
TKEY custom-file editor-file
Replace custom-file with the name of your custom definition file
and replace editor-file with the name the editor you want to
customise. Unless you tell it otherwise TKEY will assume the
custom definition file has an extension of .DEF and the editor of
.EXE. So to customise both the PC-DOS and the OS/2 versions with a
custom definition file called TCUST.DEF you would use the two
commands:
TKEY TCUST T
and TKEY TCUST T2
Once the customising is complete the changes are recorded
permanently inside the .EXE file. You no longer need either the
TKEY program or your custom definition file, unless you decide to
make further changes.
4.1 THE CUSTOM DEFINITION FILE
The custom definition file contains a description of the way you
want T to be configured. An example of a custom definition file is
supplied with T, this is called TKEYS.DEF and contains the
description of the default configuration. This file serves as a
good example of how to write a custom definition, but should be
used for reference only. You should create your own custom
definition file and call it something other than TKEYS.DEF. This
will ensure that if you ever obtain a new copy the T package you do
not lose any changes you made. Of course a good way to start your
own definition file would be to copy TKEYS.DEF under another name.
The custom definition file contains four sorts of item. Normally
each item is placed on a new line, although one item can be split
over several lines or several items can be placed on one line, if
desired.
1. Comments.
Comments are ignored by the customiser program and serve to make
the definition file more readable. Comments come in three
Customising 12
(C) Copyright IBM Corporation 1987, 1992
flavours:
a. Anything between the comment markers /* and */. Comments of
this sort can extend over several lines if required.
b. Anything between the comment marker // and the end of the
line.
c. Several special words and symbols are ignored: blank lines,
blank spaces, ON, OF, TO, IS, ;, =, [ and ].
2. Colour Commands
Colour commands define the colours used for the various parts of
the screen.
3. Key Commands
Key commands assign keyboard functions or single characters to
keys.
4. Set Commands
Set commands alter the editor's special settings.
In the following descriptions uppercase will be used to indicate
keywords and lowercase to indicate parameters you must enter.
Items in angle brackets are optional. In your custom definition
file you may use any mixture of upper- or lowercase.
4.1.1 COLOUR COMMANDS
COLOUR screen area = fore <ON back>
or COLOR screen area = fore <ON back>
Colour commands define the colours that will be used for the
various areas of the screen, the following parameters should be
provided:
screen is either MONO or COLOUR (or COLOR). Two sets of colours
are defined, one set is used with the colour modes of the
colour displays and the other with the monochrome display
or with the colour display when in black-and-white modes
(this latter setting can be useful when a colour card
drives a mono screen like Portable PC's built in amber
screen).
area is an area of the screen. It should be one of:
DATA
MARK
SHADOW CURSOR
STATUS LINE
HELP LINE
MESSAGE LINE
Customising 13
(C) Copyright IBM Corporation 1987, 1992
fore is the foreground colour, one of:
BLACK
BLUE
GREEN
TURQUOISE or CYAN
RED
PINK or MAGENTA
BROWN
WHITE
GREY or GRAY
YELLOW
Optionally each colour may be preceded by one or more
attributes chosen from:
UNDERLINED
BLINKING
BRIGHT or LIGHT
Not all combinations are meaningful or useable on the PC,
although the customiser program will accept them. In
particular: UNDERLINED is only meaningful with the mono
screen, YELLOW is the same as BRIGHT BROWN and GREY is the
same as BRIGHT BLACK.
back is an optional background colour specified from the same
choices as the foreground colours, although only the
BRIGHT or LIGHT attributes may be used. Note that on some
machines a BRIGHT background will actually produce a
BLINKING foreground instead. (Bear this in mind
particularly if YELLOW i.e. BRIGHT BROWN or GREY i.e.
BRIGHT BLACK are chosen as background colours.)
If no background is given BLACK will be used.
4.1.2 KEY COMMANDS
KEY <shift->keyname = function
or DEF <shift->keyname = function
or KEY <shift->keyname = character
or DEF <shift->keyname = character
Key commands assign the editor's keyboard functions or single ASCII
characters to user definable keys. The parameters are:
shift- is the shift key that must be pressed. It is omitted
for unshifted keys or specified as one of:
S- for either of the shift keys.
C- for the Ctrl key.
A- for the Alt key.
Customising 14
(C) Copyright IBM Corporation 1987, 1992
keyname is chosen from:
A to Z
0 to 9
F1 to F12
- (the minus key)
= (the equals key)
[ (the open square bracket key)
] (the close square bracket key)
\ (the backslash key)
ESC
TAB
BACKSPACE
ENTER
HOME
END
PGUP
PGDN
UP
DOWN
LEFT
RIGHT
INS
DEL
PAD5
Not all shift-keyname combinations are valid, and some
are not available for use on the older PC keyboard -
the one with 10 F-keys over on the left. See "Appendix
B. User Definable Keys" on page 41 for a full list of
combinations.
Note: The following pairs of keys are considered
identical by T, so assigning a function to one will
also assign it to the other:
C-M and ENTER
C-[ and ESC
C-I and TAB
C-H and BACKSPACE
C-J and C-ENTER
function is one of the keyboard functions. The full list of
keyboard functions is defined in "2.0 Keyboard
Functions" on page 24.
character is a single ASCII character. This can either be
specified as the character itself in quotes, or using
the form:
ASCII nnn
where nnn is the character's ASCII code point. This
allows characters not normally present on the keyboard
(such as the box drawing characters) to be assigned to
keys.
Customising 15
(C) Copyright IBM Corporation 1987, 1992
4.1.3 SET COMMANDS
SET item = value
Set command allow customising of the special editor settings.
These are described in detail in "3.0 Settings" on page 33.
4.2 THE HELP AND USER FUNCTIONS
The HELP and USER keyboard functions are rather special, and quite
powerful features. The HELP and USER functions work in an
identical way, the fact that one is called "HELP" is only really to
suggest a good use for the function; once you are familiar with the
way T works you may decide you no longer really need a help system,
and you can then use HELP for something else completely.
The functions are defined by two items in the custom definition
file. Firstly the keyboard function is assigned to key, and
secondly a Tcommand is assigned to the function. For example:
KEY F1 = HELP
SET HELP COMMAND = "EDIT THELP.HLP"
In this example the HELP keyboard function is assigned to the F1
key, and the help function is assigned the command "EDIT
THELP.HLP".
When the HELP keyboard function is pressed (i.e. F1 is pressed)
T will execute the HELP command, just as if it had been typed on
the command line. In this example it will therefore load and
display a help file.
The command that is assigned to the function can be any command
that could be entered on the T command line, so some other useful
applications might be:
- Use the standard T help file but locate it in the
\EDITORS\T subdirectory on the C: drive:
KEY F1 = HELP
SET HELP COMMAND = "T C:\EDITORS\T\THELP.HLP"
- Set Alt-P to print the current document to COM1:
KEY A-P = USER
SET USER COMMAND = "PRINT COM1"
- Set Alt-H to invoke an external HELP program for a subject
called "T":
KEY A-H = HELP
SET HELP COMMAND = "DOS HELP T"
- Set the F5 key to shell out to a DOS or OS/2 command prompt:
Customising 16
(C) Copyright IBM Corporation 1987, 1992
KEY F5 = USER
SET USER COMMAND = "DOS"
4.3 THE ENHANCED KEYBOARD
Most recent PCs and all PS/2s come with IBM's Enhanced Keyboard.
This is the keyboard with twelve function keys arranged across the
top and an extra set of cursor control keys between the typewriter
keys and the numeric keypad. Older PCs and some notebook style
machines have a keyboard with just ten function keys. To make use
of the extra keys on the Enhanced Keyboard a program must work in a
different way from that which was used to handle the old-style
keyboards, if the old-style interface is used only the subset of
keys present on the older keyboard will be recognised. This is
necessary to maintain compatibility with old programs.
T attempts to determine which type of keyboard interface to use, so
that if an Enhanced Keyboard is attached all its keys will be
available. However the tests used to decide which type of keyboard
is present can be fooled by some non-IBM BIOSs, and by some older
TSR programs that were created before the Enhanced Keyboard was
available. This usually shows up as a problem when the editor
starts: the command line becomes full of a repeated character and
the editor hangs.
In situations like these you must force T to use the old keyboard
interface by putting this line in your custom definition file:
SET KEYBOARD = STANDARD
Customising 17
(C) Copyright IBM Corporation 1987, 1992
Part 2. Editor Reference
Part 2. Editor Reference 18
(C) Copyright IBM Corporation 1987, 1992
1.0 COMMANDS
This section describes each of the commands that may be entered on
the T command line. In describing the syntax of the commands,
upper-case letters are used for the command name and lower-case
letters for any parameters you must supply. Optional parameters
are enclosed in angle brackets. Commands may actually be entered
in any mixture of upper- or lower-case.
Where the parameters call for a filename enter any valid DOS or
OS/2 file name. This may include the drive letter and directory
path if required; if none is given the current drive and directory
will be used. When using the OS/2 High Performance File System
(HPFS) filenames are not limited to the DOS "8-dot-3" format and
any upper- or lower-case characters used will be preserved.
1.1 APPEND
APPEND filename
The currently marked lines are written to the file
"filename". The lines are added to the end of the file, preserving
any former contents. The file is created if it does not exist.
1.2 CHANGE
C /target/replacement</options>
The next occurrence of the text "target" starting from the current
cursor position, is located. Then the message
"Yes/No/Go/Last/Quit?" is displayed, to which you should reply with
one of:
Y to change this instance of "target" into
"replacement". The next occurrence of "target" is then found
and the process repeats.
N to not change this instance of "target", but to continue
searching for the the next occurrence.
G to change this instance of "target" into
"replacement" and then to change all further instances (until
to end of the document) without further prompting.
L to change this instance of "target" into
"replacement" and then to stop the command, so this becomes the
last change made.
Q to stop the change command without making any further changes.
The "/" character is a delimiter and it can be replaced with any
character that does not occur in either the "target" or the
"replacement". Note that the delimiter is the first non-blank
Commands 19
(C) Copyright IBM Corporation 1987, 1992
character following the C command.
Following a final delimiter any of these options may be used:
m to restrict the changes to the marked lines only.
* to change all occurrences of "target" to
"replacement" without prompting.
Note: Change commands are always case-sensitive.
1.3 DOS
DOS <command>
or .<command>
A secondary DOS or OS/2 shell is started to execute the
"command". A full stop, ".", may be used as a quick abbreviation
for the word DOS.
If no "command" is given the DOS or OS/2 command line prompt will
appear. You can return to T by entering the command EXIT.
1.4 EDIT
EDIT <filename>
or E <filename>
or T <filename>
If a "filename" is given T will switch directly to display that
document. The file will be loaded from disk, if it is not already
in the edit ring.
If no "filename" is given the next document in the edit ring will
be selected.
1.5 FILE
FILE <filename>
or F <filename>
The current document will be saved to disk and then removed from
the edit ring. If a "filename" is given the document will be saved
under this name, otherwise the name shown on the status line will
be used.
Commands 20
(C) Copyright IBM Corporation 1987, 1992
1.6 GET
GET filename
The contents of "filename" will be inserted into the current
document following the current line.
1.7 GOTO
GOTO linenum
or linenum
Line number "linenum" will become the current line. If
"linenum" is bigger than the number of lines in the document the
last line will become the current line. The word GOTO is optional,
just entering the required "linenum" on the command line is
sufficient.
1.8 LOCATE
L /target</options>
or /target</options>
The next occurrence of the text "target", starting from the current
cursor position, will be located. If the "L /target" form of the
command is used the delimiter, "/", may be replaced by any
character that does not occur in "target".
Following a final delimiter any of these options may be used:
m to restrict the search to the marked lines only.
e to force an exact-case match.
c to force an any-case match. (Apologies to non-English
speakers: only the 26 letters "a" to "z" are correctly
handled.)
Note: if neither e nor c is given the editor's MATCH CASE setting
is used. This may be customised - refer to "4.0 Customising" on
page 12 for more details.
1.9 MARGIN
MARGIN column
or MA column
or M column
The right hand margin will be set to "column". To remove the right
hand margin enter a column value of zero. The margin column is
displayed on the status line in the form "M col".
Commands 21
(C) Copyright IBM Corporation 1987, 1992
The margin is used by the word-spill features: as words are typed
across the margin column they are automatically spilled onto the
next line. It is also used by the ADJUST LINE keyboard function
(see "3.3 Word Processing" on page 9).
1.10 NAME
NAME <name>
or N <name>
The current document will be renamed to "name".
1.11 PRINT
PRINT <device>
The current document will be printed. It is printed to the named
"device", if one is specified, otherwise the device PRN is used.
1.12 PUT
PUT filename
The currently marked lines will be written to the file
"filename". Any former contents of the file are lost.
Note: The marked lines can be printed using the command PUT
PRN.
1.13 QUIT
QUIT
or Q
The current document will be removed from the edit ring. It will
not be saved to disk. If any changes have been made, since the
document was last saved, the message "Throw away changes? (y/n)" is
displayed; hit either Y or N as appropriate.
1.14 SAVE
SAVE <filename>
or S <filename>
The current document will be saved to disk. If a
"filename" is given the document will be saved under this name,
otherwise the name shown on the status line will be used.
Commands 22
(C) Copyright IBM Corporation 1987, 1992
1.15 VERSION
VER
The T name and version number will be displayed.
Commands 23
(C) Copyright IBM Corporation 1987, 1992
2.0 KEYBOARD FUNCTIONS
This section describes each of the keyboard functionsthat are
available to the editor. Keyboard functions are invoked by
pressing the key to which they have been assigned. This assignment
is made in a custom definition file using entries of the form:
KEY key = function
or DEF key = function
The descriptions which follow include the default key to which the
function is assigned.
2.1 ADJUST LINE
Default key: Alt-A
Adjusts the current line to the right hand margin setting. If the
line extends beyond the margin it is split; if it does not reach
the margin it is filled with words from the next line. If a split
occurs and the special setting AUTOMATIC INDENT is ON (see "3.0
Settings" on page 33), the split-off portion will align under the
first non-blank character of the previous line.
ADJUST LINE will ignore blank lines and, when a line is split, the
cursor will move to the split-off portion. This makes it
particularly simple to re-adjust a paragraph after making changes
or altering the right margin.
2.2 BACKSPACE
Default key: Backspace
Deletes the character to the left of the cursor, and moves the
cursor one character to the left.
2.3 BACKTAB
Default key: Shift-Tab
Moves the cursor left to the previous tab stop. Tab stops are
defined by the special setting TAB SPACING (see "3.0 Settings" on
page 33).
2.4 BOTTOM OF FILE
Default key: Ctrl-End
Makes the current line the last line in the document, and positions
this line at the bottom of the screen.
Keyboard Functions 24
(C) Copyright IBM Corporation 1987, 1992
2.5 BOTTOM OF MARK
Default key: Alt-E
Makes the current line the last marked line. If the marked lines
are in a different document that document will become the current
document.
2.6 BOTTOM OF SCREEN
Default key: Ctrl-PgDn
Moves the cursor to the last line of the document on the screen.
2.7 CLEAR MARK
Default key: Alt-U
Un-marks any marked lines.
2.8 COMMAND TOGGLE
Default key: Esc
Switches the cursor between the command line and the data area.
When the cursor is on the command line a shadow cursor marks the
current position in the data.
2.9 COPY MARK
Default key: Alt-C
Inserts a copy the marked lines following the current line. If
there are several documents in the edit ring this may be used to
copy lines from one document to another.
2.10 DELETE CHARACTER
Default key: Del
Deletes the character at the cursor.
2.11 DELETE LINE
Default key: Ctrl-Backspace
Deletes the current line.
Keyboard Functions 25
(C) Copyright IBM Corporation 1987, 1992
2.12 DELETE MARK
Default key: Alt-D
Deletes the marked lines.
2.13 DOWN
Default key: Down
Moves the cursor down one line.
2.14 EDIT
Default key: F8
Switches to the command line and keys in the command EDIT, ready
for you to enter a filename.
2.15 END OF LINE
Default key: End
Moves the cursor to the position one character after the last
character on the current line.
2.16 ESCAPE
Default key: Alt-X
This allows the entry of any ASCII character from the keyboard.
This is useful for entering, for example, printer control codes
into a document. The next character typed after the ESCAPE
function is entered directly into the document.
For example to enter an ASCII "Esc" character, press ESCAPE
followed by the Esc key, or to enter an ASCII 255, press
ESCAPE then press and hold the Alt key and type 2 5 5 on the
numeric keypad then release the Alt key.
Note: To enter an ASCII NUL (character code 0) use the Ctrl-2 key.
2.17 FILE
Default key: None
Writes the current document to disk using the name shown on the
status line, then removes the document from the edit ring.
Keyboard Functions 26
(C) Copyright IBM Corporation 1987, 1992
2.18 HELP
Default key: F1
Causes the command specified by the special setting HELP COMMAND
(see "3.0 Settings" on page 33) to be executed. Refer to "4.2 The
HELP and USER Functions" on page 16 for more details about using
the HELP function.
2.19 INSERT LINE
Default key: Ctrl-Enter
Inserts a new blank line following the current line. If the
special setting AUTOMATIC INDENT is ON the cursor will be aligned
under the first non-blank character of the preceding line.
2.20 INSERT TOGGLE
Default key: Ins
Toggles the editor between "insert" and "replace" modes. The shape
of the cursor and the Rep/Ins indicator on the status line show
which mode is active.
2.21 JOIN LINE
Default key: Alt-J
Joins together the current line and the following line. The lines
are joined with a single blank between them.
2.22 LEFT
Default key: Left
Moves the cursor one character to the left.
2.23 MARK LEFT
Default key: Alt-F7
The marked lines are shifted one character to the left. Any
characters moved to the left of column one are lost.
Keyboard Functions 27
(C) Copyright IBM Corporation 1987, 1992
2.24 MARK LINE
Default key: Alt-L
Marks one or more lines thus:
- If no lines are marked the current line only is marked.
- If one or more lines are already marked and the current line is
outside the mark, the mark is extended to include the current
line.
- If one or more lines are already marked and the current line is
inside the mark, the mark is shrunk so the current line becomes
the bottom of the mark.
2.25 MARK RIGHT
Default key: Alt-F8
The marked lines are shifted one character to the right. Any
characters moved to the right of column 255 are lost.
2.26 MOVE MARK
Default key: Alt-M
Moves the marked lines so they come after the current line. If
there are several documents in the edit ring this may be used to
move lines from one document to another.
2.27 NAME
Default key: F7
Switches to the command line and keys in the command NAME, ready
for you to enter a new document name.
2.28 NEW LINE
Default key: Enter
If in "insert" mode this will perform an INSERT LINEfunction, if in
"replace" mode it will perform a NEXT LINE function.
Keyboard Functions 28
(C) Copyright IBM Corporation 1987, 1992
2.29 NEXT FILE
Default key: F10
Makes the next document in the edit ring the current document.
2.30 NEXT LINE
Default key: None
Moves the cursor to the start of the next line in the document.
2.31 NEXT WORD
Default key: Ctrl-Right
Moves the cursor to the first character of the next word on the
line. A word is considered to be sequence of non-blank characters.
2.32 NOTHING
This function does nothing. It is used when customising the editor
to remove the default function from a key.
2.33 PAGE DOWN
Default key: PgDn
Scrolls the current document down by one screen-full.
2.34 PAGE UP
Default key: PgUp
Scrolls the current document up by one screen-full.
2.35 PREVIOUS FILE
Default keys: F11 and Alt-F10
Makes the previous document in the edit ring the current document.
2.36 PREVIOUS WORD
Default key: Ctrl-Left
Moves the cursor to the first character of the previous word on the
line. A word is considered to be sequence of non-blank characters.
Keyboard Functions 29
(C) Copyright IBM Corporation 1987, 1992
2.37 QUIT
Default key: F3
Removes the current document from the edit ring. If changes have
been made to the document since it was last saved the message
"Throw away changes? (y/n)" is displayed; hit either Y or N as
appropriate.
2.38 REPEAT FIND
Default key: Alt-F
Repeats the last LOCATE command that was issued.
2.39 REPEAT LINE
Default key: Alt-R
Inserts a copy of the current line immediately following the
current line.
2.40 RIGHT
Default key: Right
Moves the cursor one character to the right.
2.41 SAFE FILE
Default key: F4
If the document has changed this performs the FILEfunction, if the
document has not changed it performs a QUIT.
2.42 SAVE
Default key: F2
Writes the current document to disk under the name shown on the
status line.
2.43 SCROLL DOWN
Default key: Shift-F4
Scrolls the entire screen down by one line.
Keyboard Functions 30
(C) Copyright IBM Corporation 1987, 1992
2.44 SCROLL LEFT
Default key: Shift-F1
Scrolls the entire screen left by one character.
2.45 SCROLL RIGHT
Default key: Shift-F2
Scrolls the entire screen right by one character.
2.46 SCROLL UP
Default key: Shift-F3
Scrolls the entire screen up by one line.
2.47 SPLIT LINE
Default key: Alt-S
Splits the current line into two at the cursor position. If the
special setting AUTOMATIC INDENT is ON the split-off portion aligns
under the first non-blank character of the preceding line.
2.48 START OF LINE
Default key: Home
Moves the cursor to the beginning of the current line.
2.49 TAB
Default key: Tab
Moves the cursor right to the next tab stop. Tab stops are defined
by the special setting TAB SPACING (see "3.0 Settings" on page 33).
2.50 TOP OF FILE
Default key: Ctrl-Home
Makes the current line the first line in the document, and
positions this line at the top of the screen.
Keyboard Functions 31
(C) Copyright IBM Corporation 1987, 1992
2.51 TOP OF MARK
Default key: Alt-Y
Makes the current line the first marked line. If the marked lines
are in a different document that document will become the current
document.
2.52 TOP OF SCREEN
Default key: Ctrl-PgUp
Moves the cursor to the first line of the document on the screen.
2.53 TRUNCATE LINE
Default keys: Alt-T and Ctrl-Del
Deletes all the characters on the current line to the right of the
cursor.
2.54 UNDO
Default key: F9
Provides a very limited error recovery. Any changes made to the
current line since the last keyboard function was executed are
undone.
2.55 UP
Default key: Up
Moves the cursor up one line.
2.56 USER
Default key: F5
Causes the command specified by the special setting USER COMMAND
(see "3.0 Settings" on page 33) to be executed. Refer to "4.2 The
HELP and USER Functions" on page 16 for more information about the
USER function.
Keyboard Functions 32
(C) Copyright IBM Corporation 1987, 1992
3.0 SETTINGS
This section describes each of the special settings that may be
defined when customising the editor. These are entered in a custom
definition file using entries of the form:
SET item = value
3.1 AUTOMATIC INDENT
SET AUTOMATIC INDENT = ON
or SET AUTOMATIC INDENT = OFF
This defines what the cursor will do when a new line is inserted.
If it is set ON the cursor will be automatically indented so it
aligns under the first non-blank character of the preceding line.
If it is set OFF the cursor will always move the the left hand
edge.
The action of word-spill and the functions SPLIT LINE and ADJUST
LINE are also affected by this setting.
3.2 CGA SNOW
SET CGA SNOW = AUTOMATIC
or SET CGA SNOW = ON
or SET CGA SNOW = OFF
The old CGA card for the PC can produce "snow" on the display if
the display is updated at the wrong times. This can be eliminated
but at the expense of slowing down scrolling speed. When set to
AUTOMATIC T will look for the presence of the old CGA card and if
it finds one it will ensure the snow does not occur.
The test to detect the CGA may give incorrect results on some
machines (possibly on PCJrs or 3270PCs) and may be unnecessary on
some clone machines so the function can be explicitly set ON or
OFF.
This setting is irrelevant for all more recent display cards (EGAs,
VGAs, etc.) since these do not suffer from the "snow" problem.
3.3 COMMAND RECALL
SET COMMAND RECALL = number
This specifies how many previous command line commands will be kept
available for recall by the cursor up and cursor down keys. Any
number up to 255 may be kept; specifying zero disables the command
recall feature.
Settings 33
(C) Copyright IBM Corporation 1987, 1992
For example:
SET COMMAND RECALL = 10
3.4 COMMAND TOGGLE
SET COMMAND TOGGLE = DATA
or SET COMMAND TOGGLE = COMMAND
This determines whether, when a new document is loaded, the cursor
starts in the data area or on the command line.
3.5 EXACT MATCH
SET EXACT MATCH = ON
or SET EXACT MATCH = OFF
This determines whether, by default, LOCATE commands take account
of upper and lower case during searching. If set ON the search
must match exactly, if set OFF upper and lower case are considered
identical. The default can always be overridden with the locate
command options "e" or "c".
Note: Exact case match searches are very much faster and would be
preferable when searching large documents.
3.6 FINAL EOF
SET FINAL EOF = ON
or SET FINAL EOF = OFF
If set ON all files written to disk are terminated with a
hexadecimal 1A end-of-file character. If set OFF this character is
not written.
3.7 HELP COMMAND
SET HELP COMMAND = command
The "command" should be a enclosed in single or double quotes. It
is the T command that will be executed when the HELPkeyboard
function is pressed. Any valid T command can given.
For example:
SET HELP COMMAND = "T THELP.HLP"
Settings 34
(C) Copyright IBM Corporation 1987, 1992
3.8 HELP LINE
SET HELP LINE = text
The "text" should be enclosed in single or double quotes. It is
the text that will be displayed on the bottom line of the screen
when there are no messages.
For example:
SET HELP LINE = "F1=Help F2=Save F3=Quit"
3.9 INSERT TOGGLE
SET INSERT TOGGLE = REPLACE
or SET INSERT TOGGLE = INSERT
This determines whether T initially starts up in "insert" or
"replace" mode.
3.10 KEYBOARD
SET KEYBOARD = AUTOMATIC
or SET KEYBOARD = STANDARD
If set to AUTOMATIC T will test if an Enhanced Keyboard (with 12
F-keys) is installed and if it finds one it will automatically make
use of it.
If set to STANDARD T will assume the keyboard is an old style
keyboard (with 10 F-keys). This provides compatibility with some
clone BIOSs and with some older TSR programs, but loses the ability
to use the newer keys like F11 and F12. See "4.3 The Enhanced
Keyboard" on page 17 for more details.
3.11 MARGIN
SET MARGIN = column
or SET MARGIN = OFF
This sets an initial right hand margin column. See "3.3 Word
Processing" on page 9 for details about the function of the margin.
3.12 TAB EXPAND
SET TAB EXPAND = ON
or SET TAB EXPAND = OFF
This setting determines how T will treat tab characters in
documents that are read from disk. If set ON tabs will be expanded
Settings 35
(C) Copyright IBM Corporation 1987, 1992
with spaces up to the next tab stop (as determined by the TAB
SPACING setting). If set OFF tabs are treated just like any other
character.
Note: If set ON the tabs are expanded to spaces as the document is
loaded from disk and are then discarded. If the document is saved
it will not contain the original tab characters.
3.13 TAB SPACING
SET TAB SPACING = number
Tabs are equally spaced across the document starting from column 1.
The spacing is set with this option.
For example:
SET TAB SPACING = 8
3.14 USER COMMAND
SET USER COMMAND = command
The "command" should be enclosed in single or double quotes. It is
the T command that will be executed when the USERkeyboard function
is pressed. Any valid T command can given.
For example:
SET USER COMMAND = "DOS"
Settings 36
(C) Copyright IBM Corporation 1987, 1992
APPENDIX A. MESSAGES
This section provides a list of all the messages that T produces.
It gives the reasons for each message and the action that should be
taken.
Except where noted these messages will all be displayed in the
editor's message line and will be removed at the next keystroke.
Cannot open file
T is unable to open the requested disk file. Normally this means
that the filename is invalid for some reason, perhaps it contains
characters not valid in a file name, or perhaps it conflicts with
the name of a device or directory already on the disk.
On a diskette system it may also indicate that the diskette drive
is not ready, perhaps it does not contain a diskette or the drive
door is open.
Cannot invoke DOS
The DOS command was unable to start up a secondary DOS or OS/2
command processor. Normally this indicates that there is not
enough free memory, you will have to remove some documents from the
ring if you want to issue the DOS command.
If you believe there is enough free memory and the problem still
exists it may be that DOS cannot locate the command processor.
From the DOS prompt issue the command SET; you should see a series
of lines one of which is of this form indicating where your copy of
COMMAND.COM is located:
COMSPEC=d:\path\COMMAND.COM
If this is not present you may need to add a SET
COMSPEC=xxxxxx line to your AUTOEXEC.BAT file.
Disk error - file NOT saved
An error occurred while a document was being written to disk.
Normally this means the disk became full while the file was being
written. You should save the file to another disk, one that has
enough free space.
Error reading file
An error occurred while a document was being read from disk. This
is rare error and might indicate there are problems with the disk.
File not found
You attempted to GET a file that does not exist. Check the
spelling of the filename, maybe the file you want is not in the
current directory and so needs a drive and/or directory path
Appendix A. Messages 37
(C) Copyright IBM Corporation 1987, 1992
pre-pended to it.
Line(s) split
The file you attempted to load has lines longer than 255
characters. T cannot handle lines longer than 255 characters and
so has to split them. Normally this indicates you have attempted
to edit a file that is not a text file, perhaps it is a program or
data file in some internal format. Files of this sort should not
be edited with T - you should QUIT straight away, without saving.
Loading...
Displays while a document is being loaded from disk.
Mark already set
You tried to mark a line, but a mark already exists in another
document in the ring, only one document at a time may contain a
mark. If you no longer require the other mark first press the
CLEAR MARK function.
New file
You asked to edit a document that does not exist on disk. T has
created a new empty document.
No filename given
The commands GET, PUT and APPEND must have a filename parameter
specified.
No marked block
The commands PUT and APPEND work on the currently marked lines.
Some lines must be marked if the command is used.
No match found
The "target" specified in a LOCATE or CHANGE command cannot be
found. Remember that these commands only search from the current
position forwards to the end of the document. To search from the
top first press the TOP OF FILE function.
No room to join
A JOIN function cannot work if the resulting line would be longer
than 255 characters. This message can also occur when using the
ADJUST LINEfunction, which internally makes a call to JOIN.
Not enough memory for T
This message is printed by DOS if, when T is first loaded, there is
not enough free memory get it started. This can happen if you have
a lot of TSR type programs loaded or if you are nested inside
Appendix A. Messages 38
(C) Copyright IBM Corporation 1987, 1992
several other applications.
Out of memory
T has run out of memory, you should save one or more of the
documents in the ring to make space before continuing. Most
T commands and functions have no effect while the "Out of
memory" condition exists.
Press any key to continue
This message is printed by the secondary DOS or OS/2 command shell
started by the DOS command. It is produced just before the command
shell returns to T, and allows you some time to read whatever
output is on the screen.
Printer not ready
The PRINT command could not complete correctly. This may mean the
printer is not turned on or set online, or it is not connected, or
that it has run out of paper. Or any number of other reasons that
cause printers to fail.
Printing...
Displays while a document is being printed.
Saving...
Displays while a document is being saved.
Source & destination conflict
You cannot move or copy marked lines on top of themselves. Move
the cursor out of the marked area any try again.
T needs DOS v2.00 or later
This message is printed by DOS versions below 2.00 if an attempt is
made to run T, which requires at least DOS 2.00.
Throw away changes? (y/n)
You tried to QUIT a document that has been changed since it was
last saved. This message gives you a chance to save changes if the
QUIT was selected accidentally.
Type a character...
The ESCAPE function takes the next character entered on the
keyboard as an absolute ASCII code and enters it into the document.
While ESCAPE is waiting for this character it displays a message.
Unknown command
Appendix A. Messages 39
(C) Copyright IBM Corporation 1987, 1992
You entered a command on the command line that is not a T command.
Check the spelling of the command, or precede it by the word DOS
(or a full stop) if it is a DOS or OS/2 command rather than a
T command.
This message is also produced by the GOTO and MARGIN commands if
the parameter specified is not numeric.
Yes/No/Go/Last/Quit?
The CHANGE command issues this message when it finds its
"target" text. Refer to "1.2 CHANGE" on page 19 for details of the
CHANGE command.
Appendix A. Messages 40
(C) Copyright IBM Corporation 1987, 1992
APPENDIX B. USER DEFINABLE KEYS
This section lists all the valid names and combinations of the user
definable keys that can be entered in a custom definition file.
Keys marked with an asterisk (*) are only available with the
Enhanced Keyboard.
-------------------------------------------------------------------
Table 1. Unshifted Keys
Esc Enter Tab Backspace
F1 F2 F3 F4 F5
F6 F7 F8 F9 F10
F11(*) F12(*)
Home End PgUp PgDn
Left Right Up Down
Ins Del Pad5(*)
-------------------------------------------------------------------
-------------------------------------------------------------------
Table 2. Shift Keys
s-Tab
s-F1 s-F2 s-F3 s-F4 s-F5
s-F6 s-F7 s-F8 s-F9 s-F10
s-F11(*) s-F12(*)
-------------------------------------------------------------------
-------------------------------------------------------------------
Table 3. Ctrl Keys
c-Enter c-Tab(*) c-Backspace
c-a c-b c-c c-d c-e
c-f c-g c-h c-i c-j
c-k c-l c-m c-n c-o
c-p c-q c-r c-s c-t
c-u c-v c-w c-x c-y
c-z
c-2 c-6
c-F1 c-F2 c-F3 c-F4 c-F5
c-F6 c-F7 c-F8 c-F9 c-F10
c-F11(*) c-F12(*)
c-Home c-End c-PgUp c-PgDn
c-Left c-Right c-Up(*) c-Down(*)
c-Ins(*) c-Del(*) c-Pad5(*)
c-- c-[ c-] c-\
-------------------------------------------------------------------
Appendix B. User Definable Keys 41
(C) Copyright IBM Corporation 1987, 1992
-------------------------------------------------------------------
Table 4. Alt Keys
a-Enter(*) a-Tab(*) a-Backspace(*)
a-a a-b a-c a-d a-e
a-f a-g a-h a-i a-j
a-k a-l a-m a-n a-o
a-p a-q a-r a-s a-t
a-u a-v a-w a-x a-y
a-z
a-1 a-2 a-3 a-4 a-5
a-6 a-7 a-8 a-9 a-0
a-F1 a-F2 a-F3 a-F4 a-F5
a-F6 a-F7 a-F8 a-F9 a-F10
a-F11(*) a-F12(*)
a-Home(*) a-End(*) a-PgUp(*) a-PgDn(*)
a-Left(*) a-Right(*) a-Up(*) a-Down(*)
a-Ins(*) a-Del(*)
a-- a-=
-------------------------------------------------------------------
Appendix B. User Definable Keys 42
===================================================================
===================================================================
(C) Copyright IBM Corporation 1987, 1992
Printed in the U.K.