|
|
1.1 root 1:
2:
3: me Command me
4:
5:
6:
7:
8: MicroEMACS screen editor
9:
10: mmee [-ee _e_r_r_o_r_f_i_l_e] [_f_i_l_e ...]
11:
12: me is the command for MicroEMACS, the screen editor for COHERENT.
13: With MicroEMACS, you can insert text, delete text, move text,
14: search for a string and replace it, and perform many other
15: editing tasks. MicroEMACS reads text from files and writes
16: edited text to files; it can edit several files simultaneously,
17: while displaying the contents of each file in its own screen win-
18: dow.
19:
20: ***** Screen Layout *****
21:
22: If the command me is used without arguments, MicroEMACS opens an
23: empty buffer. If used with one or more file name arguments,
24: MicroEMACS will open each of the files named, and display its
25: contents in a window. If a file cannot be found, MicroEMACS will
26: assume that you are creating it for the first time, and create an
27: appropriately named buffer and file descriptor for it.
28:
29: The last line of the screen is used to print messages and in-
30: quiries. The rest of the screen is portioned into one or more
31: windows in which text is displayed. The last line of each window
32: shows whether the text has been changed, the name of the buffer,
33: and the name of the file associated with the window.
34:
35: MicroEMACS notes its current position. It is important to remem-
36: ber that the current position is always to the _l_e_f_t of the cur-
37: sor, and lies _b_e_t_w_e_e_n two letters, rather than at one letter or
38: another. For example, if the cursor is positioned at the letter
39: `k' of the phrase ``Mark Williams'', then the current position
40: lies _b_e_t_w_e_e_n the letters `r' and `k'.
41:
42: ***** Commands and Text *****
43:
44: The printable ASCII characters, from ` ' to `~', can be inserted
45: at the current position. Control characters and escape sequences
46: are recognized as commands, described below. A control character
47: can be inserted into the text by prefixing it with <ctrl-Q> (that
48: is, hold down the <ccoonnttrrooll> key and type the letter `Q').
49:
50: There are two types of commands to remove text. Delete commands
51: remove text and throw it away, whereas kill commands remove text
52: but save it in the kill buffer. Successive kill commands append
53: text to the previous kill buffer. Moving the cursor before you
54: kill a line will empty the kill buffer, and write the line just
55: killed into it.
56:
57: Search commands prompt for a search string terminated by <return>
58: and then search for it. Case sensitivity for searching can be
59: toggled with the command <esc>@. Typing <return> instead of a
60: search string tells MicroEMACS to use the previous search string.
61:
62:
63:
64: COHERENT Lexicon Page 1
65:
66:
67:
68:
69: me Command me
70:
71:
72:
73: Some commands manipulate words rather than characters.
74: MicroEMACS defines a word as consisting of all alphabetic charac-
75: ters, plus `_' and `$'. Usually, a character command is a con-
76: trol character and the corresponding word command is an escape
77: sequence. For example, <ctrl-F> moves forward one character and
78: <esc>F moves forward one word.
79:
80: MicroEMACS can handle blocks of text as well as individual
81: characters, words, and lines. MicroEMACS defines a block of text
82: as all the text that lies between the _m_a_r_k and the current posi-
83: tion of the cursor. For example, typing <ccttrrll-WW> kills all text
84: from the mark to the current position of the cursor; this is
85: useful when moving text from one file to another. When you in-
86: voke MicroEMACS, the mark is set at the beginning of the file;
87: you can reset the mark to the cursor's current position by typing
88: <ccttrrll-@>.
89:
90: ***** Using MicroEMACS with the Compiler *****
91:
92: MicroEMACS can be invoked automatically by the compiler command
93: cc to help you repair all errors that occur during compilation.
94: The -A option to cc causes MicroEMACS to be invoked automatically
95: when an error occurs. The compiler error messages are displayed
96: in one window, the source code in the other, and the cursor is at
97: the line on which the first error occurred. When the text is al-
98: tered, exiting from MicroEMACS automatically recompiles the file.
99:
100: This cycle will continue either until the file compiles without
101: error, or until you break the cycle by typing <ctrl-U> <ctrl-X>
102: <ctrl-C>.
103:
104: The option -e to the me command allows you to invoke the error
105: buffer by hand. For example, the commands
106:
107:
108: cc myprogram.c 2>errorfile
109: me -e errorfile myprogram.c
110:
111:
112: divert the compiler's error messages into errorfile, and then in-
113: vokes MicroEMACS to let you correct them interactively.
114:
115: ***** The MicroEMACS Help Facility *****
116:
117: MicroEMACS has a built-in help facility. With it, you can ask
118: for information either for a word that you type in, or for a word
119: over which the cursor is positioned. The MicroEMACS help file
120: contains the bindings for all library functions and macros in-
121: cluded with COHERENT.
122:
123: For example, consider that you are preparing a C program and want
124: more information about the function fopen. Type <ccttrrll-XX>?. At
125: the bottom of the screen will appear the prompt
126:
127:
128:
129:
130: COHERENT Lexicon Page 2
131:
132:
133:
134:
135: me Command me
136:
137:
138:
139:
140: Topic:
141:
142:
143: Type ffooppeenn. MicroEMACS will search its help file, find its entry
144: for fopen, then open a window and print the following:
145:
146:
147: Open a stream for standard I/O
148: #include <stdio.h>
149: FILE *fopen (name, type) char *name, *type;
150:
151:
152: If you wish, you can kill the information in the help window and
153: copy it into your program, to ensure that you prepare the func-
154: tion call correctly.
155:
156: Consider, however, that you are checking a program written ear-
157: lier, and you wish to check the call for a call to ffooppeenn. Simply
158: move the cursor until it is positioned over one of the letters in
159: ffooppeenn, then type <eesscc>?. MicroEMACS will open its help window,
160: and show the same information it did above.
161:
162: To erase the help window, type <ccttrrll-XX>11.
163:
164: ***** Options *****
165:
166: The following list gives the MicroEMACS commands. They are
167: grouped by function, e.g., _M_o_v_i_n_g _t_h_e _c_u_r_s_o_r. Some commands can
168: take an _a_r_g_u_m_e_n_t, which specifies how often the command is to be
169: executed. The default argument is 1. The command <ctrl-U> in-
170: troduces an argument. By default, it sets the argument to four.
171: Typing <ctrl-U> followed by a number sets the argument to that
172: number. Typing <ctrl-U> followed by one or more <ctrl-U>s multi-
173: plies the argument by four.
174:
175: ***** Moving the Cursor *****
176:
177:
178: <ccttrrll-AA>
179: Move to start of line.
180:
181: <ccttrrll-BB>
182: (Back) Move backward by characters.
183:
184: <eesscc>BB Move backward by words.
185:
186: <ccttrrll-EE>
187: (End) Move to end of line.
188:
189: <ccttrrll-FF>
190: (Forward) Move forward by characters.
191:
192: <eesscc>FF (Forward) Move forward by words.
193:
194:
195:
196: COHERENT Lexicon Page 3
197:
198:
199:
200:
201: me Command me
202:
203:
204:
205: <eesscc>GG Go to an absolute line number in a file. Same as <ccttrrll-
206: XX>GG.
207:
208: <ccttrrll-NN>
209: (Next) Move to next line.
210:
211: <ccttrrll-PP>
212: (Previous) Move to previous line.
213:
214: <ccttrrll-VV>
215: Move forward by pages.
216:
217: <eesscc>VV Move backward by pages.
218:
219: <ccttrrll-XX>=
220: Print the current position.
221:
222: <ccttrrll-XX>GG
223: Go to an absolute line number in a file. Can be used
224: with an argument; otherwise, it will prompt for a line
225: number. Same as <eesscc>GG.
226:
227: <ccttrrll-XX>[
228: Go to matching C delimiter. For example, if the cursor
229: is positioned under the character `{', then typing <ccttrrll-
230: XX>[ moves the cursor to the next `}'. Likewise, if the
231: cursor is positioned under the character }, then typing
232: <ccttrrll-XX>[ moves the cursor to the first preceding `{'.
233: MicroEMACS recognizes the delimiters [, ], {, }, (, ),
234: /*, and */.
235:
236: <ccttrrll-XX>]
237: Toggle reverse-video display of matching C delimiters.
238: For example, if reverse-video displaying is toggled on,
239: then whenever the cursor is positioned under a `}'
240: MicroEMACS displays the first preceding '{' in reverse
241: video (should it be on the screen). MicroEMACS recog-
242: nizes the delimiters [, ], {, }, (, ), /*, and */.
243:
244: <eesscc>! Move the current line to the line within the window given
245: by argument; the position is in lines from the top if
246: positive, in lines from the bottom if negative, and the
247: center of the window if zero.
248:
249: <eesscc>< Move to the beginning of the current buffer.
250:
251: <eesscc>> Move to the end of the current buffer.
252:
253: ***** Killing and Deleting *****
254:
255:
256: <ccttrrll-DD>
257: (Delete) Delete next character.
258:
259:
260:
261:
262: COHERENT Lexicon Page 4
263:
264:
265:
266:
267: me Command me
268:
269:
270:
271: <eesscc>DD Kill the next word.
272:
273: <ccttrrll-HH>
274: If no argument, delete previous character. Otherwise,
275: kill argument previous characters.
276:
277: <ccttrrll-KK>
278: (Kill) With no argument, kill from current position to
279: end of line; if at the end, kill the newline. With argu-
280: ment set to one, kill from beginning of line to current
281: position. Otherwise, kill argument lines forward (if
282: positive) or backward (if negative).
283:
284: <ccttrrll-WW>
285: Kill text from current position to mark.
286:
287: <ccttrrll-XX><ccttrrll-OO>
288: Kill blank lines at current position.
289:
290: <ccttrrll-YY>
291: (Yank back) Copy the kill buffer into text at the current
292: position; set current position to the end of the new
293: text.
294:
295: <eesscc><ccttrrll-HH>
296: Kill the previous word.
297:
298: <eesscc><DDEELL>
299: Kill the previous word.
300:
301: <DDEELL> If no argument, delete the previous character. Other-
302: wise, kill argument previous characters.
303:
304: ***** Windows *****
305:
306:
307: <ccttrrll-XX>11
308: Display only the current window.
309:
310: <ccttrrll-XX>22
311: Split the current window into two windows. This command
312: is usually followed by <ctrl-X>B or <ctrl-X><ctrl-V>.
313:
314: <ccttrrll-XX>NN
315: (Next) Move to next window.
316:
317: <ccttrrll-XX>PP
318: (Previous) Move to previous window.
319:
320: <ccttrrll-XX>ZZ
321: Enlarge the current window by argument lines.
322:
323: <ccttrrll-XX><ccttrrll-NN>
324: Move text in current window down by argument lines.
325:
326:
327:
328: COHERENT Lexicon Page 5
329:
330:
331:
332:
333: me Command me
334:
335:
336:
337: <ccttrrll-XX><ccttrrll-PP>
338: Move text in current window up by argument lines.
339:
340: <ccttrrll-XX><ccttrrll-ZZ>
341: Shrink current window by argument lines.
342:
343: ***** Buffers *****
344:
345:
346: <ccttrrll-XX>BB
347: (Buffer) Prompt for a buffer name, and display the buffer
348: in the current window.
349:
350: <ccttrrll-XX>KK
351: (Kill) Prompt for a buffer name and delete it.
352:
353: <ccttrrll-XX><ccttrrll-BB>
354: Display a window showing the change flag, size, buffer
355: name, and file name of each buffer.
356:
357: <ccttrrll-XX><ccttrrll-FF>
358: (File name) Prompt for a file name for current buffer.
359:
360: <ccttrrll-XX><ccttrrll-RR>
361: (Read) Prompt for a file name, delete current buffer, and
362: read the file.
363:
364: <ccttrrll-XX><ccttrrll-VV>
365: (Visit) Prompt for a file name and display the file in
366: the current window.
367:
368: ***** Saving Text and Exiting *****
369:
370:
371: <ccttrrll-XX><ccttrrll-CC>
372: Exit without saving text.
373:
374: <ccttrrll-XX><ccttrrll-SS>
375: (Save) Save current buffer to the associated file.
376:
377: <ccttrrll-XX><ccttrrll-WW>
378: (Write) Prompt for a file name and write the current
379: buffer to it.
380:
381: <ccttrrll-ZZ>
382: Save current buffer to associated file and exit.
383:
384: ***** Compilation Error Handling *****
385:
386:
387: <ccttrrll-XX>>
388: Move to next error.
389:
390: <ccttrrll-XX><
391: Move to previous error.
392:
393:
394: COHERENT Lexicon Page 6
395:
396:
397:
398:
399: me Command me
400:
401:
402:
403:
404: ***** Search and Replace *****
405:
406:
407: <ccttrrll-RR>
408: (Reverse) Incremental search backward; a pattern is
409: sought as each character is typed.
410:
411: <eesscc>RR (Reverse) Search toward the beginning of the file. Waits
412: for entire pattern before search begins.
413:
414: <ccttrrll-SS>
415: (Search) Incremental search forward; a pattern is sought
416: as each character is typed.
417:
418: <eesscc>SS (Search) Search toward the end of the file. Waits for
419: entire pattern before search begins.
420:
421: <eesscc>% Search and replace. Prompt for two strings; then search
422: for the first string and replace it with the second.
423:
424: <eesscc>/ Search for next occurrence of a string entered with the
425: <eesscc>SS or <eesscc>RR commands; this remembers whether the
426: previous search had been forward or backward.
427:
428: <eesscc>@ Toggle case sensitivity for searches. By default, sear-
429: ches are case insensitive.
430:
431: ***** Keyboard Macros *****
432:
433:
434: <ccttrrll-XX>(
435: Begin a macro definition. MicroEMACS collects everything
436: typed until the next <ccttrrll-XX>) for subsequent repeated
437: execution. <ctrl-G> breaks the definition.
438:
439: <ccttrrll-XX>)
440: End a macro definition.
441:
442: <ccttrrll-XX>EE
443: (Execute) Execute the keyboard macro.
444:
445: <ccttrrll-XX>MM
446: Bind current macro to a name.
447:
448: ***** Change Case of Text *****
449:
450:
451: <eesscc>CC (Capitalize) Capitalize the next word.
452:
453: <ccttrrll-XX><ccttrrll-LL>
454: (Lower) Convert all text from current position to mark
455: into lower case.
456:
457:
458:
459:
460: COHERENT Lexicon Page 7
461:
462:
463:
464:
465: me Command me
466:
467:
468:
469: <eesscc>LL (Lower) Convert the next word to lower case.
470:
471: <ccttrrll-XX><ccttrrll-UU>
472: (Upper) Convert all text from current position to mark
473: into upper case.
474:
475: <eesscc>UU (Upper) Convert the next word to upper case.
476:
477: ***** White Space *****
478:
479:
480: <ccttrrll-II>
481: Insert a tab.
482:
483: <ccttrrll-JJ>
484: Insert a new line and indent to current level. This is
485: often used in C programs to preserve the current level of
486: indentation.
487:
488: <ccttrrll-MM>
489: (Return) If the following line is not empty, insert a new
490: line; if empty, move to next line.
491:
492: <ccttrrll-OO>
493: Open a blank line; that is, insert newline after the cur-
494: rent position.
495:
496: <ttaabb> With argument, set tab fields at every _a_r_g_u_m_e_n_t charac-
497: ters. An argument of zero restores the default of eight
498: characters. Setting the tab to any character other than
499: eight causes space characters to be set in your file in-
500: stead of tab characters.
501:
502: ***** Send Commands to Operating System *****
503:
504:
505: <ccttrrll-CC>
506: Suspend MicroEMACS and execute a subshell. Typing <ccttrrll-
507: DD> returns you to MicroEMACS and allows you to resume
508: editing.
509:
510: <ccttrrll-XX>!
511: Prompt for a shell command and execute it.
512:
513: These commands recognize the shell variable SHELL to determine
514: the shell to which it should pass the command.
515:
516: ***** Setting the Mark *****
517:
518:
519: <ccttrrll-@>
520: Set mark at current position.
521:
522: <eesscc>. Set mark at current position.
523:
524:
525:
526: COHERENT Lexicon Page 8
527:
528:
529:
530:
531: me Command me
532:
533:
534:
535: <ccttrrll><ssppaaccee>
536: Set mark at current position.
537:
538: ***** Help Window *****
539:
540:
541: <ccttrrll-XX>?
542: Prompt for word for which information is needed.
543:
544: <eesscc>? Search for word over which cursor is positioned.
545:
546: <eesscc>22 Erase help window.
547:
548: ***** Miscellaneous *****
549:
550:
551: <ccttrrll-GG>
552: Abort a command.
553:
554: <ccttrrll-LL>
555: Redraw the screen.
556:
557: <ccttrrll-QQ>
558: (Quote) Insert the next character into text; used to in-
559: sert control characters.
560:
561: <eesscc>QQ (Quote) Insert the next control character into the text.
562: Same as <ctrl-Q>.
563:
564: <ccttrrll-TT>
565: Transpose the characters before and after the current
566: position.
567:
568: <ccttrrll-UU>
569: Specify a numeric argument, as described above.
570:
571: <ccttrrll-UU><ccttrrll-XX><ccttrrll-CC>
572: Abort editing and re-compilation. Use this command to
573: abort editing and return to COHERENT when you are using
574: the -AA option to the cccc command.
575:
576: <ccttrrll-XX>HH
577: Use word-wrap on a region.
578:
579: <ccttrrll-XX>FF
580: Set word wrap to _a_r_g_u_m_e_n_t column. If argument is one,
581: set word wrap to cursor's current position.
582:
583: <ccttrrll-XX><ccttrrll-XX>
584: Mark the current position, then jump to the previous set-
585: ting of the mark. This is useful when moving text from
586: one place in a file to another.
587:
588:
589:
590:
591:
592: COHERENT Lexicon Page 9
593:
594:
595:
596:
597: me Command me
598:
599:
600:
601: ***** Diagnostics *****
602:
603: MicroEMACS prints error messages on the bottom line of the
604: screen. It prints informational messages (enclosed in square
605: brackets `[' and `]' to distinguish them from error messages) in
606: the same place.
607:
608: MicroEMACS manipulates text in memory rather than in a file. The
609: file on disk is not changed until you save the edited text.
610: MicroEMACS prints a warning and prompts you whenever a command
611: would cause it to lose changed text.
612:
613: ***** See Also *****
614:
615: commands, ed, sed
616:
617: ***** Notes *****
618:
619: Because MicroEMACS keeps text in memory, it does not work for ex-
620: tremely large files. It prints an error message if a file is too
621: large to edit. If this happens when you first invoke a file, you
622: should exit from the editor immediately. Otherwise, your file on
623: disk will be truncated. If this happens in the middle of an
624: editing session, however, delete text until the message disap-
625: pears, then save your file and exit. Due to the way MicroEMACS
626: works, saving a file after this error message has appeared will
627: take more time than usual.
628:
629: This version of MicroEMACS does not include many facilities
630: available in the original EMACS display editor, which was written
631: by Richard Stallman at M.I.T. In particular, it does not include
632: user-defined commands or pattern search commands.
633:
634: Please note, too, that MicroEMACS has a number of features that
635: could not be documented due to time pressure during the produc-
636: tion of this manual. We suggest that you consult the source code
637: for MicroEMACS, which is included with COHERENT, for a full
638: description of all that MicroEMACS can do.
639:
640: The current version of MicroEMACS, including source code, is
641: proprietary to Mark Williams Company. The code may be altered or
642: otherwise changed for your personal use, but it may not be used
643: for commercial purposes, and it may not be distributed without
644: prior written consent by Mark Williams Company.
645:
646: MicroEMACS is based upon the public domain editor by David G.
647: Conroy.
648:
649:
650:
651:
652:
653:
654:
655:
656:
657:
658: COHERENT Lexicon Page 10
659:
660:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.