|
|
1.1 root 1:
2:
3: elvis Command elvis
4:
5:
6:
7:
8: Clone of UNIX-standard screen editor
9:
10: eellvviiss [ _f_l_a_g_s ] [ +_c_m_d ] [ _f_i_l_e_1 ... _f_i_l_e_2_7 ]
11:
12: elvis is a clone of vi and ex, the standard UNIX screen editors.
13:
14: Unlike MicroEMACS, the COHERENT system's other screen editor, el-
15: vis is a modal editor whose command structure resembles the ed
16: line editor. Modal means that a keystroke assumes a different
17: meaning, depending upon the mode that the editor is in. elvis
18: uses three modes: visual command mode, colon command mode, and
19: input mode. The following sections summarize the commands as-
20: sociated with each mode.
21:
22: ***** Visual Command Mode *****
23:
24: Visual-command mode closely resembles text-input mode. One quick
25: way to tell the modes apart is to press the <esc> key. If elvis
26: beeps, then you are in visual-command mode. If it does not beep,
27: then you were in input mode, but pressing <esc> switched you to
28: visual-command mode.
29:
30: Most visual-mode commands are one keystroke long. The commands
31: are in two groups: movement commands and edit commands. The
32: former group moves the cursor through the file being edited, and
33: the latter group alters text.
34:
35: The following sections summarize the command set for elvis's
36: visual command mode.
37:
38: ***** Visual-Mode Movement Commands *****
39:
40: The following summarizes the visual mode's movement commands.
41: count indicates that the command can be optionally prefaced by an
42: argument that tells elvis how often to execute the command. move
43: indicates that the command can be followed by a movement command,
44: after which the command is executed on the text that lies between
45: the point where the command was first typed and the point to
46: which the cursor was moved. Typing the command a second time ex-
47: ecutes the command for the entire line upon which the cursor is
48: positioned. key means that the command must be followed by an
49: argument. The following describes
50:
51: <ccttrrll-BB> Move up by one screenful.
52:
53: [_c_o_u_n_t] <ccttrrll-DD>
54: Scroll down count lines (default, one-half screen-
55: ful).
56:
57: [_c_o_u_n_t] <ccttrrll-EE>
58: Scroll up count lines.
59:
60: <ccttrrll-FF> Move down by one screenful.
61:
62:
63:
64: COHERENT Lexicon Page 1
65:
66:
67:
68:
69: elvis Command elvis
70:
71:
72:
73: <ccttrrll-GG> Show file status and the current line line.
74:
75: [_c_o_u_n_t] <ccttrrll-HH>
76: Move one character to the left.
77:
78: [count] <ccttrrll-JJ>
79: Move down count lines.
80:
81: <ccttrrll-LL> Redraw the screen.
82:
83: [_c_o_u_n_t] <ccttrrll-MM>
84: Move to the beginning of the next line.
85:
86: [_c_o_u_n_t] <ccttrrll-NN>
87: Move down count lines (default, one).
88:
89: [_c_o_u_n_t] <ccttrrll-PP>
90: Move up count lines (default, one).
91:
92: <ccttrrll-RR> Redraw the screen.
93:
94: [_c_o_u_n_t] <ccttrrll-UU>
95: Scroll up count lines (default, one-half screenful).
96:
97: [_c_o_u_n_t] <ccttrrll-YY>
98: Scroll down count lines.
99:
100: <ccttrrll-]> If the cursor is on a tag name, go to that tag.
101:
102: <ccttrrll-^> Switch to the previous file.
103:
104: [_c_o_u_n_t] <ssppaaccee>
105: Move right count spaces (default, one).
106:
107: ! [_m_o_v_e]
108: Run the selected text through an external filter
109: program.
110:
111: `` _k_e_y Select which cut buffer to use next.
112:
113: $ Move to the end of the current line.
114:
115: % Move to the matching (){}[] character.
116:
117: ' _k_e_y Move to a marked line.
118:
119: [count] (
120: Move backward count sentences (default, one).
121:
122: [_c_o_u_n_t] )
123: Move forward count sentences (default, one).
124:
125: * Go to the next error in the error list.
126:
127:
128:
129:
130: COHERENT Lexicon Page 2
131:
132:
133:
134:
135: elvis Command elvis
136:
137:
138:
139: [_c_o_u_n_t] +
140: Move to the beginning of the next line.
141:
142: [_c_o_u_n_t] ,
143: Repeat the previous ff or tt command, but move in the
144: opposite direction.
145:
146: [_c_o_u_n_t] --
147: Move to the beginning of the preceding line.
148:
149: [_c_o_u_n_t] .
150: Repeat the previous _e_d_i_t command.
151:
152: / _t_e_x_t Search forward for text, which can be a regular
153: expression.
154:
155: 00 If not part of a count, move to the first character
156: of this line.
157:
158: : Switch to colon-command mode to execute one command.
159:
160: [_c_o_u_n_t] ;
161: Repeat the previous ff or tt command.
162:
163: ? _t_e_x_t Search backwards for text, which can be a regular
164: expression.
165:
166: @ _k_e_y Execute the contents of a cut-buffer as vi commands.
167:
168: [_c_o_u_n_t] BB
169: Move backwards count words (default, one).
170:
171: [_c_o_u_n_t] EE
172: Move forwards count words (default, one).
173:
174: [count] FF _k_e_y
175: Move left to the _c_o_u_n_t'th occurrence of the given
176: character (default, first).
177:
178: [_c_o_u_n_t] GG
179: Move to to the _c_o_u_n_t'th line in the file (default,
180: last).
181:
182: [_c_o_u_n_t] HH
183: Move to the top of the screen.
184:
185: KK Look up a keyword.
186:
187: [_c_o_u_n_t] LL
188: Move to the bottom of the screen.
189:
190: MM Move to the middle of the screen.
191:
192: NN Repeat the last search, but in the opposite direc-
193: tion.
194:
195:
196: COHERENT Lexicon Page 3
197:
198:
199:
200:
201: elvis Command elvis
202:
203:
204:
205:
206: PP Paste text before the cursor.
207:
208: QQ Shift to colon-command mode.
209:
210: [_c_o_u_n_t] TT _k_e_y
211: Move left _a_l_m_o_s_t to the given character.
212:
213: UU Undo all recent changes to the current line.
214:
215: [_c_o_u_n_t] UU
216: Move forward count words (default, one).
217:
218: [_c_o_u_n_t] YY
219: Copy (or ``yank'') count lines into a cut buffer
220: (default, one).
221:
222: ZZ ZZ Save the file and exit.
223:
224: [ [ Move back one section.
225:
226: ] ] Move forward one section.
227:
228: ^ Move to the beginning of the current line, but after
229: indent.
230:
231: ` _k_e_y Move to the key character.
232:
233: [_c_o_u_n_t] bb
234: Move back count words.
235:
236: [_c_o_u_n_t] ee
237: Move forward to the end of the _c_o_u_n_t'th word.
238:
239: [_c_o_u_n_t] ff _k_e_y
240: Move rightward to the _c_o_u_n_t'th occurrence of the
241: given character.
242:
243: [_c_o_u_n_t] hh
244: Move left count characters (default, one).
245:
246: [_c_o_u_n_t] jj
247: Move down count characters (default, one).
248:
249: [_c_o_u_n_t] kk
250: Move up count characters (default, one).
251:
252: [_c_o_u_n_t] ll
253: Move right count characters (default, one).
254:
255: mm _k_e_y Mark a line or character.
256:
257: nn Repeat the previous search.
258:
259:
260:
261:
262: COHERENT Lexicon Page 4
263:
264:
265:
266:
267: elvis Command elvis
268:
269:
270:
271: pp Paste text after the cursor.
272:
273: [_c_o_u_n_t] tt _k_e_y
274: Move rightward _a_l_m_o_s_t to the _c_o_u_n_t'th occurrence of
275: the given character (default, one).
276:
277: uu Undo the previous edit command.
278:
279: [_c_o_u_n_t] ww
280: Move forward count words (default, one).
281:
282: yy _m_o_v_e
283: Copy (or ``yank'') text into a cut buffer.
284:
285: zz _k_e_y Scroll the screen, repositioning the current line as
286: follows: + indicates top of the screen, -- indicates
287: the bottom, . indicates the middle.
288:
289: [_c_o_u_n_t] {
290: Move back count paragraphs (default, one).
291:
292: [_c_o_u_n_t] |
293: Move to the _c_o_u_n_t'th column on the screen (leftmost,
294: one).
295:
296: [_c_o_u_n_t] }
297: Move forward count paragraphs (default, one).
298:
299: ***** Visual-Mode Edit Commands ***** The following describes the
300: visual mode's editing commands.
301:
302: [_c_o_u_n_t] #
303: Increment a number by count (default, one).
304:
305: [_c_o_u_n_t] &
306: Repeat the previous :ss// command.
307:
308: < _m_o_v_e
309: Shift the enclosed text left.
310:
311: > _m_o_v_e
312: Shift the enclosed text right.
313:
314: [_c_o_u_n_t] AA _i_n_p_u_t
315: Append input at end of the line.
316:
317: CC _i_n_p_u_t
318: Change text from the cursor through the end of the line.
319:
320: DD Delete text from the cursor through the end of the line.
321:
322: [_c_o_u_n_t] II _i_n_p_u_t
323: Insert text at the beginning of the line (after inden-
324: tations).
325:
326:
327:
328: COHERENT Lexicon Page 5
329:
330:
331:
332:
333: elvis Command elvis
334:
335:
336:
337: [_c_o_u_n_t] JJ
338: Join lines the current with the following line.
339:
340: [_c_o_u_n_t] OO _i_n_p_u_t
341: Open a new line above the current line.
342:
343: RR _i_n_p_u_t
344: Overtype.
345:
346: [_c_o_u_n_t] SS input
347: Change lines, like cccc.
348:
349: [_c_o_u_n_t] XX
350: Delete count characters from the left of the cursor
351: (default, one).
352:
353: [_c_o_u_n_t] aa _i_n_p_u_t
354: Insert text after the cursor.
355:
356: cc _m_o_v_e
357: Change text.
358:
359: dd _m_o_v_e
360: Delete text.
361:
362: [_c_o_u_n_t] ii _i_n_p_u_t
363: Insert text at the cursor.
364:
365: [_c_o_u_n_t] oo _i_n_p_u_t
366: Open a new line below the current line.
367:
368: [_c_o_u_n_t] rr _k_e_y
369: Replace count characters with text you type (default, one).
370:
371: [_c_o_u_n_t] ss _i_n_p_u_t
372: Replace count characters with text you type (default, one).
373:
374: [_c_o_u_n_t] xx
375: Delete the character at which the cursor is positioned.
376:
377: [_c_o_u_n_t] ~
378: Toggle a character between upper case and lower case.
379:
380: ***** Colon-Mode Commands ***** The following summarizes the set
381: of colon-mode commands. It is no accident that these commands
382: closely resemble those for the ed line editor: they come, in
383: fact, from ex, the editor upon which both vi (the UNIX visual
384: editor) and ed derive. For that reason, colon-command mode is
385: sometimes called ex mode.
386:
387: line indicates whether the command can be executed on one or more
388: lines. line can be a regular expression. Some commands can be
389: used with an optional exclamation point; if done so, the editor
390: assumes you know what you are doing and suppresses the warnings
391: and prompts it would normally issue for these commands. Please
392:
393:
394: COHERENT Lexicon Page 6
395:
396:
397:
398:
399: elvis Command elvis
400:
401:
402:
403: note, finally, that most commands can be invoked simply by typing
404: the first one or two letters of their names.
405:
406: aabbbbrr [_w_o_r_d _f_u_l_l__f_o_r_m]
407: Define word as an abbreviation for full_form.
408:
409: [_l_i_n_e] aappppeenndd
410: Insert text after the current line.
411:
412: aarrggss [_f_i_l_e_1 ... _f_i_l_e_N]
413: With no arguments, print the files list on eellvviiss's
414: command line. With one or more arguments, change
415: the name of the current file.
416:
417: cccc [_f_i_l_e_s]
418: Invoke the C compiler to compile files, and
419: redirects all error messages into file errlist.
420: After the compiler exits, scan the contents of er-
421: rlist for error messages; if one is found, jump to
422: the line and file indicated on the error line, and
423: display the error message on the status line.
424:
425: ccdd [_d_i_r_e_c_t_o_r_y]
426: Switch the current working directory. With no argu-
427: ment, switch to the $HOME directory.
428:
429: [_l_i_n_e][,_l_i_n_e] cchhaannggee [``_x]
430: Replace the range of lines with the contents of cut-
431: buffer x.
432:
433: cchhddiirr [_d_i_r_e_c_t_o_r_y]
434: Same as the cd command.
435:
436: [_l_i_n_e][,_l_i_n_e] ccooppyy _t_a_r_g_e_t_l_i_n_e
437: Copy the range of lines to after the targetline.
438:
439: [_l_i_n_e][,_l_i_n_e] ddeelleettee [``_x]
440: Move the range of lines into cut buffer x.
441:
442: ddiiggrraapphh[!] [_X_X [_Y]]
443: Set XX as a digraph for Y. With no arguments, dis-
444: play all currently defined digraphs. With one argu-
445: ment, undefine the argument as a digraph.
446:
447: eeddiitt[!] [_f_i_l_e]
448: Edit a file not named on the elvis command line.
449:
450: eerrrrlliisstt[!] [_e_r_r_l_i_s_t]
451: Find the next error message in file errlist, as
452: generated through elvis's cc or make commands.
453:
454: ffiillee [_f_i_l_e]
455: With an argument, change the output file to file.
456: Without an argument, print information about the
457: current output file.
458:
459:
460: COHERENT Lexicon Page 7
461:
462:
463:
464:
465: elvis Command elvis
466:
467:
468:
469:
470: [_l_i_n_e][,_l_i_n_e] gglloobbaall /_r_e_g_e_x_p/ _c_o_m_m_a_n_d
471: Search the range of lines for all lines that contain
472: the regular expression regexp, and execute command
473: upon each.
474:
475: [_l_i_n_e] iinnsseerrtt
476: Insert text before the current line.
477:
478: [_l_i_n_e][,_l_i_n_e] jjooiinn
479: Concatenate the range of lines into one line.
480:
481: [_l_i_n_e][,_l_i_n_e] lliisstt
482: Display the requested range of lines, making all em-
483: bedded control characters explicit.
484:
485: mmaakkee [_t_a_r_g_e_t]
486: Same as the cc command, except that make is ex-
487: ecuted.
488:
489: mmaapp[!] _k_e_y _m_a_p_p_e_d__t_o
490: Remap key to mapped_to. Normally, remapping applies
491: just to visual-command mode; `!' tells elvis to
492: remap the key under all modes. With no arguments,
493: show all current key mappings.
494:
495: [_l_i_n_e] mmaarrkk _x
496: Set a mark on line, and name it x.
497:
498: mmkkeexxrrcc
499: Save current configuration into file ./.exrc, which
500: will be read next time you invoke elvis.
501:
502: [_l_i_n_e][,_l_i_n_e] mmoovvee _t_a_r_g_e_t_l_i_n_e
503: Move the range of lines to after targetline.
504:
505: nneexxtt[!] [_f_i_l_e_s]
506: Switch to the next file on the elvis command line.
507:
508: NNeexxtt[!]
509: Switch to the preceeding file on the elvis command
510: line.
511:
512: [_l_i_n_e][,_l_i_n_e] nnuummbbeerr
513: Display the range of lines, with line numbers.
514:
515: pprreevviioouuss[!]
516: Switch to the preceeding file on the elvis command
517: line.
518:
519: [_l_i_n_e][,_l_i_n_e] pprriinntt
520: Display the specified range of lines.
521:
522: [_l_i_n_e] ppuutt [``_x]
523: Copy text from cut buffer x after the current line.
524:
525:
526: COHERENT Lexicon Page 8
527:
528:
529:
530:
531: elvis Command elvis
532:
533:
534:
535:
536: qquuiitt[!]
537: Quit elvis, and return to the shell.
538:
539: [_l_i_n_e] rreeaadd _f_i_l_e
540: Read the contents of file and insert them after line
541: (default, the last line).
542:
543: rreewwiinndd[!]
544: Switch to the first file on the elvis command line.
545:
546: sseett [_o_p_t_i_o_n_s]
547: Set an elvis option. With no arguments, list cur-
548: rent settings for all options.
549:
550: sshheellll Invoke a shell.
551:
552: ssoouurrccee _f_i_l_e
553: Read a set of colon-mode commands from file, and ex-
554: ecute them.
555:
556: [_l_i_n_e][,_l_i_n_e] ssuubbssttiittuuttee /_r_e_g_e_x_p/_r_e_p_l_a_c_e_m_e_n_t/[_p][_g][_c]
557: For the range of lines, replace the first instance
558: of regexp with replacement. p tells elvis to print
559: the _l_a_s_t line upon which a substitution was per-
560: formed. g means perform a global substitution,
561: i.e., replace all instances of regexp on each line
562: with replacement. c tells elvis to ask for confir-
563: mation before performing each substitution.
564:
565: ttaagg[!] _t_a_g_n_a_m_e
566: Find tagname in file tags, which records information
567: about all tags. If found, jump to the file and line
568: upon which the tag is set.
569:
570: [_l_i_n_e][,_l_i_n_e] ttoo _t_a_r_g_e_t_l_i_n_e
571: Copy the range of lines to after the targetline.
572:
573: uunnaabbbbrr _w_o_r_d
574: Unabbreviate word.
575:
576: uunnddoo
577: Undo the last editing command.
578:
579: uunnmmaapp[!] _k_e_y
580: Unmap key.
581:
582: vveerrssiioonn
583: Display the current version of elvis.
584:
585: [_l_i_n_e][,_l_i_n_e] vvgglloobbaall /_r_e_g_e_x_p/ _c_o_m_m_a_n_d
586: Search the range of lines for all lines that do not
587: contain the regular expression regexp, and execute
588: command upon each.
589:
590:
591:
592: COHERENT Lexicon Page 9
593:
594:
595:
596:
597: elvis Command elvis
598:
599:
600:
601: vviissuuaall
602: Enter visual-command mode.
603:
604: wwqq
605: Save the changed file, and exit.
606:
607: [_l_i_n_e][,_l_i_n_e] wwrriittee[!] [[>>]_f_i_l_e]
608: Write the file being edited into file. With the >>
609: argument, append the edited text onto the end of
610: file.
611:
612: xxiitt[!]
613: Same as the wq command, described above, except that
614: it does not write files that have not changed.
615:
616: [_l_i_n_e][,_l_i_n_e] yyaannkk [``_x]
617: Copy the range of lines into cut buffer x.
618:
619: [_l_i_n_e][,_l_i_n_e] ! _c_o_m_m_a_n_d
620: Execute command under a subshell, then return.
621:
622: [_l_i_n_e][,_l_i_n_e] <
623: Shift the range of lines left by one tabwidth.
624:
625: [_l_i_n_e][,_l_i_n_e] =
626: With no range of lines specified, print the number
627: of the current line. With line arguments, print the
628: endpoints of the lines in question, and the number
629: of lines that lie between them. (Remember, line can
630: be a regular expression as well as a number.)
631:
632: [_l_i_n_e][,_l_i_n_e] >
633: Shift the range of lines right by one tabwidth.
634:
635: [_l_i_n_e][,_l_i_n_e] &
636: Repeat the last substitution command.
637:
638: @ xx
639: Read the contents of cut-buffer x as a set of colon-
640: mode commands, and execute them.
641:
642: ***** Input Mode Commands ***** Most keystrokes are interpreted
643: as being text and inserted directly into the text; however, some
644: keystrokes are still interpreted as commands. Thus, you can per-
645: form an entire session of simple editing directly within input
646: mode without switching to either of the command modes.
647:
648: The following summarizes the commands that can be executed
649: directly within input mode:
650:
651: <ccttrrll-AA> Insert a copy of the last input text.
652:
653: <ccttrrll-DD> Delete one indent character.
654:
655:
656:
657:
658: COHERENT Lexicon Page 10
659:
660:
661:
662:
663: elvis Command elvis
664:
665:
666:
667: <ccttrrll-HH> Erase the character before the cursor.
668:
669: <ccttrrll-LL> Redraw the screen.
670:
671: <ccttrrll-MM> Insert a newline.
672:
673: <ccttrrll-PP> Insert the contents of the cut buffer.
674:
675: <ccttrrll-RR> Redraw the screen, like <ccttrrll-LL>.
676:
677: <ccttrrll-TT> Insert an indent character.
678:
679: <ccttrrll-UU> Move to the beginning of the line.
680:
681: <ccttrrll-VV> Insert the following keystroke, even if special.
682:
683: <ccttrrll-WW> Backspace to the beginning of the current word.
684:
685: <ccttrrll-ZZ><ccttrrll-ZZ>
686: Write the file and exit elvis.
687:
688: <eesscc> Shift from input mode to visual-command mode.
689:
690: <ddeell> Delete the current character.
691:
692: ***** Command-line Options ***** elvis lets you name up to 27
693: files on the command line, thus allowing you to edit up to 27
694: files simultaneously. The ``next file'' and ``previous file''
695: commands described above allow you to shift from one file to
696: another during the same editing session; in this way, for ex-
697: ample, you can cut text from one file and paste it into another.
698:
699: elvis recognizes the following command-line options:
700:
701: -rr Recover a previous edit. Because elvis uses the program
702: vviirreecc for file recovery, invoking it with this option simply
703: prints a message that tells you to run virec.
704:
705: -RR Invoke elvis in ``read-only'' mode. This is equivalent to
706: invoking elvis via the link view.
707:
708: -tt _t_a_g
709: Begin editing at tag.
710:
711: -mm [ _f_i_l_e ]
712: Invoke elvis in error-handling mode. It searches through
713: _f_i_l_e for something that looks like an error message from a
714: compiler, then positions the cursor at that point for
715: editing.
716:
717: -ee Begin in colon-command mode.
718:
719: -vv Begin in visual-command mode.
720:
721:
722:
723:
724: COHERENT Lexicon Page 11
725:
726:
727:
728:
729: elvis Command elvis
730:
731:
732:
733: -ii Begin in input mode.
734:
735: +_c_o_m_m_a_n_d
736: Execute command immediately upon beginning editing. For ex-
737: ample
738:
739: elvis +237 foo
740:
741: causes _e_l_v_i_s to move directly to line 237 immediately upon
742: beginning to edit file foo.
743:
744: ***** Files *****
745:
746: /ttmmpp/eellvv* -- Temporary files
747:
748: ***** See Also *****
749:
750: commands, ed, ex, me, vi, view
751:
752: ***** Notes *****
753:
754: Full documentation for elvis is included with this release in
755: compressed file /usr/src/alien/Elvis.doc.Z.
756:
757: elvis is a public-domain program written by Steve Kirkendall
758: ([email protected] or ...uunet!tektronix!psueea!eecs!kirkenda),
759: assisted by numerous volunteers. Source code for it is available
760: through the Mark Williams bulletin board, USENET and numerous
761: other outlets.
762:
763: elvis is distributed as a service to COHERENT customers, as is.
764: It is not supported by Mark Williams Company. Caveat utilitor.
765:
766:
767:
768:
769:
770:
771:
772:
773:
774:
775:
776:
777:
778:
779:
780:
781:
782:
783:
784:
785:
786:
787:
788:
789:
790: COHERENT Lexicon Page 12
791:
792:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.