home *** CD-ROM | disk | FTP | other *** search
-
- tde, the Thomson-Davis Editor
- Version 1.2
- 10-5-91
- Frank Davis
-
-
- Usage:
-
- At the command line type:
-
- tde [file name]
-
- For example:
-
- tde
- tde foo.bar
- tde c:\c60\tde\main.c
-
- If you don't enter a file name at the command line, tde will prompt you for
- a file name. If the file does not exist, tde starts out with an empty file
- with the file name you just entered.
-
- tde will handle files as large 475k. If you try to edit a file larger
- than 475k, only the first portion of the file is loaded into tde.
-
-
- Editor fields and information lines:
-
-
- Sample tde screen
-
-
- ┌─── File number - each window opened to same file has same number
- │ ┌─── Window letter
- │ │
- │ │ ┌─── Dirty file indicater - asterisk
- │ │ │ ┌─── File name
- │ │ │ │ ┌──── Total number of lines in file
- │ │ │ │ │ ┌─── line:column
-
- ┌──────────────────────────────────────────────────────────────┐
- │ The first line on the screen contains file information │
- ├──────────────────────────────────────────────────────────────┤
- │ │
- │ │
- │ File area │
- │ │
- │ │
- │ │
- ├──────────────────────────────────────────────────────────────┤
- │ Editor modes and information │
- └──────────────────────────────────────────────────────────────┘
- Insert
- │ │ │ │ │ │ └─ Overwrite
- │ │ │ │ │ └──── Stream delete?
- │ │ │ │ └───── Ignore / Match search case?
- │ │ │ └───── Indent mode?
- │ │ └───── Available memory for editing files
- │ └───── Total number of windows, including hidden windows
- └───── Total number of open files
-
-
-
- Multiple keys:
-
- I use the following abbreviated key definitions throughout this file:
-
- ^ = Control # = Shift @ = Alt
-
- For example, ^F5 means press and hold the Control key and then press F5 while
- holding down the Control key. You will have two keys depressed together at
- the same time. The function assigned to that key combination will be
- executed as soon as the second key is pressed. You may release the keys
- in any order you choose.
-
-
- Cursor movement:
-
- 101 Keyboard overview
-
- Cursor keys Keypad keys
- ┌─────┬─────┬─────┐ ┌───────┬───────┬───────┬───────┐
- │ Ins │Home │PgUp │ │NumLock│Grey / │Grey * │Grey - │
- ├─────┼─────┼─────┤ ├───────┼───────┼───────┼───────┤
- │ Del │ End │PgDn │ │ Home │ Up │ Pg Up │ Grey │
- └─────┴─────┴─────┘ ├───────┼───────┼───────┤ + │
- │ Left │Center │ Right │ │
- ┌─────┐ ├───────┼───────┼───────┼───────┤
- │ Up │ │ End │ Down │ Pg Dn │ Grey │
- ┌─────┼─────┼─────┐ ├───────┴───────┼───────┤ │
- │Left │Down │Right│ │ Ins │ Del │ Enter │
- └─────┴─────┴─────┘ └───────────────┴───────┴───────┘
-
-
- If you like using these grey With Num Lock off,
- cursor keys, these function you can probably guess most
- assignments are for you. of these function assignments.
-
- Grey cursor keys Keypad keys
-
- Up - move cursor up Home - toggle col 1 & beg of line
- Down - move cursor down ^Home - first line in window
- Left - move cursor left Pg Up - page up
- Right - move cursor right ^Pg Up - first screen in file
- ^Up - scroll screen up Center - move to center of window
- ^Down - scroll screen down ^Center - line to center of window
- ^Left - cursor to previous word End - last character in line
- ^Right - cursor to next word ^End - last line in window
- @Up - fixed cursor, text scroll up Pg Dn - page down
- @Down - fixed cursor, text scroll down ^Pg Dn - last screen in file
- @Left - horizontal page left Ins - toggle insert mode
- @Right - horizontal page right Del - delete character
- ^Del - toggle stream delete mode
- Grey - - scroll screen up
- Grey + - scroll screen down
- Note: The Alt+Cursor keys are not ^Grey - - fixed scroll screen up
- available on 83/84 key keyboards. ^Grey + - fixed scroll screen down
- Pressing the Alt + a number key on Enter - Insert line and move down
- the keypad generates a character code #Enter - 1st char in next line
- and not a cursor movement command. ^Enter - column 1 in next line
-
-
-
- Function Keys:
-
- I tried to use some logical order when I assigned functions to the function
- keys. I use a 101 keyboard most of the time, so it should be easy to see
- the logical function grouping with it. The function keys on a 101 keyboard
- are placed along the top of the keyboard. Functions are arranged as follows:
-
- Help File Find & Window
- Functions Search/Replace Commands
- F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12
-
-
- F1 = Instantaneous Help
-
- File Functions
-
- F2 = Save file
- Saves all changes made to file. Existing file is overwritten by the
- new file. It does not prompt for a new file name - automatically
- assumes you want to overwrite the old file. There is no way to get
- back the contents of the original file if you use this function.
-
- F3 = Quit file
- Abandons any changes made in the file and closes or kicks the file out
- of the current window. If you are editing multiple files or have
- multiple windows, tde searches for any invisible files to display in the
- current window. If no invisible windows are found, tde combines
- windows. If this is the only file being edited, F3 quits tde. If you
- made any changes to the file, it asks you if you want to abandon them.
- You can create an invisible window when you load in a file over the
- current file. Nothing happens to the invisible file or window - you
- just can't see it.
-
- F4 = File (save and quit)
- This function is a combination of Save and Quit (F2 & F3 above).
-
- #F2 = Save as
- If you don't want to overwrite the original file but you want to save
- the contents of the current file, you can save the file under a
- different file name. This function prompts you for a file name to save
- the changes (you can press escape to abort).
-
- #F4 = Edit new file
- To bring another file into the editor, use this function. It loads the
- file into the current window and previous window becomes invisible. You
- can even load several copies of the same file. I like this because I
- often need to refer back to the original unchanged file. Each time you
- load a file, it is treated as a different file. Be careful when you
- have several copies of one file open (don't forget which version of the
- file you want to keep - if worse comes to worse you always quit).
-
-
- Find and Search/Replace
-
- ^F5 = Toggle search case
- Most of the time I don't care about matching the case of the search
- pattern. The default in tde is to ignore search case. If you want to
- consider the search case, press this key to toggle the case flag. The
- state of the flag is displayed, in English, in the lite bar at the
- bottom of the screen. You can toggle the case of the search flag at
- any time, even after you define the search pattern.
-
- #F5 = find forward
- To define the search pattern, use this function. It prompts you for
- the search pattern. The pattern is defined (even across files) until
- changed. If the pattern is not found, an information message is
- displayed at the bottom of the current window. You can abort by
- pressing the Escape key.
-
- #F6 = find backward
- Same as find forward except search backward in file.
-
- F5 = Repeat find forward
- Once the search pattern has been defined (Shift F5 or Shift F6), you can
- press this key at any time in any file to find the next occurrence of
- pattern. I decided to use two sets of functions to perform searches.
- Once I found a pattern, I might do some editing and then find the next
- occurrence. I hate to define the search pattern over and over or set
- the search direction over and over. This function does a wrap search -
- when it reaches the eof it starts over at the beginning of the file.
-
- F6 = Repeat find backward
- Like repeat find forward, you can press this key at anytime once the
- search pattern has been defined.
-
- #F7 = Search/Replace forward
- This function prompts you for the search pattern and the replacement
- text. If you want to match the search case, remember to toggle the
- search flag (which can be done at any time). You can either do prompt
- or no prompt replacing. Regardless of prompt or noprompt replacing,
- this function actually moves the cursor to the pattern and displays it
- on the screen and replaces the text. If you are using tde on a slow
- machine, you can see the search/replace taking place. I implemented
- the function this way because I just like to see what the search/replace
- function is doing.
-
- #F8 = Search/Replace backward
- Same as search/replace forward except backwards.
-
-
- Window Functions
-
- F9 = Split window
- Splits the screen at the current cursor location. The current file is
- displayed in multiple windows. Changes to a file are displayed in all
- windows opened to the same copy of that file. You can also see any
- marked blocks in the same copy of the file in different windows. There
- has to be at least 1 text line in any window, so the number of windows
- is limited by the display screen. Displaying one line in a file is not
- all that helpful but the ability to do so is there.
-
- #F9 = Resize window
- Sometimes there is a need to concentrate on the contents of one window.
- You can change the size of the current window by using this function.
- Use the up and down arrow keys to adjust the current window to desired
- size. When you reach the desired size, press either the ESC key or the
- Return key to make the change permanent (the message on the screen says
- press ESC but either Return or ESC will do). Changing the size of the
- top window is not allowed.
-
- ^F9 = Zoom window
- Makes the current window fill the whole screen. If the current window
- already fills the screen then nothing is done. All windows on the
- screen when the zoom command is executed are expanded to full size.
- Additionally, all windows except the current window become invisible.
-
- F10 = Next window
- If more than one window is displayed, you can press one key to move
- to the next open window.
-
- #F10 = Previous window
- Move to previous window - opposite of next window.
-
- ^F10 = Next Hidden Window
- Displays "hidden" or "invisible" windows in the same place as the
- current window. The current window then becomes invisible.
-
-
- Block Commands:
-
- Block operations can be done within or between files. If you mark a block
- in one file, just move the cursor to the desired location in the same or
- other file and do the block operation. Operations on line blocks that move
- text are carried out on the line immediately below the cursor. Operations
- on box blocks that move text begin at the column of the cursor.
-
- @B - Mark Box Block
- This key is used to mark both the beginning and ending corner of a
- box block. Press @B to mark the beginning line/column. Then, move
- the cursor to the ending line/column and press @B again to define the
- block. You can move the cursor around and press @B to adjust to size
- of the block as needed.
-
- @L - Mark Line Block
- This key is similar to the operation of the box block, but entire
- lines are marked. You can't mix line and box blocks. If a box
- block was previously defined and you press @L, the editor defaults to
- line blocks. If a line block was defined and you press @B, the editor
- still defaults to line blocks.
-
- @U - Unmark Block
- If you make a booboo when marking blocks, press @U to unmark the block
- and start over. After certain block operations, the block may remain
- marked - just press @U to unmark it.
-
- @G - Group Delete block
- Sorta self explanatory. This function deletes the text in the marked
- block and unmarks the block.
-
- @M - Move block
- Move the cursor to the desired location and press @M to move the marked
- block. In line mode, the text in the original block is deleted and then
- inserted at the line immediately below the cursor. In box mode, the
- original block is inserted into the text beginning at the column of the
- cursor and then the marked box block is deleted. After block moves,
- tde unmarks the block. Moving blocks within themselves is not allowed.
-
- @C - Copy block
- With line blocks, the block is copied to the line below the cursor.
- With box blocks, the block is copied beginning at the column of the
- cursor - everything to the right of the cursor is moved right to make
- room for the box block. Blocks may be copied within or between
- files. tde unmarks the block after the copy is complete. If you try
- to copy a line block within itself, the block copy starts at the first
- line immediately after the marked block.
-
- @K - Kopy block
- Same as copy block except block stays marked.
-
- @O - Overlay block
- You can only overlay box blocks. Move the cursor to the location
- to begin the overlay and press @O. The original block stays marked
- after the operation.
-
- @F - Fill box block
- Fills the marked box block with character. tde prompts you for the
- fill character. Press Escape key to abort the command. This function
- is useful for filling in a column of periods for tables and such.
-
- @P - Print block
- Prints the block to the PRN device. I haven't tried redirecting the
- PRN, but it should work. This function prompts for block or file
- printing. Press ESC to abort. Once the printing starts, press ESC
- to stop. The block remains marked after the block is printed.
-
- @W - Write block to file
- Writes the marked block to a file. tde prompts for the file name. If
- the file exist, it deletes all contents of the existing file and
- replaces it with the marked block. Press ESC to abort. Once the
- writing starts, there is no safe way to stop it. The block remains
- marked after the block is written to a file.
-
- @E - Block expand tabs
- Expands the tabs in the marked block, either line or box block, using
- the current tab setting. The default tab setting is 8. You can change
- the tab setting at any time by pressing @T. The block remains marked
- after the block is expanded.
-
-
- Other keys:
-
- Enter
- Insert a newline at the cursor. If the cursor is in the middle of
- a line, the line is split at the cursor. The cursor moves to the
- next line. Indentation is matched if the editor is in the Indent mode.
-
- #Enter
- Move the cursor down a line. The cursor is placed on the first
- non-blank character in the next line. No lines are added to the file.
-
- ^Enter
- Move the cursor down a line. The cursor is placed on column 1
- in the next line. No lines are added to the file.
-
- Up (arrow)
- Move cursor up a line if this is not the first line in a file and do
- appropriate vertical scrolling.
-
- Down (arrow)
- Move cursor down a line if this is not the last line in a file and do
- appropriate vertical scrolling.
-
- Left (arrow)
- Move cursor left one column if this is not column 0 and do appropriate
- horizontal scrolling.
-
- Right (arrow)
- Move cursor right one column up to column 255 and do appropriate
- horizontal scrolling.
-
- Home
- Move cursor to first non-blank character in the current line else move
- to column zero. Scroll to left as needed. Press Home to toggle
- between the first non-blank character and column zero.
-
- End
- Move cursor to 1st column past the last character in the current line
- else move to column zero. Scroll to right as needed.
-
- Page Up
- Move cursor up one page if this is not first page in file.
-
- Page Down
- Move cursor down one page if this is not last page in file.
-
- ^Right
- Move cursor one word right.
-
- ^Left
- Move cursor one word left.
-
- ^Home
- Move cursor to first line on screen.
-
- ^End
- Move cursor to last line on screen. If end of file occurs before last
- line of file, move cursor to last line in file.
-
- ^Page Up
- Move cursor to first page in file.
-
- ^Page Down
- Move cursor to last page in file.
-
- @Z - zip to line
- Move to line number. tde prompts for line number. Press Escape to
- abort.
-
- Center
- The cursor is moved to the center of the current window.
-
- ^Center
- The line the cursor is on is moved to the center of the current window.
-
- ^Up
- Scroll window up 1 line with cursor staying on same line in file.
-
- ^Down
- Scroll window down 1 line with cursor staying on same line in file.
-
- Grey - on key pad
- Scroll window up 1 line with cursor staying on same line in file.
-
- Grey + on key pad
- Scroll window down 1 line with cursor staying on same line in file.
-
- @Grey Up (not the arrow on the keypad) or
- ^Grey - (grey - on keypad)
- Fixed scroll window up 1 line with cursor staying on same line on the
- screen as the file scrolls up.
-
- @Grey Down (not the arrow on the keypad)
- ^Grey + (grey + on keypad)
- Fixed scroll window down 1 line with cursor staying on same line on the
- screen as the file scrolls down.
-
- @Grey Left
- Horizontal page left.
-
- @Grey Right
- Horizontal page right.
-
- ESC - undo line
- Get back the original unchanged line. When cursor is moved off a line,
- all changes to the file are made and there is no way to get back the
- contents of a line.
-
- Del
- Delete the character, if any, under the cursor.
-
- ^Del
- Toggle the delete stream mode. In stream mode, pressing the Del key
- will delete the characters in the file as if they were a stream.
- Lines will be joined at the cursor and eventually every character in
- the file may be deleted. In line mode, only the characters on a
- line may be deleted.
-
- Backspace
- Delete the character to the left of the cursor and move left. If the
- cursor is on the first column of a line, the current line is joined
- with the line above. If in indent mode and the cursor is on the first
- non-blank character, tde matches the indentation of the previous
- line(s).
-
- Tab
- If in insert mode, insert the appropriate number of spaces for a tab
- and move the cursor left. If in overwrite mode, just move the cursor
- left w/o inserting text.
-
- Ins
- Toggle between insert and overwrite mode. In insert mode, the cursor
- is normal size and an "i" is displayed at bottom right of screen. In
- overwrite mode, the cursor is 3-4 times normal size and an "o" is
- displayed at bottom right of screen.
-
- @I
- Toggle between indent and no indent mode. In indent mode, tde searches
- for the first non-blank character on previous lines and places the
- cursor on that column when a carriage return is pressed. When
- backspacing in indent mode, tde lines up the indentation with the first
- non-blank character of the previous line(s).
-
- @=
- Duplicates the current line. Duplicating the last (NULL) line in a
- file is not allowed. The cursor stays on the current line and the
- duplicated line is inserted after the current line.
-
- @-
- Deletes the text from the cursor to the end of line.
-
- ^Y
- Deletes current line, cursor does not move.
-
- @D
- Deletes current line, cursor does not move (exactly same as ^Y).
-
- @Y or ^U
- Undelete the most recently deleted line. The undelete buffer has
- room for 12 lines. If more than 12 lines are deleted, the oldest line
- is pushed out and the new one is added. You may press @Y repeatedly
- to undelete all the lines in the buffer.
-
- Deleted lines from line delete, delete to end of line, word delete,
- join line, and backspace are stored in the undelete buffer.
-
- @A
- Add a blank line below cursor.
-
- @S
- Split line at column of cursor. If in indent mode, the split line is
- autoindented.
-
- @J
- Join the current line with the line below. The text from the cursor
- to the end of the current line is deleted and the first character of
- the line below becomes the new character under the cursor.
-
- @T
- Set tabs. tde prompts for new tab setting. The default is 8.
-
- ^]
- Paren Balance. This function is really nice for C programmers because
- it balances parenthesis, brackets, and braces. If the character under
- the cursor is a paren, bracket, or brace, tde searches either forward
- or backward through the file for the balancing opposite. The cursor
- is moved to the balancing opposite if found.
-
-
- WordStar type commands:
-
- A limited number of WordStar type commands are implemented in tde. I have
- no plans whatsoever to implement any additional WordStar type commands. This
- implementation may not correspond exactly to the WordStar command convention.
- WordStar is a trademark of WordStar International.
-
- ^A - word left
- ^B - backspace
- ^C - screen down
- ^D - character right
- ^E - line up
- ^F - word right
- ^G - delete character
- ^H - backspace
- ^I - tab
- ^J - help
- ^K - n/a
- ^L - n/a
- ^M - return (carriage control, enter)
- ^N - add line below cursor
- ^O - n/a
- ^P - n/a
- ^Q - n/a
- ^R - page up
- ^S - character left
- ^T - word delete
- ^U - undelete line
- ^V - toggle insert mode
- ^W - scroll up line
- ^X - line down
- ^Y - delete line
- ^Z - scroll line down
- ^\ - redraw screen