TDoc-v220-0 =================================================================== T A Tiny Editor Version 2.20 (C) Copyright IBM Corporation 1987, 1993 (C) Copyright IBM Corporation 1987, 1993 ------------------------------------------------------------------- Version 2.20, October 1993 This program was written by: Tim Baldwin IBM UK Laboratories Hursley Park Winchester Hampshire, SO21 2JN BALDWINT at WINVMB baldy@vnet.ibm.com (C) Copyright IBM Corporation 1987, 1993. All Rights Reserved. ------------------------------------------------------------------- Page i (C) Copyright IBM Corporation 1987, 1993 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. 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 ii (C) Copyright IBM Corporation 1987, 1993 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 . . . . . . . . . . . . . . . . . . . . . 5 2.1 Starting T . . . . . . . . . . . . . . . . . . . . . . . . 5 2.2 Screen Layout . . . . . . . . . . . . . . . . . . . . . . 5 2.3 The Help File . . . . . . . . . . . . . . . . . . . . . . 6 3.0 Editing . . . . . . . . . . . . . . . . . . . . . . . . . 7 3.1 Keyboard Functions . . . . . . . . . . . . . . . . . . . . 7 3.2 Simple Editing . . . . . . . . . . . . . . . . . . . . . . 7 3.2.1 The Command Line . . . . . . . . . . . . . . . . . . . 7 3.2.2 The Data Area . . . . . . . . . . . . . . . . . . . . 8 3.2.3 Marking and Copying Lines . . . . . . . . . . . . . . 8 3.2.4 Saving Documents . . . . . . . . . . . . . . . . . . . 9 3.2.5 Working On Several Documents . . . . . . . . . . . . . 9 3.3 Search and Replace . . . . . . . . . . . . . . . . . . . . 9 3.3.1 Searching . . . . . . . . . . . . . . . . . . . . . . 9 3.3.2 Replacing . . . . . . . . . . . . . . . . . . . . . . 10 3.4 Word Processing . . . . . . . . . . . . . . . . . . . . . 10 3.4.1 The Right Margin and Word Spill . . . . . . . . . . . 11 3.4.2 The ADJUST LINE Function . . . . . . . . . . . . . . 11 3.5 Drawing Boxes . . . . . . . . . . . . . . . . . . . . . . 12 3.6 Printing . . . . . . . . . . . . . . . . . . . . . . . . 12 3.6.1 Printer Control Codes . . . . . . . . . . . . . . . . 13 3.6.2 Printer Set Up . . . . . . . . . . . . . . . . . . . 13 4.0 Customising . . . . . . . . . . . . . . . . . . . . . . . 14 4.1 The Custom Definition File . . . . . . . . . . . . . . . 14 4.1.1 Colour and Mono Commands . . . . . . . . . . . . . . 15 4.1.2 Key Commands . . . . . . . . . . . . . . . . . . . . 17 4.1.3 Set Commands . . . . . . . . . . . . . . . . . . . . 18 4.2 The HELP and USER Functions . . . . . . . . . . . . . . . 18 4.3 The Enhanced Keyboard . . . . . . . . . . . . . . . . . . 19 Part 2. Editor Reference . . . . . . . . . . . . . . . . . . 20 1.0 Commands . . . . . . . . . . . . . . . . . . . . . . . . 21 1.1 APPEND . . . . . . . . . . . . . . . . . . . . . . . . . 21 1.2 CHANGE . . . . . . . . . . . . . . . . . . . . . . . . . 21 1.3 DOS . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 1.4 EDIT . . . . . . . . . . . . . . . . . . . . . . . . . . 22 1.5 FILE . . . . . . . . . . . . . . . . . . . . . . . . . . 22 1.6 GET . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 1.7 GOTO . . . . . . . . . . . . . . . . . . . . . . . . . . 23 1.8 LOCATE . . . . . . . . . . . . . . . . . . . . . . . . . 23 1.9 MARGIN . . . . . . . . . . . . . . . . . . . . . . . . . 23 1.10 NAME . . . . . . . . . . . . . . . . . . . . . . . . . . 24 1.11 PRINT . . . . . . . . . . . . . . . . . . . . . . . . . 24 Contents iii (C) Copyright IBM Corporation 1987, 1993 1.12 PUT . . . . . . . . . . . . . . . . . . . . . . . . . . 24 1.13 QUIT . . . . . . . . . . . . . . . . . . . . . . . . . . 24 1.14 SAVE . . . . . . . . . . . . . . . . . . . . . . . . . . 25 1.15 VERSION . . . . . . . . . . . . . . . . . . . . . . . . 25 2.0 Keyboard Functions . . . . . . . . . . . . . . . . . . . 26 2.1 ADJUST LINE . . . . . . . . . . . . . . . . . . . . . . . 26 2.2 BACKSPACE . . . . . . . . . . . . . . . . . . . . . . . . 26 2.3 CLEAR MARK . . . . . . . . . . . . . . . . . . . . . . . 26 2.4 COMMAND TOGGLE . . . . . . . . . . . . . . . . . . . . . 26 2.5 COPY MARK . . . . . . . . . . . . . . . . . . . . . . . . 27 2.6 DELETE CHARACTER . . . . . . . . . . . . . . . . . . . . 27 2.7 DELETE LINE . . . . . . . . . . . . . . . . . . . . . . . 27 2.8 DELETE MARK . . . . . . . . . . . . . . . . . . . . . . . 27 2.9 DOWN . . . . . . . . . . . . . . . . . . . . . . . . . . 27 2.10 EDIT . . . . . . . . . . . . . . . . . . . . . . . . . . 27 2.11 END OF FILE . . . . . . . . . . . . . . . . . . . . . . 27 2.12 END OF LINE . . . . . . . . . . . . . . . . . . . . . . 28 2.13 END OF MARK . . . . . . . . . . . . . . . . . . . . . . 28 2.14 END OF SCREEN . . . . . . . . . . . . . . . . . . . . . 28 2.15 ESCAPE . . . . . . . . . . . . . . . . . . . . . . . . . 28 2.16 FILE . . . . . . . . . . . . . . . . . . . . . . . . . . 28 2.17 FOCUS . . . . . . . . . . . . . . . . . . . . . . . . . 29 2.18 HELP . . . . . . . . . . . . . . . . . . . . . . . . . . 29 2.19 INSERT LINE . . . . . . . . . . . . . . . . . . . . . . 29 2.20 INSERT TOGGLE . . . . . . . . . . . . . . . . . . . . . 29 2.21 JOIN LINE . . . . . . . . . . . . . . . . . . . . . . . 29 2.22 LEFT . . . . . . . . . . . . . . . . . . . . . . . . . . 29 2.23 MARK LEFT . . . . . . . . . . . . . . . . . . . . . . . 30 2.24 MARK RIGHT . . . . . . . . . . . . . . . . . . . . . . . 30 2.25 MOVE MARK . . . . . . . . . . . . . . . . . . . . . . . 30 2.26 NAME . . . . . . . . . . . . . . . . . . . . . . . . . . 30 2.27 NEW LINE . . . . . . . . . . . . . . . . . . . . . . . . 30 2.28 NEXT FILE . . . . . . . . . . . . . . . . . . . . . . . 30 2.29 NEXT LINE . . . . . . . . . . . . . . . . . . . . . . . 31 2.30 NEXT TAB . . . . . . . . . . . . . . . . . . . . . . . . 31 2.31 NEXT WORD . . . . . . . . . . . . . . . . . . . . . . . 31 2.32 NOTHING . . . . . . . . . . . . . . . . . . . . . . . . 31 2.33 PAGE DOWN . . . . . . . . . . . . . . . . . . . . . . . 31 2.34 PAGE UP . . . . . . . . . . . . . . . . . . . . . . . . 31 2.35 PREVIOUS FILE . . . . . . . . . . . . . . . . . . . . . 31 2.36 PREVIOUS TAB . . . . . . . . . . . . . . . . . . . . . . 32 2.37 PREVIOUS WORD . . . . . . . . . . . . . . . . . . . . . 32 2.38 QUIT . . . . . . . . . . . . . . . . . . . . . . . . . . 32 2.39 REPEAT FIND . . . . . . . . . . . . . . . . . . . . . . 32 2.40 REPEAT LINE . . . . . . . . . . . . . . . . . . . . . . 32 2.41 RIGHT . . . . . . . . . . . . . . . . . . . . . . . . . 32 2.42 SAFE FILE . . . . . . . . . . . . . . . . . . . . . . . 32 2.43 SAVE . . . . . . . . . . . . . . . . . . . . . . . . . . 33 2.44 SCROLL DOWN . . . . . . . . . . . . . . . . . . . . . . 33 2.45 SCROLL LEFT . . . . . . . . . . . . . . . . . . . . . . 33 2.46 SCROLL RIGHT . . . . . . . . . . . . . . . . . . . . . . 33 2.47 SCROLL UP . . . . . . . . . . . . . . . . . . . . . . . 33 2.48 SET MARK . . . . . . . . . . . . . . . . . . . . . . . . 33 2.49 SPLIT LINE . . . . . . . . . . . . . . . . . . . . . . . 34 Contents iv (C) Copyright IBM Corporation 1987, 1993 2.50 START OF LINE . . . . . . . . . . . . . . . . . . . . . 34 2.51 TOP OF FILE . . . . . . . . . . . . . . . . . . . . . . 34 2.52 TOP OF MARK . . . . . . . . . . . . . . . . . . . . . . 34 2.53 TOP OF SCREEN . . . . . . . . . . . . . . . . . . . . . 34 2.54 TRUNCATE LINE . . . . . . . . . . . . . . . . . . . . . 34 2.55 UNDO . . . . . . . . . . . . . . . . . . . . . . . . . . 34 2.56 UP . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 2.57 USER . . . . . . . . . . . . . . . . . . . . . . . . . . 35 3.0 Settings . . . . . . . . . . . . . . . . . . . . . . . . 36 3.1 AUTOMATIC INDENT . . . . . . . . . . . . . . . . . . . . 36 3.2 CGA SNOW . . . . . . . . . . . . . . . . . . . . . . . . 36 3.3 COMMAND RECALL . . . . . . . . . . . . . . . . . . . . . 37 3.4 COMMAND TOGGLE . . . . . . . . . . . . . . . . . . . . . 37 3.5 EXACT MATCH . . . . . . . . . . . . . . . . . . . . . . . 37 3.6 FOCUS LINE . . . . . . . . . . . . . . . . . . . . . . . 37 3.7 HELP COMMAND . . . . . . . . . . . . . . . . . . . . . . 38 3.8 HELP LINE . . . . . . . . . . . . . . . . . . . . . . . . 38 3.9 INSERT CURSOR . . . . . . . . . . . . . . . . . . . . . . 38 3.10 INSERT TOGGLE . . . . . . . . . . . . . . . . . . . . . 38 3.11 KEYBOARD TYPE . . . . . . . . . . . . . . . . . . . . . 39 3.12 LINE END . . . . . . . . . . . . . . . . . . . . . . . . 39 3.13 REPLACE CURSOR . . . . . . . . . . . . . . . . . . . . . 39 3.14 RIGHT MARGIN . . . . . . . . . . . . . . . . . . . . . . 40 3.15 SEGMENT SIZE . . . . . . . . . . . . . . . . . . . . . . 40 3.16 TAB EXPAND . . . . . . . . . . . . . . . . . . . . . . . 40 3.17 TAB SPACING . . . . . . . . . . . . . . . . . . . . . . 40 3.18 USER COMMAND . . . . . . . . . . . . . . . . . . . . . . 41 Appendix A. Messages . . . . . . . . . . . . . . . . . . . . 42 Appendix B. User Definable Keys . . . . . . . . . . . . . . 46 Contents v (C) Copyright IBM Corporation 1987, 1993 Part 1. Using The Editor Part 1. Using The Editor 1 (C) Copyright IBM Corporation 1987, 1993 1.0 INTRODUCTION T is a full screen text editor for the IBM PC, PS/2 and compatible family of machines. Two versions of the editor are supplied, one to run under DOS and the other to run under OS/2. It is designed to be quick and easy to learn and simple to use, while remaining both extremely powerful and very small - the DOS version being under 10,000 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 base 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. - It can be placed on a diskette without consuming much space. This can be useful for those "emergency" diskettes used to boot up and fix a system when all else fails. - It can be placed on a RAM disk without consuming much space. This can be useful for palmtop type machines which often have no disk drives at all. 1.1 FEATURES AND OMISSIONS T has the following main features: - Very small size, under 10,000 bytes. - Fast, easy to use, full screen interface that adapts automatically to use the full size of the display. - Edits very large files, subject to available memory. - Edits very long lines, up to 65,528 characters. - Edits any number of files at once, subject to available memory. - On screen help Introduction 2 (C) Copyright IBM Corporation 1987, 1993 - Very fast search and replace functions. - Customisable keyboard mapping and screen colours. - Any DOS or OS/2 command may be run without leaving the editor. - A "right hand margin" and "word-spill" to allow some simple word processing to be performed. - Native DOS and OS/2 versions, which also run under Windows and Windows/NT. - OS/2 version has full support for the HPFS. To keep T small it necessarily lacks some of the more advanced features of larger editors and word processors. In particular: - Copying and moving data can only be performed on blocks of one or more whole lines. - Word processing capabilities are very limited. - No programmability, although the appearance and function may be customised. - No direct support for the mouse or a menu system. 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 and both the DOS and OS/2 versions may be run under Windows/NT. When used with OS/2 or with appropriate versions of Windows it may be run from both full screen and windowed command prompts, or may be started by placing an object in one of the OS/2 folders or Windows Program Manager groups. T is available inside IBM by requesting the T PACKAGE from PCTOOLS. This version is for "IBM Internal Use Only" and may not be distributed outside the company. T is also made freely available outside IBM through the Employee Written Software programme. The file TINYED.ZIP can be obtained through CompuServe, from many BBS systems and via anonymous FTP from a number of sites (e.g. software.watson.ibm.com). The ZIP file should be unpacked with PKUNZIP to create the full package. The T package contains: T.EXE This is the DOS version of the editor program. Introduction 3 (C) Copyright IBM Corporation 1987, 1993 T2.EXE This is the OS/2 version of the editor program. TKEY.EXE This is the customiser program. It will run under both DOS and OS/2 and will customise either version of the editor. THELP.HLP This is a simple help file for the standard editor configuration. TKEYS.DEF This is a sample custom definition file that describes the standard editor configuration. T.DOC This is the full documentation in a plain ASCII printable format. In addition the publicly available TINYED.ZIP package contains the following important file: LICENSE.TXT This contains the terms and conditions under which IBM makes the package available. Introduction 4 (C) Copyright IBM Corporation 1987, 1993 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 program file (T.EXE for 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 would 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 your 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 ... or T2 ... 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. If you are using the OS/2 HPFS and your file names include spaces you must specify the name inside double quotes, so T does not think it is two separate file names. 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 shows instead a single line of "help". Typically the functions assigned to the F-keys are displayed, but this can be customised to whatever you find useful. 2. The Status Line. Getting Started 5 (C) Copyright IBM Corporation 1987, 1993 Above the message line is the status line. This shows the name of the current document and the line and column number of the position 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. 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 modern displays can show more than 25 lines and many can show more than 80 columns. T itself cannot change the size of the display but it will use the full size of the screen that is available when it is started. So to see rather more data on the screen first switch to a mode that shows more than 25 lines then invoke T. For example, the following command will switch to a 43 line 80 column 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 6 (C) Copyright IBM Corporation 1987, 1993 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.4 Word Processing" on page 10 and "3.5 Drawing Boxes" on page 12 might be worthwhile. 3.1 KEYBOARD FUNCTIONS Most of the services that T can perform are accessed through keyboard functions. These functions are invoked by pressing the key or key combination to which the function is assigned. Many functions are assigned to obvious keys, for example the LEFT function (which moves the cursor one character to the left) is assigned to the cursor Left key, the RIGHT function (to move the cursor right) to the cursor Right key and so on. Other functions are assigned to key combinations that it is hoped provide some sort of mnemonic for the function concerned, so for example the REPEAT LINE function (to duplicate the current line) is assigned to Alt-R, the SPLIT LINE function (to split the current line) to Alt-S and so on. Full details of these keyboard functions and the keys to which they are assigned can be found in "2.0 Keyboard Functions" on page 26. 3.2 SIMPLE EDITING If T is started without any filename (by just entering T on the command line) it displays and edits a new, empty, unnamed document. A "Top of File" marker line indicates the top of the document and an "End of File" marker indicates the end. These marker lines are not part of the document and may not be edited, although the cursor may be moved onto them. 3.2.1 THE COMMAND LINE The cursor is initially placed 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 and it is executed when the Enter key is pressed. As a command is typed mistakes can be corrected using the functions LEFT, RIGHT and BACKSPACE (assigned to the cursor Left, cursor Right and the Backspace keys, respectively). 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 using the function INSERT TOGGLE (assigned to 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 Editing 7 (C) Copyright IBM Corporation 1987, 1993 again directly by pressing Enter or can be altered before being reused. 3.2.2 THE DATA AREA The cursor may be switched between the data area and the command line by using the function COMMAND TOGGLE (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 the function COMMAND TOGGLE is used. When the cursor is in the data area it may be moved anywhere between the "Top of File" and "End of File" marker lines. 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. To add a new line use the function INSERT LINE(Ctrl-Enter) and to delete a line use the function DELETE LINE (Ctrl-Backspace). Alternatively if the editor is in "insert" mode just pressing Enter will insert a new blank line (using the function NEW LINE). 3.2.3 MARKING AND COPYING LINES A block of one or more lines may be marked by pressing the function SET MARK (Alt-L) on the first and last lines of the required block. Marked blocks may be deleted using the function DELETE MARK (Alt-D) or they be moved or copied somewhere else. To move or copy a mark first position the cursor at the line above the desired new position, then use either the function MOVE MARK (Alt-M) or COPY MARK (Alt-C). Marked blocks are also useful for limiting the scope of a CHANGE or LOCATE command (described later). It is also possible to shift all marked lines one character to the left or right by using the functions MARK LEFT (Shift-F7) or MARK RIGHT (Shift-F8) respectively. This can be used to indent blocks of code when writing programs, for example. To duplicate a copy of the current line just use the function REPEAT LINE (Alt-R). 3.2.4 SAVING DOCUMENTS If a document has a name (displayed on the status line) it can be saved to disk simply by using the function SAVE (F2); once saved you may quit the document with the function QUIT (F3). Alternately you can perform a save and quit in one operation by using the function SAFE FILE (F4). If a document doesn't have a name you Editing 8 (C) Copyright IBM Corporation 1987, 1993 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: Using the function SAFE FILE (F4) will not cause the document 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.2.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 using the functions NEXT FILE (F10) or PREVIOUS FILE (F11). 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. The marked line functions MOVE MARK (Alt-M) and COPY MARK (Alt-C) are particularly useful when editing several documents as lines can be moved and copied to and from different documents. 3.3 SEARCH AND REPLACE 3.3.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". T will only search from the current position forwards, so to search from the top you first need to move to the top by using the function TOP OF FILE (Ctrl-Home). Having found a match you can repeat the search to find the next match simply by using the function REPEAT FIND (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" or even "Word". To do a case-insensitive search add the "c" option to the command, like this: Editing 9 (C) Copyright IBM Corporation 1987, 1993 /word/c 3.3.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 with the message "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 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.4 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.4.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 Editing 10 (C) Copyright IBM Corporation 1987, 1993 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.4.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 function ADJUST LINE (Alt-A) 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 to 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 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.5 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 Editing 11 (C) Copyright IBM Corporation 1987, 1993 So the Alt-7 key produces a top left box corner, the Alt-3 a bottom right and so on. Remember 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 14). 3.6 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 a LAN printer you may need to specify the printer device, 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 would use: PUT PRN 3.6.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. You will need to refer to your printer's documentation to determine exactly which control codes are available and what they do. Control codes can normally be entered directly using the keypad on the right of the keyboard: hold down the Alt key and type the decimal value of the required control code on the keypad then release the Alt key. The control code should appear at the cursor position, most control codes show up on the screen as odd little symbols. Some codes can also be entered using other keys, but these will require the use of the function ESCAPE (Alt-X). For example to enter a form feed (ASCII value 12) you can either use the keypad Editing 12 (C) Copyright IBM Corporation 1987, 1993 method described above (hold down Alt, key 1 2 on the keypad and release Alt), or press ESCAPE (Alt-X) followed by Ctrl-L ("L" being the 12th letter of the alphabet). 3.6.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 13 (C) Copyright IBM Corporation 1987, 1993 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 on the DOS or OS/2 command line: TKEY custom.DEF editor.EXE Replace "custom.DEF" with the name of your custom definition file and replace "editor.EXE" 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 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 editor's .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. Customising 14 (C) Copyright IBM Corporation 1987, 1993 Comments are ignored by the customiser program and serve to make the definition file more readable. Comments come in three 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 also ignored: blank lines, blank spaces, ON, OF, TO, IS, ; (semicolon) and = (equals sign).. 2. Colour and Mono Commands Colour and Mono commands define the colours used for the various parts of the screen on different types of display. 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 AND MONO COMMANDS COLOUR area = fgcol ON bgcol or COLOR area = fgcol ON bgcol or MONO area = style Colour and Mono commands define the colours that will be used for the various areas of the screen. Two forms of the command can be used, indicated by the keywords COLOUR (spelled COLOR if you prefer) or MONO. The COLOUR colours are used on colour screens and the MONO colours are used on monochrome screens or colour screens when in a black-and-white mode (this latter feature can be useful when a colour adapter is driving a monochrome screen, as is often the case with LCD portables). The following parameters should be provided: area is an area of the screen. It should be one of: DATA LINES MARK LINES Customising 15 (C) Copyright IBM Corporation 1987, 1993 SHOW LINES SHADOW CURSOR STATUS LINE HELP LINE MESSAGE LINE Most of these refer to the obvious screen items or areas. SHOW LINES refers to those lines displayed in the data area that are not a part of the actual document being edited (for example the "Top of File" marker line). attr is one or more attributes associated with the colour or style it precedes. It can be omitted if no attributes are required or specified as one or more of: BRIGHT or LIGHT BLINKING fgcol is the foreground colour for colour displays, specified as one of: BLACK BLUE GREEN TURQUOISE or CYAN RED PINK or MAGENTA BROWN WHITE GREY or GRAY YELLOW bgcol is the background colour for colour displays specified from the same choices as the foreground colours. Only the BRIGHT (or LIGHT) attribute may precede the background colour. style is the style of text used for monochrome displays specified as one of: NORMAL REVERSE UNDERLINE Note: Not all combinations of attributes and colours or styles are meaningful or useable on all systems, although the customiser program may accept them. In particular the BRIGHT attribute has no effect on the REVERSE style, the UNDERLINED style may not always be available, the colour YELLOW is the same as BRIGHT BROWN and the colour GREY is the same as BRIGHT BLACK. Also note that on some machines a BRIGHT background will actually produce a BLINKING foreground instead - bear this in mind if YELLOW (i.e. BRIGHT BROWN) or GREY (i.e. BRIGHT BLACK) are chosen as background colours. Customising 16 (C) Copyright IBM Corporation 1987, 1993 4.1.2 KEY COMMANDS KEY keyname = function or DEF keyname = function or KEY keyname = character or DEF 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 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 PADENTER 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 46 for a full list of combinations. function is one of the keyboard functions. The full list of keyboard functions is defined in "2.0 Keyboard Functions" on page 26. Customising 17 (C) Copyright IBM Corporation 1987, 1993 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. 4.1.3 SET COMMANDS SET item = value Set commands allow customising of the special editor settings. These are described in detail in "3.0 Settings" on page 36. 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 the HELP function 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 T command 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 function is then assigned the command "EDIT THELP.HLP". When the HELP keyboard function is pressed (i.e. F1 is pressed) T will execute the assigned 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 subdirectory on the C: drive: Customising 18 (C) Copyright IBM Corporation 1987, 1993 KEY F1 = HELP SET HELP COMMAND = "T C:\EDITORS\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: 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. 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 TYPE = STANDARD Customising 19 (C) Copyright IBM Corporation 1987, 1993 Part 2. Editor Reference Part 2. Editor Reference 20 (C) Copyright IBM Corporation 1987, 1993 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, uppercase letters are used for the command name and lowercase 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 lowercase. Where the parameters call for a filename any valid DOS or OS/2 file name may be used. This may include the drive letter and directory path if required; if none is given the current drive and directory will be used, following the normal conventions. 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 lowercase 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 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 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. Commands 21 (C) Copyright IBM Corporation 1987, 1993 The "/" character is a delimiter and 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 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 or . 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 or E or T 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 or F 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 22 (C) Copyright IBM Corporation 1987, 1993 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 and will be displayed on the focus 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 or /target The next occurrence of the text "target", starting from the current cursor position, will be located and displayed on the focus line. 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 EXACT MATCH setting is used. This may be customised - refer to "4.0 Customising" on page 14 for more details. 1.9 MARGIN MARGIN column or M column Commands 23 (C) Copyright IBM Corporation 1987, 1993 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 nnn". 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.4 Word Processing" on page 10). 1.10 NAME NAME or N The current document will be renamed to "name". 1.11 PRINT PRINT 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 If used without the "ALL" parameter 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. If the "ALL" parameter is specified all the current documents will be discarded without saving any changes and the editor will end and return to the operating system. This parameter should be used with care. Commands 24 (C) Copyright IBM Corporation 1987, 1993 1.14 SAVE SAVE or S 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. 1.15 VERSION VER The T name, version number and copyright notice will be displayed. Commands 25 (C) Copyright IBM Corporation 1987, 1993 2.0 KEYBOARD FUNCTIONS This section describes each of the keyboard functions that 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 36), 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 hand 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 CLEAR MARK Default key: Alt-U Un-marks any marked lines. 2.4 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. Keyboard Functions 26 (C) Copyright IBM Corporation 1987, 1993 2.5 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.6 DELETE CHARACTER Default key: Del Deletes the character at the cursor. 2.7 DELETE LINE Default key: Ctrl-Backspace Deletes the current line. 2.8 DELETE MARK Default key: Alt-D Deletes the marked lines. 2.9 DOWN Default key: Down Moves the cursor down one line. 2.10 EDIT Default key: F8 Switches to the command line and keys in the command EDIT, ready for you to enter a filename. 2.11 END 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 27 (C) Copyright IBM Corporation 1987, 1993 2.12 END OF LINE Default key: End Moves the cursor to the position one character after the last character on the current line. 2.13 END OF MARK Default key: Alt-E Makes the current line the last marked line, and positions this line on the focus line. If the marked lines are in a different document that document will become the current document. 2.14 END OF SCREEN Default key: Ctrl-PgDn Moves the cursor to the last line of the document on the screen. 2.15 ESCAPE Default key: Alt-X This allows the entry of ASCII characters using keys on the keyboard that would normally perform a function. Typically this is useful when entering printer control codes into a document. For example to enter the ASCII "Esc" character first use the ESCAPE function then press the Esc key. It is also possible to enter any ASCII character from 1 to 255 using the numeric keypad on the right of the keyboard. Press and hold the Alt key then type the decimal ASCII value on the keypad, release the Alt key and the character will appear. Using the keypad in this way does not require the ESCAPEfunction. Note: To enter an ASCII NUL (character code 0) use the Ctrl-2 key. 2.16 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 28 (C) Copyright IBM Corporation 1987, 1993 2.17 FOCUS Default key: F12 This places the current line onto the defined screen focus line. The focus line is defined by the special setting FOCUS LINE (see "3.0 Settings" on page 36). 2.18 HELP Default key: F1 Causes the command specified by the special setting HELP COMMAND (see "3.0 Settings" on page 36) to be executed. Refer to "4.2 The HELP and USER Functions" on page 18 for more details about using the HELP function. 2.19 INSERT LINE Default key: Ctrl-Enter and Ctrl-PadEnter 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. Keyboard Functions 29 (C) Copyright IBM Corporation 1987, 1993 2.23 MARK LEFT Default key: Shift-F7 The marked lines are shifted one character to the left. Only the characters to the right of the cursor position are shifted, so if you want to shift the whole line be sure to first position the cursor at the left hand edge. Any characters moved to the left of the cursor column are lost. 2.24 MARK RIGHT Default key: Shift-F8 The marked lines are shifted one character to the right. Only the characters to the right of the cursor position are shifted, so if you want to shift the whole line be sure to first position the cursor at the left hand edge. 2.25 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.26 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.27 NEW LINE Default key: Enter If in "insert" mode this will perform an INSERT LINE function, if in "replace" mode it will perform a NEXT LINE function. 2.28 NEXT FILE Default key: F10 Makes the next document in the edit ring the current document. Keyboard Functions 30 (C) Copyright IBM Corporation 1987, 1993 2.29 NEXT LINE Default key: PadEnter Moves the cursor to the start of the next line in the document. 2.30 NEXT 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 36). 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 Makes the previous document in the edit ring the current document. Keyboard Functions 31 (C) Copyright IBM Corporation 1987, 1993 2.36 PREVIOUS TAB 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 36). 2.37 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. 2.38 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.39 REPEAT FIND Default key: Alt-F Repeats the last LOCATE command that was issued. 2.40 REPEAT LINE Default key: Alt-R Inserts a copy of the current line immediately following the current line. 2.41 RIGHT Default key: Right Moves the cursor one character to the right. 2.42 SAFE FILE Default key: F4 If the document has changed this performs the FILEfunction, if the document has not changed it performs a QUIT. Keyboard Functions 32 (C) Copyright IBM Corporation 1987, 1993 2.43 SAVE Default key: F2 Writes the current document to disk under the name shown on the status line. 2.44 SCROLL DOWN Default key: Shift-F4 Scrolls the entire screen down by one line. 2.45 SCROLL LEFT Default key: Shift-F1 Scrolls the entire screen left by one character. 2.46 SCROLL RIGHT Default key: Shift-F2 Scrolls the entire screen right by one character. 2.47 SCROLL UP Default key: Shift-F3 Scrolls the entire screen up by one line. 2.48 SET MARK 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. Keyboard Functions 33 (C) Copyright IBM Corporation 1987, 1993 2.49 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.50 START OF LINE Default key: Home Moves the cursor to the beginning of the current line. 2.51 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. 2.52 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.53 TOP OF SCREEN Default key: Ctrl-PgUp Moves the cursor to the first line of the document on the screen. 2.54 TRUNCATE LINE Default keys: Alt-T Deletes all the characters on the current line to the right of the cursor. 2.55 UNDO Default key: F9 Provides a very limited error recovery. Any changes made to the current line are undone. Keyboard Functions 34 (C) Copyright IBM Corporation 1987, 1993 2.56 UP Default key: Up Moves the cursor up one line. 2.57 USER Default key: F5 Causes the command specified by the special setting USER COMMAND (see "3.0 Settings" on page 36) to be executed. Refer to "4.2 The HELP and USER Functions" on page 18 for more information about the USER function. Keyboard Functions 35 (C) Copyright IBM Corporation 1987, 1993 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 to 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 = 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 OFF T will look for the presence of the old CGA card and if it finds one it will ensure the snow does not occur. When set to ON T will not attempt to eliminate the snow. Some types of display may appear to T as the old CGA adapter when in fact they are not and so could never create the snow problem. This is true for PCJrs, 3270PCs, some clone displays and the LCD displays found on many older laptops. When using one of these displays setting CGA SNOW to ON may improve scrolling speed somewhat. This setting is ignored if a more recent display adapter (EGA, VGA, SVGA etc.) is installed, since these can never suffer from the "snow" problem. Settings 36 (C) Copyright IBM Corporation 1987, 1993 3.3 COMMAND RECALL SET COMMAND RECALL = ON or SET COMMAND RECALL = OFF This specifies whether or not previous command line commands will be kept available for recall by the cursor up and cursor down keys. If it is set ON command line commands are saved, if it is set OFF commands cannot be recalled. 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 FOCUS LINE SET FOCUS LINE = row or SET FOCUS LINE = -row or SET FOCUS LINE = OFF The FOCUS LINE is the line within the data area that is used to display the current line when the FOCUS keyboard function is used. It is also the line used to display the result of a LOCATE or GOTO command. The line may be specified as a positive number from the top of the screen or a negative number from the bottom of the screen. If set to OFF no focus row is defined. The FOCUS function will have no effect and the target of LOCATE and GOTO commands will be displayed on whatever line currently contains the cursor. Settings 37 (C) Copyright IBM Corporation 1987, 1993 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 HELP keyboard function is pressed. Any valid T command can be given. For example: SET HELP COMMAND = "T THELP.HLP" 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. Several "text" strings may be specified and they will concatenated together, this can be useful if you want to split the text over more than one line. For example: SET HELP LINE = "F1=Help F2=Save F3=Quit" 3.9 INSERT CURSOR SET INSERT CURSOR = LINE or SET INSERT CURSOR = HALF or SET INSERT CURSOR = FULL This sets the shape of the cursor that is used when T is in "insert" typing mode. LINE uses an underscore line cursor, HALF uses a half-height character block and FULL uses a full-height character block. 3.10 INSERT TOGGLE SET INSERT TOGGLE = REPLACE or SET INSERT TOGGLE = INSERT Settings 38 (C) Copyright IBM Corporation 1987, 1993 This determines whether T initially starts up in "insert" or "replace" mode. 3.11 KEYBOARD TYPE SET KEYBOARD TYPE = DEFAULT or SET KEYBOARD TYPE = STANDARD If set to DEFAULT T will test if an Enhanced Keyboard (with 12 F-keys across the top) is installed and if it finds one it will automatically make full use of it. If set to STANDARD T will assume the keyboard is an old style keyboard (with 10 F-keys over on the left). 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 19 for more details. 3.12 LINE END SET LINE END = DEFAULT or SET LINE END = DOS or SET LINE END = UNIX This determines how line ends will be interpreted when files are read from and written to disk. If set to DOS line ends are indicated by the pair of characters hex 0D (carriage return) followed by hex 0A (line feed), as is the standard for DOS applications. If set to UNIX lines ends are indicated by the single character hex 0A (new line), as is the standard for UNIX applications. When set to DEFAULT, T will read both DOS and UNIX style files and will always write DOS style files. 3.13 REPLACE CURSOR SET REPLACE CURSOR = LINE or SET REPLACE CURSOR = HALF or SET REPLACE CURSOR = FULL This sets the shape of the cursor that is used when T is in "replace" typing mode. LINE uses an underscore line cursor, HALF uses a half-height character block and FULL uses a full-height character block. Settings 39 (C) Copyright IBM Corporation 1987, 1993 3.14 RIGHT MARGIN SET RIGHT MARGIN = column or SET RIGHT MARGIN = OFF This sets an initial right hand margin column. See "3.4 Word Processing" on page 10 for details about the function of the margin. If set to OFF no initial margin is set. 3.15 SEGMENT SIZE SET SEGMENT SIZE = DEFAULT or SET SEGMENT SIZE = size This determines the size of the storage segments that T obtains from the operating system. It should be set to a number between 8 and 64 which specifies the segment size in K-bytes, or to DEFAULT which gives the best size for the operating system. In turn this segment size determines the maximum line length that can be handled; the maximum being a few bytes less than the segment size. In general DOS works best with smaller segment sizes and OS/2 works better with larger sizes. Setting DEFAULT will provide 8K segments under DOS and 64K under OS/2. 3.16 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 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.17 TAB SPACING SET TAB SPACING = number Tabs are equally spaced across the document starting from column 1. The spacing is set with this option. Settings 40 (C) Copyright IBM Corporation 1987, 1993 For example: SET TAB SPACING = 8 3.18 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 USER keyboard function is pressed. Any valid T command can given. For example: SET USER COMMAND = "DOS" Settings 41 (C) Copyright IBM Corporation 1987, 1993 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 call OS 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 its 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 or is incorrect you may need to add a SET COMSPEC= line to your AUTOEXEC.BAT file. 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. 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. Error writing 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. 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 Appendix A. Messages 42 (C) Copyright IBM Corporation 1987, 1993 current directory and so needs a drive and/or directory path pre-pended to it. Incorrect parameter The parameter supplied to a T command was incorrect. For the GOTO and MARGIN command the parameter must be a number less than 65535, for the QUIT command no parameter other than ALL is valid. Line too long This message indicates an attempt was made to load or to create a line longer than the maximum possible line length. If this happens while loading a file the load will be aborted, the document in memory will be incomplete so you should QUIT straight away without saving. Maximum line length is affected by the SEGMENT SIZE special setting - refer to "3.0 Settings" on page 36 for more details. 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 use the function CLEAR MARK. New file You asked to edit a document that does not exist on disk. T has created a new empty document with the name you specified. No filename given The commands GET, PUT and APPEND must have a filename parameter specified. No marked lines 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 use the function TOP OF FILE. Out of memory Appendix A. Messages 43 (C) Copyright IBM Corporation 1987, 1993 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 and destination conflict You cannot move or copy marked lines on top of themselves. Move the cursor out of the marked area and try again. T cannot be started 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 several other applications. 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 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 Appendix A. Messages 44 (C) Copyright IBM Corporation 1987, 1993 (or a full stop) if it is a DOS or OS/2 command rather than a T command. Yes/No/Go/Last/Quit? The CHANGE command issues this message when it finds its "target" text. Refer to "1.2 CHANGE" on page 21 for details of the CHANGE command. Appendix A. Messages 45 (C) Copyright IBM Corporation 1987, 1993 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 shown in parentheses are only available with the Enhanced Keyboard. ------------------------------------------------------------------- Table 1. Unshifted Keys Esc Enter Tab Backspace (PadEnter) 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-PadEnter) 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 46 (C) Copyright IBM Corporation 1987, 1993 ------------------------------------------------------------------- Table 4. Alt Keys (a-Enter) (a-Tab) (a-Backspace) (a-PadEnter) 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 47 =================================================================== =================================================================== (C) Copyright IBM Corporation 1987, 1993 Printed in the U.K.