home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / INFO / EDITOR / TDE120.ZIP / TDE.DOC < prev    next >
Encoding:
Text File  |  1991-10-05  |  24.3 KB  |  567 lines

  1.  
  2.                           tde, the Thomson-Davis Editor
  3.                                   Version 1.2
  4.                                     10-5-91
  5.                                   Frank Davis
  6.  
  7.  
  8. Usage:
  9.  
  10.    At the command line type:
  11.  
  12.         tde [file name]
  13.  
  14.    For example:
  15.  
  16.         tde
  17.         tde foo.bar
  18.         tde c:\c60\tde\main.c
  19.  
  20.    If you don't enter a file name at the command line, tde will prompt you for
  21.    a file name.  If the file does not exist, tde starts out with an empty file
  22.    with the file name you just entered.
  23.  
  24.    tde will handle files as large 475k.  If you try to edit a file larger
  25.    than 475k, only the first portion of the file is loaded into tde.
  26.  
  27.  
  28. Editor fields and information lines:
  29.  
  30.  
  31.                                Sample tde screen
  32.  
  33.  
  34.          ┌─── File number - each window opened to same file has same number
  35.          │ ┌─── Window letter
  36.          │ │
  37.          │ │    ┌─── Dirty file indicater - asterisk
  38.          │ │    │ ┌─── File name
  39.          │ │    │ │                         ┌──── Total number of lines in file
  40.          │ │    │ │                         │                  ┌─── line:column
  41.                                                           
  42.       ┌──────────────────────────────────────────────────────────────┐
  43.       │    The first line on the screen contains file information    │
  44.       ├──────────────────────────────────────────────────────────────┤
  45.       │                                                              │
  46.       │                                                              │
  47.       │                          File area                           │
  48.       │                                                              │
  49.       │                                                              │
  50.       │                                                              │
  51.       ├──────────────────────────────────────────────────────────────┤
  52.       │                 Editor modes and information                 │
  53.       └──────────────────────────────────────────────────────────────┘
  54.                                                                Insert
  55.          │    │        │          │         │         │            └─ Overwrite
  56.          │    │        │          │         │         └──── Stream delete?
  57.          │    │        │          │         └───── Ignore / Match search case?
  58.          │    │        │          └───── Indent mode?
  59.          │    │        └───── Available memory for editing files
  60.          │    └───── Total number of windows, including hidden windows
  61.          └───── Total number of open files
  62.  
  63.  
  64.  
  65. Multiple keys:
  66.  
  67.    I use the following abbreviated key definitions throughout this file:
  68.  
  69.                 ^ = Control       # = Shift       @ = Alt
  70.  
  71.    For example, ^F5 means press and hold the Control key and then press F5 while
  72.    holding down the Control key.  You will have two keys depressed together at
  73.    the same time.  The function assigned to that key combination will be
  74.    executed as soon as the second key is pressed.  You may release the keys
  75.    in any order you choose.
  76.  
  77.  
  78. Cursor movement:
  79.  
  80.                             101 Keyboard overview
  81.  
  82.             Cursor keys                               Keypad keys
  83.         ┌─────┬─────┬─────┐                ┌───────┬───────┬───────┬───────┐
  84.         │ Ins │Home │PgUp │                │NumLock│Grey / │Grey * │Grey - │
  85.         ├─────┼─────┼─────┤                ├───────┼───────┼───────┼───────┤
  86.         │ Del │ End │PgDn │                │ Home  │  Up   │ Pg Up │ Grey  │
  87.         └─────┴─────┴─────┘                ├───────┼───────┼───────┤   +   │
  88.                                            │ Left  │Center │ Right │       │
  89.               ┌─────┐                      ├───────┼───────┼───────┼───────┤
  90.               │ Up  │                      │  End  │ Down  │ Pg Dn │ Grey  │
  91.         ┌─────┼─────┼─────┐                ├───────┴───────┼───────┤       │
  92.         │Left │Down │Right│                │     Ins       │  Del  │ Enter │
  93.         └─────┴─────┴─────┘                └───────────────┴───────┴───────┘
  94.  
  95.                                                           
  96.     If you like using these grey                   With Num Lock off,
  97.      cursor keys, these function               you can probably guess most
  98.       assignments are for you.                of these function assignments.
  99.  
  100.           Grey cursor keys                            Keypad keys
  101.  
  102.  Up    - move cursor up                     Home   - toggle col 1 & beg of line
  103.  Down  - move cursor down                  ^Home   - first line in window
  104.  Left  - move cursor left                   Pg Up  - page up
  105.  Right - move cursor right                 ^Pg Up  - first screen in file
  106. ^Up    - scroll screen up                   Center - move to center of window
  107. ^Down  - scroll screen down                ^Center - line to center of window
  108. ^Left  - cursor to previous word            End    - last character in line
  109. ^Right - cursor to next word               ^End    - last line in window
  110. @Up    - fixed cursor, text scroll up       Pg Dn  - page down
  111. @Down  - fixed cursor, text scroll down    ^Pg Dn  - last screen in file
  112. @Left  - horizontal page left               Ins    - toggle insert mode
  113. @Right - horizontal page right              Del    - delete character
  114.                                            ^Del    - toggle stream delete mode
  115.                                            Grey - - scroll screen up
  116.                                             Grey + - scroll screen down
  117.  Note:  The Alt+Cursor keys are not        ^Grey - - fixed scroll screen up
  118.  available on 83/84 key keyboards.         ^Grey + - fixed scroll screen down
  119.  Pressing the Alt + a number key on          Enter  - Insert line and move down
  120.  the keypad generates a character code     #Enter  - 1st char in next line
  121.  and not a cursor movement command.        ^Enter  - column 1 in next line
  122.  
  123.  
  124.  
  125. Function Keys:
  126.  
  127.    I tried to use some logical order when I assigned functions to the function
  128.    keys.   I use a 101 keyboard most of the time, so it should be easy to see
  129.    the logical function grouping with it.  The function keys on a 101 keyboard
  130.    are placed along the top of the keyboard.  Functions are arranged as follows:
  131.  
  132.         Help    File                Find  &               Window
  133.               Functions          Search/Replace          Commands
  134.          F1  F2  F3  F4          F5  F6  F7  F8          F9  F10  F11  F12
  135.  
  136.  
  137.    F1 = Instantaneous Help
  138.  
  139.                                 File Functions
  140.  
  141.    F2 = Save file
  142.         Saves all changes made to file.  Existing file is overwritten by the
  143.         new file.  It does not prompt for a new file name - automatically
  144.         assumes you want to overwrite the old file.  There is no way to get
  145.         back the contents of the original file if you use this function.
  146.  
  147.    F3 = Quit file
  148.         Abandons any changes made in the file and closes or kicks the file out
  149.         of the current window.  If you are editing multiple files or have
  150.         multiple windows, tde searches for any invisible files to display in the
  151.         current window.  If no invisible windows are found, tde combines
  152.         windows.  If this is the only file being edited, F3 quits tde.  If you
  153.         made any changes to the file, it asks you if you want to abandon them.
  154.         You can create an invisible window when you load in a file over the
  155.         current file.  Nothing happens to the invisible file or window - you
  156.         just can't see it.
  157.  
  158.    F4 = File (save and quit)
  159.         This function is a combination of Save and Quit (F2 & F3 above).
  160.  
  161.    #F2 = Save as
  162.         If you don't want to overwrite the original file but you want to save
  163.         the contents of the current file, you can save the file under a
  164.         different file name.  This function prompts you for a file name to save
  165.         the changes (you can press escape to abort).
  166.  
  167.    #F4 = Edit new file
  168.         To bring another file into the editor, use this function.  It loads the
  169.         file into the current window and previous window becomes invisible.  You
  170.         can even load several copies of the same file.  I like this because I
  171.         often need to refer back to the original unchanged file.  Each time you
  172.         load a file, it is treated as a different file.  Be careful when you
  173.         have several copies of one file open (don't forget which version of the
  174.         file you want to keep - if worse comes to worse you always quit).
  175.  
  176.  
  177.                            Find and Search/Replace
  178.  
  179.    ^F5 = Toggle search case
  180.         Most of the time I don't care about matching the case of the search
  181.         pattern.  The default in tde is to ignore search case.  If you want to
  182.         consider the search case, press this key to toggle the case flag.  The
  183.         state of the flag is displayed, in English, in the lite bar at the
  184.         bottom of the screen.  You can toggle the case of the search flag at
  185.         any time, even after you define the search pattern.
  186.  
  187.    #F5 = find forward
  188.         To define the search pattern, use this function.  It prompts you for
  189.         the search pattern.  The pattern is defined (even across files) until
  190.         changed.   If the pattern is not found, an information message is
  191.         displayed at the bottom of the current window.  You can abort by
  192.         pressing the Escape key.
  193.  
  194.    #F6 = find backward
  195.         Same as find forward except search backward in file.
  196.  
  197.    F5 = Repeat find forward
  198.         Once the search pattern has been defined (Shift F5 or Shift F6), you can
  199.         press this key at any time in any file to find the next occurrence of
  200.         pattern.  I decided to use two sets of functions to perform searches.
  201.         Once I found a pattern, I might do some editing and then find the next
  202.         occurrence.  I hate to define the search pattern over and over or set
  203.         the search direction over and over.  This function does a wrap search -
  204.         when it reaches the eof it starts over at the beginning of the file.
  205.  
  206.    F6 = Repeat find backward
  207.         Like repeat find forward, you can press this key at anytime once the
  208.         search pattern has been defined.
  209.  
  210.    #F7 = Search/Replace forward
  211.         This function prompts you for the search pattern and the replacement
  212.         text.  If you want to match the search case, remember to toggle the
  213.         search flag (which can be done at any time).  You can either do prompt
  214.         or no prompt replacing.   Regardless of prompt or noprompt replacing,
  215.         this function actually moves the cursor to the pattern and displays it
  216.         on the screen and replaces the text.  If you are using tde on a slow
  217.         machine, you can see the search/replace taking place.  I implemented
  218.         the function this way because I just like to see what the search/replace
  219.         function is doing.
  220.  
  221.    #F8 = Search/Replace backward
  222.         Same as search/replace forward except backwards.
  223.  
  224.  
  225.                         Window Functions
  226.  
  227.    F9 = Split window
  228.         Splits the screen at the current cursor location.  The current file is
  229.         displayed in multiple windows.  Changes to a file are displayed in all
  230.         windows opened to the same copy of that file.  You can also see any
  231.         marked blocks in the same copy of the file in different windows.  There
  232.         has to be at least 1 text line in any window, so the number of windows
  233.         is limited by the display screen.  Displaying one line in a file is not
  234.         all that helpful but the ability to do so is there.
  235.  
  236.    #F9 = Resize window
  237.         Sometimes there is a need to concentrate on the contents of one window.
  238.         You can change the size of the current window by using this function.
  239.         Use the up and down arrow keys to adjust the current window to desired
  240.         size.  When you reach the desired size, press either the ESC key or the
  241.         Return key to make the change permanent (the message on the screen says
  242.         press ESC but either Return or ESC will do).  Changing the size of the
  243.         top window is not allowed.
  244.  
  245.    ^F9 = Zoom window
  246.         Makes the current window fill the whole screen.  If the current window
  247.         already fills the screen then nothing is done.  All windows on the
  248.         screen when the zoom command is executed are expanded to full size.
  249.         Additionally, all windows except the current window become invisible.
  250.  
  251.    F10 = Next window
  252.         If more than one window is displayed, you can press one key to move
  253.         to the next open window.
  254.  
  255.    #F10 = Previous window
  256.         Move to previous window - opposite of next window.
  257.  
  258.    ^F10 = Next Hidden Window
  259.         Displays "hidden" or "invisible" windows in the same place as the
  260.         current window.  The current window then becomes invisible.
  261.  
  262.  
  263. Block Commands:
  264.  
  265.    Block operations can be done within or between files.  If you mark a block
  266.    in one file, just move the cursor to the desired location in the same or
  267.    other file and do the block operation.  Operations on line blocks that move
  268.    text are carried out on the line immediately below the cursor.  Operations
  269.    on box blocks that move text begin at the column of the cursor.
  270.  
  271.    @B - Mark Box Block
  272.         This key is used to mark both the beginning and ending corner of a
  273.         box block.  Press @B to mark the beginning line/column.  Then, move
  274.         the cursor to the ending line/column and press @B again to define the
  275.         block.  You can move the cursor around and press @B to adjust to size
  276.         of the block as needed.
  277.  
  278.    @L - Mark Line Block
  279.         This key is similar to the operation of the box block, but entire
  280.         lines are marked.   You can't mix line and box blocks.  If a box
  281.         block was previously defined and you press @L, the editor defaults to
  282.         line blocks.  If a line block was defined and you press @B, the editor
  283.         still defaults to line blocks.
  284.  
  285.    @U - Unmark Block
  286.         If you make a booboo when marking blocks, press @U to unmark the block
  287.         and start over.  After certain block operations, the block may remain
  288.         marked - just press @U to unmark it.
  289.  
  290.    @G - Group Delete block
  291.         Sorta self explanatory.  This function deletes the text in the marked
  292.         block and unmarks the block.
  293.  
  294.    @M - Move block
  295.         Move the cursor to the desired location and press @M to move the marked
  296.         block.  In line mode, the text in the original block is deleted and then
  297.         inserted at the line immediately below the cursor.  In box mode, the
  298.         original block is inserted into the text beginning at the column of the
  299.         cursor and then the marked box block is deleted.  After block moves,
  300.         tde unmarks the block.  Moving blocks within themselves is not allowed.
  301.  
  302.    @C - Copy block
  303.         With line blocks, the block is copied to the line below the cursor.
  304.         With box blocks, the block is copied beginning at the column of the
  305.         cursor - everything to the right of the cursor is moved right to make
  306.         room for the box block.  Blocks may be copied within or between
  307.         files.  tde unmarks the block after the copy is complete.  If you try
  308.         to copy a line block within itself, the block copy starts at the first
  309.         line immediately after the marked block.
  310.  
  311.    @K - Kopy block
  312.         Same as copy block except block stays marked.
  313.  
  314.    @O - Overlay block
  315.         You can only overlay box blocks.  Move the cursor to the location
  316.         to begin the overlay and press @O.  The original block stays marked
  317.         after the operation.
  318.  
  319.    @F - Fill box block
  320.         Fills the marked box block with character.  tde prompts you for the
  321.         fill character.  Press Escape key to abort the command.  This function
  322.         is useful for filling in a column of periods for tables and such.
  323.  
  324.    @P - Print block
  325.         Prints the block to the PRN device.  I haven't tried redirecting the
  326.         PRN, but it should work.  This function prompts for block or file
  327.         printing.  Press ESC to abort.  Once the printing starts, press ESC
  328.         to stop.  The block remains marked after the block is printed.
  329.  
  330.    @W - Write block to file
  331.         Writes the marked block to a file.  tde prompts for the file name.  If
  332.         the file exist, it deletes all contents of the existing file and
  333.         replaces it with the marked block.  Press ESC to abort.  Once the
  334.         writing starts, there is no safe way to stop it.  The block remains
  335.         marked after the block is written to a file.
  336.  
  337.    @E - Block expand tabs
  338.         Expands the tabs in the marked block, either line or box block, using
  339.         the current tab setting.  The default tab setting is 8.  You can change
  340.         the tab setting at any time by pressing @T.  The block remains marked
  341.         after the block is expanded.
  342.  
  343.  
  344. Other keys:
  345.  
  346.    Enter
  347.         Insert a newline at the cursor.  If the cursor is in the middle of
  348.         a line, the line is split at the cursor.   The cursor moves to the
  349.         next line.  Indentation is matched if the editor is in the Indent mode.
  350.  
  351.    #Enter
  352.         Move the cursor down a line.  The cursor is placed on the first
  353.         non-blank character in the next line.  No lines are added to the file.
  354.  
  355.    ^Enter
  356.         Move the cursor down a line.  The cursor is placed on column 1
  357.         in the next line.  No lines are added to the file.
  358.  
  359.    Up (arrow)
  360.         Move cursor up a line if this is not the first line in a file and do
  361.         appropriate vertical scrolling.
  362.  
  363.    Down (arrow)
  364.         Move cursor down a line if this is not the last line in a file and do
  365.         appropriate vertical scrolling.
  366.  
  367.    Left (arrow)
  368.         Move cursor left one column if this is not column 0 and do appropriate
  369.         horizontal scrolling.
  370.  
  371.    Right (arrow)
  372.         Move cursor right one column up to column 255 and do appropriate
  373.         horizontal scrolling.
  374.  
  375.    Home
  376.         Move cursor to first non-blank character in the current line else move
  377.         to column zero.  Scroll to left as needed.  Press Home to toggle
  378.         between the first non-blank character and column zero.
  379.  
  380.    End
  381.         Move cursor to 1st column past the last character in the current line
  382.         else move to column zero.  Scroll to right as needed.
  383.  
  384.    Page Up
  385.         Move cursor up one page if this is not first page in file.
  386.  
  387.    Page Down
  388.         Move cursor down one page if this is not last page in file.
  389.  
  390.    ^Right
  391.         Move cursor one word right.
  392.  
  393.    ^Left
  394.         Move cursor one word left.
  395.  
  396.    ^Home
  397.         Move cursor to first line on screen.
  398.  
  399.    ^End
  400.         Move cursor to last line on screen.  If end of file occurs before last
  401.         line of file, move cursor to last line in file.
  402.  
  403.    ^Page Up
  404.         Move cursor to first page in file.
  405.  
  406.    ^Page Down
  407.         Move cursor to last page in file.
  408.  
  409.    @Z - zip to line
  410.         Move to line number.  tde prompts for line number.  Press Escape to
  411.         abort.
  412.  
  413.    Center
  414.         The cursor is moved to the center of the current window.
  415.  
  416.   ^Center
  417.         The line the cursor is on is moved to the center of the current window.
  418.  
  419.    ^Up
  420.         Scroll window up 1 line with cursor staying on same line in file.
  421.  
  422.    ^Down
  423.         Scroll window down 1 line with cursor staying on same line in file.
  424.  
  425.    Grey - on key pad
  426.         Scroll window up 1 line with cursor staying on same line in file.
  427.  
  428.    Grey + on key pad
  429.         Scroll window down 1 line with cursor staying on same line in file.
  430.  
  431.   @Grey Up (not the arrow on the keypad) or
  432.   ^Grey -  (grey - on keypad)
  433.         Fixed scroll window up 1 line with cursor staying on same line on the
  434.         screen as the file scrolls up.
  435.  
  436.   @Grey Down (not the arrow on the keypad)
  437.   ^Grey +  (grey + on keypad)
  438.         Fixed scroll window down 1 line with cursor staying on same line on the
  439.         screen as the file scrolls down.
  440.  
  441.   @Grey Left
  442.         Horizontal page left.
  443.  
  444.   @Grey Right
  445.         Horizontal page right.
  446.  
  447.    ESC - undo line
  448.         Get back the original unchanged line.  When cursor is moved off a line,
  449.         all changes to the file are made and there is no way to get back the
  450.         contents of a line.
  451.  
  452.    Del
  453.         Delete the character, if any, under the cursor.
  454.  
  455.    ^Del
  456.         Toggle the delete stream mode.  In stream mode, pressing the Del key
  457.         will delete the characters in the file as if they were a stream.
  458.         Lines will be joined at the cursor and eventually every character in
  459.         the file may be deleted.  In line mode, only the characters on a
  460.         line may be deleted.
  461.  
  462.    Backspace
  463.         Delete the character to the left of the cursor and move left.  If the
  464.         cursor is on the first column of a line, the current line is joined
  465.         with the line above.  If in indent mode and the cursor is on the first
  466.         non-blank character, tde matches the indentation of the previous
  467.         line(s).
  468.  
  469.    Tab
  470.         If in insert mode, insert the appropriate number of spaces for a tab
  471.         and move the cursor left.  If in overwrite mode, just move the cursor
  472.         left w/o inserting text.
  473.  
  474.    Ins
  475.         Toggle between insert and overwrite mode.  In insert mode, the cursor
  476.         is normal size and an "i" is displayed at bottom right of screen.  In
  477.         overwrite mode, the cursor is 3-4 times normal size and an "o" is
  478.         displayed at bottom right of screen.
  479.  
  480.    @I
  481.         Toggle between indent and no indent mode.  In indent mode, tde searches
  482.         for the first non-blank character on previous lines and places the
  483.         cursor on that column when a carriage return is pressed.  When
  484.         backspacing in indent mode, tde lines up the indentation with the first
  485.         non-blank character of the previous line(s).
  486.  
  487.    @=
  488.         Duplicates the current line.  Duplicating the last (NULL) line in a
  489.         file is not allowed.  The cursor stays on the current line and the
  490.         duplicated line is inserted after the current line.
  491.  
  492.    @-
  493.         Deletes the text from the cursor to the end of line.
  494.  
  495.    ^Y
  496.         Deletes current line, cursor does not move.
  497.  
  498.    @D
  499.         Deletes current line, cursor does not move (exactly same as ^Y).
  500.  
  501.    @Y  or  ^U
  502.         Undelete the most recently deleted line.  The undelete buffer has
  503.         room for 12 lines.  If more than 12 lines are deleted, the oldest line
  504.         is pushed out and the new one is added.  You may press @Y repeatedly
  505.         to undelete all the lines in the buffer.
  506.  
  507.         Deleted lines from line delete, delete to end of line, word delete,
  508.         join line, and backspace are stored in the undelete buffer.
  509.  
  510.    @A
  511.         Add a blank line below cursor.
  512.  
  513.    @S
  514.         Split line at column of cursor.  If in indent mode, the split line is
  515.         autoindented.
  516.  
  517.    @J
  518.         Join the current line with the line below.  The text from the cursor
  519.         to the end of the current line is deleted and the first character of
  520.         the line below becomes the new character under the cursor.
  521.  
  522.    @T
  523.         Set tabs.  tde prompts for new tab setting.  The default is 8.
  524.  
  525.    ^]
  526.         Paren Balance.  This function is really nice for C programmers because
  527.         it balances parenthesis, brackets, and braces.  If the character under
  528.         the cursor is a paren, bracket, or brace, tde searches either forward
  529.         or backward through the file for the balancing opposite.  The cursor
  530.         is moved to the balancing opposite if found.
  531.  
  532.  
  533. WordStar type commands:
  534.  
  535.    A limited number of WordStar type commands are implemented in tde.  I have
  536.    no plans whatsoever to implement any additional WordStar type commands.  This
  537.    implementation may not correspond exactly to the WordStar command convention.
  538.    WordStar is a trademark of WordStar International.
  539.  
  540.    ^A - word left
  541.    ^B - backspace
  542.    ^C - screen down
  543.    ^D - character right
  544.    ^E - line up
  545.    ^F - word right
  546.    ^G - delete character
  547.    ^H - backspace
  548.    ^I - tab
  549.    ^J - help
  550.    ^K - n/a
  551.    ^L - n/a
  552.    ^M - return (carriage control, enter)
  553.    ^N - add line below cursor
  554.    ^O - n/a
  555.    ^P - n/a
  556.    ^Q - n/a
  557.    ^R - page up
  558.    ^S - character left
  559.    ^T - word delete
  560.    ^U - undelete line
  561.    ^V - toggle insert mode
  562.    ^W - scroll up line
  563.    ^X - line down
  564.    ^Y - delete line
  565.    ^Z - scroll line down
  566.    ^\ - redraw screen
  567.