----------------------- T/S EDIT Command Reference ----------------------- MODES Command Mode (initial mode at startup) Edit Mode (to enter text, ESCAPE returns to command mode) Misc Commands (colon functions, file I/O, display controls) CHAPTER 1 - T/S EDIT Startup In OS-9: tsedit filename(s) to edit (optional) filename(s) TSPARS file sets startup parameters (see ch.10) In BASIC: RUN "TSEDIT" specify filename(s) after startup TSEDIT.BAS file also sets startup parameters (see ch.10) CHAPTER 2 - Cursor Movement h, LF-ARROW - left one character j, DN-ARROW - down one line k, UP-ARROW - up one line l, RT-ARROW - right one character (or use SPACE) 0, SHIFT-LF-ARR - move to beginning of current line $, SHIFT-RT-ARR - move to end of current line SHIFT-DN-ARROW - move down one screen SHIFT-UP-ARROW - move up one screen g - move to beginning of file G - move to end of file w - move to next 'word' b - move backward one 'word' e - move to end of next 'word' NOTE: 'word' is any alphanumeric OR punctuation char sequence. eg: abc456 and .,=-#!: are words, foo.bar is three words W - move to next 'WORD' B - move backward one 'WORD' E - move to end of next 'WORD' NOTE: 'WORD' is any non-whitespace char sequence, where "whitespace" refers to spaces, tabs and newlines. (formfeeds too?) eg: foo.bar counts as a single WORD. % - move to matching parenthesis/bracket/brace () [] {} /xxx - search for next occurrence of xxx pattern (see chapter 8) CHAPTER 3 - Inserting Text (edit mode) i - insert text at current cursor position I - insert text at beginning of current line a - append text after current cursor position A - append text to end of current line o - open a new line after current line O - open a new line before current line Press BREAK (unshifted) to stop text entry and return to command mode. CHAPTER 4 - Deleting Text x - delete single character at cursor position X - delete character before cursor dd - delete entire current line dtx - delete text from current location to character 'x' D - delete remainder of DISPLAY line (ie: NOT to next newline) dw - delete alphanumeric/punctuation word dW - delete whitespace-delimited WORD #x - delete # (1-9) characters at cursor position #dd - delete # (1-9) consecutive lines #dw - delete # (1-9) an/p words #dW - delete # (1-9) WORDs dm - delete marked block of text (see chapter 9) CHAPTER 5 - Changing Text rx - replace single character at cursor with character 'x' R - replace existing text until BREAK is pressed NOTE: the remaining change commands act like "delete-then-insert" and use the same syntax as the corresponding delete commands. ctx - change existing text up to character 'x'. BREAK to stop C - change remainder of DISPLAY line text. BREAK to stop cc - change entire current line. BREAK to stop cw - change current alphanumeric/punctuation word. BREAK to stop cW - change current whitespace-delimiteded WORD. BREAK to stop #cc - change # (1-9) lines. BREAK to stop #cw - change # (1-9) consecutive words. BREAK to stop #cW - change # (1-9) consecutive WORDs. BREAK to stop cm - change marked block (see chapter 9) BREAK to stop CHAPTER 6 - "Yanking" Text The "yank" commands are used to copy text without affecting the original text. A yank stores a copy of text in a temporary buffer until a "put" command (see chapter 8) is used to write it elsewhere. Yank commands use the same syntax as the delete and change commands. yw - yank an alphanumeric/punctuation word yW - yank a whitespace-delimited WORD yy - yank entire line ytx - yank to character 'x' Y - yank remainder of line #yw - yank # (1-9) alphanumeric/punctuation words #yW - yank # (1-9) whitespace-delimited WORDs #yy - yank # (1-9) lines CHAPTER 7 - File Control and Disk I/O :w - write edit buffer to current file :w file - write edit buffer to specified file :q - quit editor, optionally save changes :$ cmd - (OS9 only) start a subshell, exit returns to editor :n - edit next file (if multiple filenames were specified) :e file - edit specified file :r file - read specified file into current location :f - show current filename :f name - change current filename to "name" :p - print edit buffer TBD- how-2 handle printer offline/gone... RSBASIC: press SHIFT-BREAK to regain control OS-9: sorry, charlie! no can do - OS waits for you to fix printer (you *DID* save it first, right?) CHAPTER 8 - Special Commands u - undo the last edit change (but ONLY the last) repeated 'u' commands toggle the last change on and off . - repeat the last single-letter edit command /xxx - find next occurrence of text pattern 'xxx' /xxx/yyy - replace next occurrence of 'xxx' with 'yyy' /xxx/yyy/g - replace all occurrences of 'xxx' with 'yyy' NOTE: use '\' in text string to include a slash, backslash or carriage return in the search string. example 1: /foo\/bar searches for the string "foo/bar" exanple 2: /:/\ENTER/g replaces all colons with carriage returns n - repeat last search or search-and-replace p - put yank buffer after current location/current line P - put yank buffer before current location/current line TBD: yank buf only holds LAST yank/delete text, put it or lose it ~ - toggle case of current character (CTRL-3) J - join next line to current line CTRL-0 - toggle UPPERCASE/lowercase SHIFT key behavior ? - show current text size and free buffer space >> - shift current line right one tabstop << - shift current line left one tabstop CHAPTER 9 - Marking Areas of Text mb - mark beginning of text block me - mark end of text block mm - move marked block to current location mP - copy marked block to current location cm - change marked block (delete then insert new text) dm - delete marked block CHAPTER 10 - Resetting User Parameters T - Text mode (word wrap enabled, visible CR) L - Program mode (word wrap off, invisible CR) vc - cycle foreground/background colors v# - set new display mode (0-9) as follows v0: 32x16 VDG screen v1: 32x16 VDG screen w/80-column horizontal scroll v2: 32x16 graphic screen (PMODE 4 equivalent) v3: 32x16 graphic screen w/80-column horizontal scroll v4: 40x24 graphic screen v5: 50x24 graphic screen v6: 60x24 graphic screen v7: 60x32 graphic screen v8: 80x24 graphic screen (unreadable, use for page layout) v9: 80x32 graphic screen (unreadable, use for page layout) RSBASIC - edit the TSEDIT/BAS startup program to change defaults. Color Mode Line 210 VM=0 (0=B/w, 1=W/b, 2=B/g, 3=G/b) Dsiplay Mode Line 340 DM=4 (0-9, same as v# cmd) Slift Lock Line 400 SH=1 (0=upper/lowercase, 1=capitals only) Edit Mode Line 460 EM=0 (0=Program mode, 1=Text mode) Tab Mode Line 510 TM=1 (0=insert tabs, 1=insert spaces) Tab Width Line 580 TB=4 (1,2,4 or 8 space tab stops) Printer Speed Line 630 BD=600 (set BD to your printer's baudrate) NOTE: The baudrate poke formula in line 730 is inaccurate. Change it to: Line 730 POKE 150,INT(55930/BD-4.5) OS-9 - edit the /dd/TSPARS file to set initial parameters. 24014 ||||+-- Tab Width (0,1,2,4,8) |||+--- Tab Mode (0=tabs, 1=spaces) ||+---- Edit Mode (0=Program, 1=Text) |+----- Display Mode (0 thru 9) +------ Screen Color (0-3: B/G, G/B, B/W, W/B) APPENDIX - Keyboard Codes same keyboard mapping as CoCo OS-9. ASCII codes 1D,1E,1F,7F are missing. NOTE: CTRL key is [CLEAR] on the CoCo keyboard. The DISK BASIC version's built-in I/O routines do NOT recognize the CoCo-3 CONTROL and ALT keys. The OS-9 version uses OS-9's unified I/O system instead and sees whatever the system supplies. The CONTROL and ALT keys work under OS-9 L2. (I think.) Under OS9L2, I only use the "vi-patched" version in an 80-column window.