home *** CD-ROM | disk | FTP | other *** search
/ ftp.barnyard.co.uk / 2015.02.ftp.barnyard.co.uk.tar / ftp.barnyard.co.uk / cpm / walnut-creek-CDROM / SIMTEL / EMACS / BIN / Z80EMACS.REF < prev    next >
Text File  |  2000-06-30  |  16KB  |  498 lines

  1. This file describes all the commands available in Z80EMACS and
  2. also tells what the default bindings are.
  3.  
  4. See "MAPKEYS.DOC" if you don't know what I mean by "bindings".
  5.  
  6. 111111111111111111111111111111111111111111111111111111111111
  7. 1                                                          1
  8. 1 ABOUT UECS                                               1
  9. 1                                                          1
  10. 111111111111111111111111111111111111111111111111111111111111
  11.  
  12. All the commands have funny names. The funny names are based 
  13. on the UECS, or Universal Editor Command Set.
  14.  
  15. The first part of each name classifies the command according to 
  16. "command-type", or category.
  17.  
  18. These are the categories used in Z80EMACS:
  19.  
  20. CI commands are "command input" commands. These commands make 
  21. your life easier when you are typing in editor commands.
  22.  
  23. DC commands are "display control" commands; you use them to control 
  24. what's on your screen.
  25.  
  26. EC commands are "editor command" commands; most commands are EC 
  27. commands.
  28.  
  29.  
  30. SC commands are "session control" commands. They are concerned with 
  31. managing the list of buffers.
  32.  
  33. UI commands are "user interface" commands.
  34.  
  35. BUGS:
  36.  
  37. The categorization of the commands is not perfect.
  38.  
  39. 222222222222222222222222222222222222222222222222222222222222
  40. 2                                                          2
  41. 2 COMMAND REFERENCE:                                       2
  42. 2                                                          2
  43. 222222222222222222222222222222222222222222222222222222222222
  44.  
  45. 11    CI-Abort-Cancel
  46.  
  47. This has a default binding of ^G, and can be rebound ( partially ).
  48.  
  49. Abort-Cancel beeps the terminal; if a keyboard macro is being 
  50. recorded, it gets stopped; everything goes back to normal.
  51.  
  52. On the message line ( when Z80EMACS asks you for a file ),
  53. Abort-Cancel aborts the command that asked; this usage of it can't
  54. be rebound.
  55.  
  56. 34    CI-Keyboard-Macro-Begin
  57.  
  58. Keyboard-Macro-Begin, whose default binding is ^X(, tells z80emacs 
  59. to start remembering every keystroke you type.
  60.  
  61. They will be written to a file named "KY+BD+MC.KBM", on the current 
  62. drive and user area.
  63.  
  64. 35    CI-Keyboard-Macro-End
  65.  
  66. By default, ^X) == close the keyboard macro file, which thus becomes
  67. available for execution.
  68.  
  69. 36    CI-Keyboard-Macro-Execute
  70.  
  71. By default, this is M-I ( the BACKTAB key on my terminal ).
  72. The traditional emacs binding for it is ^XE
  73.  
  74. The file "KY+BD+MC.KBM" becomes the current source of command input.
  75. The keystrokes that were recorded are now replayed.
  76. If any of the commands make the terminal beep, execution stops.
  77. Any parameter to this command is ignored.
  78. The screen is updated as the stored commands are replayed.
  79.  
  80. **    CI-Universal-Argument
  81.  
  82. ^U cannot be remapped. It is the emacs parameter introducer.
  83. Many Z80EMACS commands can use parameters. Most often the 
  84. parameter is a repetition count, e.g., "do this thing 6 times".
  85. Sometimes the parameter modifies the command behavior in other ways.
  86.  
  87. Typing ^U gives you an argument of 4, but if you type in some 
  88. digits, they give the argument value; after that, typing ^U 
  89. again multiplies the current argument by 4.
  90. This is so confusing to explain... just try it out, and see.
  91.  
  92. For example, to insert several A's at once:
  93.    ^UA     gives 4 of them
  94.    ^U2A    2 of them
  95.    ^U^UA   16
  96.    
  97. **     CI-Universal-Negative-Argument
  98.  
  99. This is like ^U for starting arguments, but it starts with "-1"
  100. ( minus-one ). Negative arguments often have special meanings.
  101.  
  102. It is mapped as "^\" and can't be remapped.
  103.  
  104. 58    DC-Discard-Other-Window
  105.  
  106. ^X1 gets rid of all the windows on the screen except the current 
  107. one.
  108.  
  109. 59    DC-Enlarge-Window
  110.  
  111. ^Xz makes the current window larger, by taking lines away from its 
  112. neighbors.
  113. The parameter to this command controls how many lines bigger
  114. ( or smaller, with a negative argument ) the window gets.
  115.  
  116. 63    DC-Reposit-Top
  117.  
  118. This is M-! by default. It redisplays the window with the current 
  119. line at the top.
  120. With an argument, the current line becomes line N of the window.
  121. With a negative argument, the current line becomes the bottom 
  122. line of the window.
  123.  
  124. 64    DC-Scroll-Down
  125.  
  126. ^X^J moves all the text in the window down one line;
  127. the cursor stays on the same line of the file.
  128. The argument is a repetition count, negative scrolls up.
  129.  
  130. 67    DC-Scroll-Up
  131.  
  132. ^X^K; see description of DC-Scroll-Down.
  133.  
  134. 72    DC-Shrink-Window
  135.  
  136. ^XZ == see DC-Enlarge-Window
  137.  
  138. 73    DC-Split-Window
  139.  
  140. ^X2 makes two windows out of the current one, by spliting it in half.
  141. No arguments.
  142.  
  143. 79    EC-Arrow-Down
  144.  
  145. Down-arrow is mapped as ^J AND as ^V because many ASCII terminals use 
  146. ^V as their down-arrow key.
  147. Argument is repetition count, negative argument reverses the direction.
  148. FUNNY-ARROW: arrow down from the last line of the buffer
  149. goes to the first line of the buffer.
  150.  
  151. 80    EC-Arrow-Left
  152.  
  153. ^H is the default mapping.
  154. Argument is repetition count, negative argument reverses the direction.
  155.  
  156. 81    EC-Arrow-Right
  157.  
  158. ^L is the default mapping.
  159. Argument is repetition count, negative argument reverses the direction.
  160.  
  161. 82    EC-Arrow-Up
  162.  
  163. ^K is the default mapping.
  164. Argument is repetition count, negative argument reverses the direction.
  165. FUNNY-ARROW: arrow up from the first line of the buffer goes to the 
  166. last line; arrow up always goes one line more than specified.
  167. FUNNY-ARROW was a bug that I left in as an interesting feature;
  168. the actual implementation in Z80EMACS is not quite right, because
  169. if you SPECIFY an argument, arrow-up should move exactly that many 
  170. lines; it's only if you don't specify any argument that funny-arrow-up
  171. should move an extra line.
  172.  
  173. 91    EC-Back-Search-Simple
  174.  
  175. ^P prompts for a string, and then searches backwards in the buffer 
  176. for it. If you just hit return instead of entering a new string, 
  177. it searches for the last thing you searched for.
  178.  
  179. Argument is ignored ( of course, negative SHOULD search forwards );
  180. no incremental search or regular expressions; there should be a
  181. "search-again" command, so you wouldn't have to hit RETURN at the 
  182. prompt.
  183.  
  184. 93    EC-CR-With-Indent
  185.  
  186. ^M ( carriage return ) inserts a new line, with indentation matching 
  187. the previous line, and goes to the start of it ( after the indentation ).
  188. Argument is repetition count, negative argument does nothing.
  189.  
  190. 95    EC-Capitalize-Region
  191.  
  192. This is listed in ZMECMDS.LST, but there's no such thing.
  193.  
  194. 96    EC-Capitalize-Word
  195.  
  196. M-c Goes Forward To The Start Of The Next Word, Makes The First Letter 
  197. Uppercase, And Skips Over The Rest Of The Word.
  198. Argument is repetition count, negative argument does nothing.
  199. A "word" is defined according to EC-Set-Word-Mode.
  200.  
  201. 98    EC-Deblank
  202.  
  203. ^X^O gets rid of blank lines around the cursor.
  204.  
  205. 103    EC-Exchange-Local-Mark
  206.  
  207. ^Z sets the "mark" at the cursor position and moves the cursor to where
  208. the "mark" used to be.
  209. The "mark" is a remembered cursor position, of which there's one per 
  210. window.
  211.  
  212. 106    EC-Execute-File
  213.  
  214. Next release. This is like CI-Keyboard-Macro-Execute, except that 
  215. it asks you for a file name; thus, you can have lots of editor command 
  216. files around.
  217.  
  218. 107    EC-Exit
  219.  
  220. ^X^C ends the execution of Z80EMACS.
  221. Unless you give it an argument, it will check to see if any buffers 
  222. have been modified and not saved yet, and if so, it will ask you
  223. "Quit[Y/N]?". It won't ask you anything unless you might need to 
  224. save something.
  225.  
  226. 111    EC-Find-File
  227.  
  228. ^X^F is the command you use to edit files.
  229. It asks you for a file name, and then looks to see if the file is
  230. already in a buffer. If so, it just goes to that buffer; if not, 
  231. it makes a new buffer and reads in the file and goes to the
  232. new buffer.
  233.  
  234. 129    EC-Forward-Search-Simple
  235.  
  236. ^N == see EC-Back-Search-Simple
  237.  
  238. 142    EC-Goto-Beginning-Of-Line
  239.  
  240. ^@ ( 0x00 ) goes to the beginning of the current line, or
  241. with a negative parameter, it goes to the end of the line,
  242. or with a parameter it goes to column N of the current line.
  243.  
  244. 144    EC-Goto-End-of-Line
  245.  
  246. ^E goes to the end of the current line, or
  247. with a negative parameter, it goes to the start of the line.
  248.  
  249. 145    EC-Goto-First-Buffer-Line
  250.  
  251. M-g actually goes to line N of the buffer, but with no argument
  252. it goes to the first line, of course. Negative arguments mean
  253. "go to N lines from end".
  254.  
  255. 150    EC-Goto-Last-Buffer-Line
  256.  
  257. M-G; see EC-Goto-First-Buffer-Line
  258.  
  259. 161    EC-Goto-Next-Page
  260.  
  261. ^C pages forwards; it actually does this by going forwards as many 
  262. lines as there are lines in the window.
  263. Argument is repetition count, negative argument reverses the direction.
  264.  
  265. 166    EC-Goto-Next-Window
  266.  
  267. ^Xn is useful when you have more than one window on the screen.
  268. It moves down one window.
  269. It's wrongly listed as an EC command instead of as a DC command,
  270. because it may change the current buffer by doing so.
  271.  
  272. 180    EC-Goto-Previous-Page
  273.  
  274. ^R == see EC-Goto-Next-Page
  275.  
  276. 186    EC-Goto-Previous-Window
  277.  
  278. ^Xp == see EC-Goto-Next-Window
  279.  
  280. 192    EC-GrabFrom-Stack
  281.  
  282. Well, Z80EMACS doesn't really have a stack, but only one "kill buffer".
  283. The "kill stack" contains a copy of deleted text.
  284. ^Y ( "yank" ) inserts that deleted text into the buffer at the 
  285. cursor position.
  286. You can give it an argument, to get extra copies of the text.
  287.  
  288. This very important command is used to undo mistakes, 
  289. to copy text, and to move text.
  290.  
  291. 204    EC-Kill-Lines-Count
  292.  
  293. M-R deletes arg lines, starting with the cursor line.
  294. Negative argument just beeps.
  295. The silly binding of Meta-R is because that's what the "LINE DELETE"
  296. key on my trminal sends.
  297.  
  298. 208    EC-Kill-Region
  299.  
  300. The "region" is the area enclosed by the cursor and the "mark".
  301. M-L deletes the region; you can get it back with EC-GrabFrom-Stack.
  302. Silly mapping, my terminal....
  303.  
  304. 209    EC-Kill-to-EOL-emacs
  305.  
  306. M-T deletes the text up to the end of the line; if you're already at 
  307. the end of the line, it deletes the newline and joins the lines;
  308. with an argument of 0, it kills to start of line, with other 
  309. arguments it does what emacs users expect it to.
  310.    If you're not an emacs user, you don't want to know, and I
  311.    don't want to waste a thousand words on this.
  312. Silly mapping, my terminal....
  313.  
  314. 211    EC-Kill-Char-Back
  315.  
  316. ^? ( DEL ) deletes left by characters.
  317. Argument is repetition count, negative argument reverses the direction.
  318.  
  319. 212    EC-Kill-Char-Forw
  320.  
  321. ^D == see EC-Kill-Char-Back
  322.  
  323. 213    EC-Kill-Word-Back
  324.  
  325. M-b deletes the word before the cursor.
  326. Argument is repetition count, negative argument does nothing.
  327. A "word" is defined according to EC-Set-Word-Mode.
  328.  
  329. 214    EC-Kill-Word-Forw
  330.  
  331. M-f deletes the word after the cursor.
  332. Argument is repetition count, negative argument does nothing.
  333. A "word" is defined according to EC-Set-Word-Mode.
  334.  
  335. 219    EC-Lower-Case-Region
  336.  
  337. ^X^L turns all the caps in the region to lowercase.
  338. If you do it by accident, what a pain!
  339.  
  340. 220    EC-Lower-Case-Word
  341.  
  342. M-_ ( Meta-underline ), lowercases the next word.
  343.  
  344. 224    EC-Open-Lines
  345.  
  346. ^O is like WordStar's ^N.
  347. Arg is repetition count.
  348.  
  349. 229    EC-PickUp-Region
  350.  
  351. M-P is a shortcut for EC-Kill-Region followed by EC-GrabFrom-Stack.
  352. ( The mapping is my "PRINT" key, M-p would be better. )
  353.  
  354. 235    EC-Quote-One
  355.  
  356. M-Q is what you use to insert arg copies of a control character 
  357. into the file. ( or to insert a bunch of digits ).
  358. There is no special warning if you insert ^Z into a text file.
  359.  
  360. 236    EC-Read-File
  361.  
  362. ^X^R with no argument gets rid of the file that's currently in the 
  363. current buffer and then reads in a new one. ( You get prompted for 
  364. a filename ).
  365. With a negative argument, it reads the file in at the cursor position,
  366. which is "EC-Insert-File".
  367.  
  368. 238    EC-Redraw
  369.  
  370. M-\ clears the screen and redraws, with the cursor line in
  371. the middle of its window. UNIX editors MUST HAVE this command,
  372. because other processes might send messages to the screen.
  373. The default mapping is sort of random...
  374.  
  375. 240    EC-Rename-Buffer
  376.  
  377. ^X^N changes the "buffer name". Each buffer has a buffer name and a
  378. file name. You can use ^X^N to make short names so that ^Xb is easier 
  379. to use.
  380. With a negative parameter, it changes the file name.
  381.  
  382. 244    EC-Save-File
  383.  
  384. ^X^S is the default. If your terminal uses xon-xoff, remap this!
  385. Z80EMACS creates a backup file, with the ".BAK" extension, whenever it
  386. saves or writes to an existing file.
  387.  
  388. 245    EC-Self-Insert
  389.  
  390. The printable characters are all self-inserting characters 
  391. and can't be remapped. You could map other things to be 
  392. self-inserting, but why?
  393. The argument is a repetition count, and must be greater than zero.
  394.  
  395. 255    EC-Set-Local-Mark
  396.  
  397. M-* tells Z80EMACS to remember the current cursor position.
  398. The silly mapping is because of my terminal...
  399.  
  400. If you want to go to some other place in the file and then come back,
  401. use this command; use this command also for defining the "region"
  402. for the various commands that use it.
  403.  
  404. 258    EC-Set-Word-Mode
  405.  
  406. M-W sets "Word" mode, as opposed to "word" mode.
  407. With a negative argument, it sets vi Word mode,
  408. as opposed to emacs Word mode.
  409. See also EC-Unset-Word-Mode, which is M-w
  410.  
  411. Z80EMACS has four possible word mode settings ( vi or emacs, word 
  412. or Word ). The word mode affects ALL THE COMMANDS that have "Word" 
  413. in their names.
  414.  
  415. It's quicker for you to try it out than for me to explain it.
  416.  
  417. 263    EC-TAB
  418.  
  419. ^I ( TAB ) normally inserts a tab into the buffer, or a number 
  420. of spaces if variable tab size has been set.
  421. With an argument, it sets the "variable tab size" instead; for example,
  422. ^U^I says that from now on tabs will be expanded as spaces to fit 
  423. tabstops every 4 characters.
  424. An argument of 0 goes back to inserting real tabs, an argument of 1
  425. is the same as no argument at all.
  426.  
  427. 265    EC-Transpose-Chars
  428.  
  429. M-~ transposes the two character to the left of the cursor.
  430.  
  431. 268    EC-Unset-Word-Mode
  432.  
  433. M-w, see EC-Set-Word-Mode
  434.  
  435. 276    EC-Upper-Case-Region
  436.  
  437. M-j ( my shift-up-arrow )
  438.  
  439. 277    EC-Upper-Case-Word
  440.  
  441. M-^ ( escape carat )
  442.  
  443. 282    EC-Word-Back
  444.  
  445. ^B goes back a word, arg is repeat count, negative arg goes forwards.
  446. See "Word Mode".
  447.  
  448. 283    EC-Word-Forw
  449.  
  450. ^F goes forward a word. See EC-Word-Back.
  451.  
  452. 286    EC-Write-File
  453.  
  454. ^X^W gives the buffer a new filename and writes it out.
  455.  
  456. 487    SC-Discard-Buffer
  457.  
  458. M-Y ( "PAGE ERASE" on my terminal ) asks for a buffer name and
  459. gets rid of the indicated buffer.
  460. Because the amount of memory available is limited, you may want to 
  461. get rid of buffers you no longer need.
  462.  
  463. 494    SC-SwitchTo-Buffer
  464.  
  465. ^Xb asks for a buffer name and goes to that buffer.
  466.  
  467. 495    SC-SwitchTo-Next-Sequential-Buffer
  468.  
  469. ^^ ( control-carat ) goes to the next buffer in Z80EMACS' internal
  470. list of all the existing buffers.
  471. Most of the time, you have only two or three active buffers, so 
  472. this is more convenient than ^Xb
  473.  
  474. 528    UI-Buffer-Selection-Menu
  475.  
  476. ^X^B makes a buffer named "[List]", fills it with a nice-looking 
  477. list of the active buffers, and goes to it.
  478.  
  479. Unfortunately, you can't do anything with this menu; when you're 
  480. in the [List] buffer, you should be able to 
  481. 1) go to the buffer indicated by the cursor line,
  482. 2) discard the indicated buffer,
  483. 3) re-order the list,
  484. 4) save the file in the indicated buffer,
  485. 5) rename file or buffer.
  486.  
  487. 543    UI-Give-Statistics
  488.  
  489. ^X= puts out a message on the message line that tells you
  490. a useless X and Y, the hex value of the character under the cursor,
  491. and the cursor position within the file.
  492.  
  493. 999    Undefined-Function
  494.  
  495. This isn't really an editor command. It's defined so that MAPKEYS.COM 
  496. can UNMAP some keys.
  497.  
  498.