|
|
1.1 root 1: Info file vip, produced by texinfo-format-buffer -*-Text-*-
2: from file vip.texinfo
3:
4:
5:
6: Distribution
7: ************
8:
9: Copyright (C) 1987 Masahiko Sato.
10:
11: Permission is granted to make and distribute verbatim copies of
12: this manual provided the copyright notice and this permission notice
13: are preserved on all copies.
14:
15: Permission is granted to copy and distribute modified versions of this
16: manual under the conditions for verbatim copying, provided that the entire
17: resulting derived work is distributed under the terms of a permission
18: notice identical to this one.
19:
20: Permission is granted to copy and distribute translations of this manual
21: into another language, under the same conditions as for modified versions.
22:
23:
24:
25: File: vip Node: Top, Up: (DIR), Next: Survey
26:
27: VIP
28: ***
29:
30: VIP is a Vi emulating package written in Emacs Lisp. VIP implements most
31: Vi commands including Ex commands. It is therefore hoped that this package
32: will enable you to do Vi style editing under the powerful GNU Emacs
33: environment. This info file describes the usage of VIP assuming that you
34: are fairly accustomed to Vi but not so much with Emacs. Also we will
35: concentrate mainly on differences from Vi, especially features unique to
36: VIP.
37:
38: It is recommended that you read nodes on survey and on customization before
39: you start using VIP. Other nodes may be visited as needed.
40:
41: Comments and bug reports are welcome. Please send messages to
42: `[email protected]' if you are outside of Japan and to
43: `[email protected]' if you are in Japan.
44:
45:
46: * Menu:
47:
48: * Survey:: A survey of VIP.
49: * Vi Commands:: Details of Vi commands.
50: * Ex Commands:: Details of Ex commands.
51: * Customization:: How to customize VIP.
52:
53:
54: File: vip Node: Survey, Prev: Top, Up: Top, Next: Basic Concepts
55:
56: A Survey of VIP
57: ***************
58:
59: In this chapter we describe basics of VIP with emphasis on the features not
60: found in Vi and on how to use VIP under GNU Emacs.
61:
62: * Menu:
63:
64: * Basic Concepts:: Basic concepts in Emacs.
65: * Loading VIP:: How to load VIP automatically.
66: * Modes in VIP:: VIP has three modes, which are orthogonal to modes
67: in Emacs.
68: * Differences from Vi:: Differences of VIP from Vi is explained.
69:
70:
71: File: vip Node: Basic Concepts, Prev: Survey, Up: Survey, Next: Loading VIP
72:
73: Basic Concepts
74: ==============
75:
76: We begin by explaining some basic concepts of Emacs. These concepts are
77: explained in more detail in the GNU Emacs Manual.
78:
79:
80: Conceptually, a "buffer" is just a string of ASCII characters and two
81: special characters PNT ("point") and MRK ("mark") such that the character
82: PNT occurs exactly once and MRK occurs at most once. The "text" of a
83: buffer is obtained by deleting the occurrences of PNT and MRK. If, in a
84: buffer, there is a character following PNT then we say that point is
85: "looking at" the character; otherwise we say that point is "at the end of
86: buffer". PNT and MRK are used to indicate positions in a buffer and they
87: are not part of the text of the buffer. If a buffer contains a MRK then
88: the text between MRK and PNT is called the "region" of the buffer.
89:
90:
91: Emacs provides (multiple) "windows" on the screen, and you can see the
92: content of a buffer through the window associated with the buffer. The
93: cursor of the screen is always positioned on the character after PNT.
94:
95:
96:
97: A "keymap" is a table that records the bindings between characters and
98: command functions. There is the "global keymap" common to all the buffers.
99: Each buffer has its "local keymap" that determines the "mode" of the
100: buffer. Local keymap overrides global keymap, so that if a function is
101: bound to some key in the local keymap then that function will be executed
102: when you type the key. If no function is bound to a key in the local map,
103: however, the function bound to the key in the global map becomes in effect.
104:
105:
106: File: vip Node: Loading VIP, Prev: Basic Concepts, Up: Survey, Next: Modes in VIP
107:
108: Loading VIP
109: ===========
110:
111: The recommended way to load VIP automatically is to include the line:
112: (load "vip")
113: in your `.emacs' file. The `.emacs' file is placed in your home
114: directly and it will be executed every time you invoke Emacs. If you wish
115: to be in vi mode whenver Emacs starts up, you can include the following
116: line in your `.emacs' file instead of the above line:
117: (setq term-setup-hook 'vip-mode)
118: (*Note Vi Mode::, for the explanation of vi mode.)
119:
120: Even if your `.emacs' file does not contain any of the above lines,
121: you can load VIP and enter vi mode by typing the following from within
122: Emacs.
123: M-x vip-mode
124:
125:
126: File: vip Node: Modes in VIP, Prev: Loading VIP, Up: Survey, Next: Emacs Mode
127:
128: Modes in VIP
129: ============
130:
131:
132: Loading VIP has the effect of globally binding `C-z' (`Control-z') to the
133: function `vip-change-mode-to-vi'. The default binding of `C-z' in GNU Emacs
134: is `suspend-emacs', but, you can also call `suspend-emacs' by typing `C-x
135: C-z'. Other than this, all the key bindings of Emacs remain the same after
136: loading VIP.
137:
138:
139: Now, if you hit `C-z', the function `vip-change-mode-to-vi' will be called
140: and you will be in "vi mode". (Some major modes may locally bind `C-z' to
141: some special functions. In such cases, you can call
142: `vip-change-mode-to-vi' by `execute-extended-command' which is invoked by
143: `M-x'. Here `M-x' means `Meta-x', and if your terminal does not have a
144: META key you can enter it by typing `ESC x'. The same effect can also be
145: achieve by typing `M-x vip-mode'.)
146:
147:
148: You can observe the change of mode by looking at the "mode line". For
149: instance, if the mode line is:
150: -----Emacs: *scratch* (Lisp Interaction)----All------------
151: then it will change to:
152: -----Vi: *scratch* (Lisp Interaction)----All------------
153: Thus the word `Emacs' in the mode line will change to `Vi'.
154:
155:
156: You can go back to the original "emacs mode" by typing `C-z' in vi mode.
157: Thus `C-z' toggles between these two modes.
158:
159: Note that modes in VIP exist orthogonally to modes in Emacs. This means
160: that you can be in vi mode and at the same time, say, shell mode.
161:
162: Vi mode corresponds to Vi's command mode. From vi mode you can enter
163: "insert mode" (which corresponds to Vi's insert mode) by usual Vi command
164: keys like `i', `a', `o' ... etc.
165:
166: In insert mode, the mode line will look like this:
167: -----Insert *scratch* (Lisp Interaction)----All------------
168: You can exit from insert mode by hitting ESC key as you do in Vi.
169:
170: That VIP has three modes may seem very complicated, but in fact it is not
171: so. VIP is implemented so that you can do most editing remaining only
172: in the two modes for Vi (that is vi mode and insert mode).
173:
174:
175: The figure below shows the transition of three modes in VIP.
176:
177:
178: === C-z ==> == i,o ... ==>
179: emacs mode vi mode insert mode
180: <== X-z === <=== ESC ====
181:
182: * Menu:
183:
184: * Emacs Mode:: This is the mode you should know better.
185: * Vi Mode:: Vi commands are executed in this mode.
186: * Insert Mode:: You can enter text, and also can do editing if you
187: know enough Emacs commands.
188:
189:
190: File: vip Node: Emacs Mode, Prev: Modes in VIP, Up: Modes in VIP, Next: Vi Mode
191:
192: Emacs Mode
193: ----------
194:
195:
196: You will be in this mode just after you loaded VIP. You can do all normal
197: Emacs editing in this mode. Note that the key `C-z' is globally bound to
198: `vip-change-mode-to-vi'. So, if you type `C-z' in this mode then you will
199: be in vi mode.
200:
201:
202: File: vip Node: Vi Mode, Prev: Emacs Mode, Up: Modes in VIP, Next: Insert Mode
203:
204: Vi Mode
205: -------
206:
207: This mode corresponds to Vi's command mode. Most Vi commands work as they
208: do in Vi. You can go back to emacs mode by typing `C-z'. You can
209: enter insert mode, just as in Vi, by typing `i', `a' etc.
210:
211:
212: File: vip Node: Insert Mode, Prev: Vi Mode, Up: Modes in VIP, Next: Differences from Vi
213:
214: Insert Mode
215: -----------
216:
217: The key bindings in this mode is the same as in the emacs mode except for
218: the following 4 keys. So, you can move around in the buffer and change
219: its content while you are in insert mode.
220:
221: `ESC'
222: This key will take you back to vi mode.
223: `C-h'
224: Delete previous character.
225: `C-w'
226: Delete previous word.
227: `C-z'
228: Typing this key has the same effect as typing ESC in emacs mode.
229: Thus typing `C-z x' in insert mode will have the same effect as typing
230: `ESC x' in emacs mode.
231:
232:
233: File: vip Node: Differences from Vi, Prev: Insert Mode, Up: Survey, Next: Undoing
234:
235: Differences from Vi
236: ===================
237:
238: The major differences from Vi are explained below.
239:
240: * Menu:
241:
242: * Undoing:: You can undo more in VIP.
243: * Changing:: Commands for changing the text.
244: * Searching:: Search commands.
245: * z Command:: You can now use zH, zM and zL as well as z- etc.
246: * Counts:: Some Vi commands which do not accept a count now
247: accept one.
248: * Marking:: You can now mark the current point, beginning of
249: the buffer etc.
250: * Region Commands:: You can now give a region as an argument for delete
251: commands etc.
252: * New Commands:: Some new commands not available in Vi are added.
253: * New Bindings:: Bindings of some keys are changed for the
254: convenience of editing under Emacs.
255: * Window Commands:: Commands for moving among windows etc.
256: * Buffer Commands:: Commands for selecting buffers etc.
257: * File Commands:: Commands for visiting files etc.
258: * Misc Commands:: Other useful commands.
259:
260:
261: File: vip Node: Undoing, Prev: Differences from Vi, Up: Differences from Vi, Next: Changing
262:
263: Undoing
264: -------
265:
266:
267: You can repeat undoing by the `.' key. So, `u' will undo a single change,
268: while `u . . .', for instance, will undo 4 previous changes. Undo is
269: undoable as in Vi. So the content of the buffer will be the same before
270: and after `u u'.
271:
272:
273: File: vip Node: Changing, Prev: Undoing, Up: Differences from Vi, Next: Searching
274:
275: Changing
276: --------
277:
278: Some commands which change a small number of characters are executed
279: slightly differently. Thus, if point is at the beginning of a word `foo'
280: and you wished to change it to `bar' by typing `c w', then VIP will prompt
281: you for a new word in the minibuffer by the prompt `foo => '. You can then
282: enter `bar' followed by RET or ESC to complete the command. Before you
283: enter RET or ESC you can abort the command by typing `C-g'. In general,
284: you can abort a partially formed command by typing `C-g'.
285:
286:
287: File: vip Node: Searching, Prev: Changing, Up: Differences from Vi, Next: z Command
288:
289: Searching
290: ---------
291:
292:
293: As in Vi, searching is done by `/' and `?'. The string will be searched
294: literally by default. To invoke a regular expression search, first execute
295: the search command `/' (or `?') with empty search string. (I.e, type `/'
296: followed by RET.) A search for empty string will toggle the search mode
297: between vanilla search and regular expression search. You cannot give an
298: offset to the search string. (It is a limitation.) By default, search
299: will wrap around the buffer as in Vi. You can change this by rebinding the
300: variable `vip-search-wrap-around'. *Note Customization::, for how to do
301: this.
302:
303:
304: File: vip Node: z Command, Prev: Searching, Up: Differences from Vi, Next: Counts
305:
306: z Command
307: ---------
308:
309:
310: For those of you who cannot remember which of `z' followed by RET, `.' and
311: `-' do what. You can also use `z' followed by `H', `M' and `L' to place
312: the current line in the Home (Middle, and Last) line of the window.
313:
314:
315: File: vip Node: Counts, Prev: z Command, Up: Differences from Vi, Next: Marking
316:
317: Counts
318: ------
319:
320: Some Vi commands which do not accept a count now accept one
321:
322: `p'
323: `P'
324: Given counts, text will be yanked (in Vi's sense) that many times. Thus
325: `3 p' is the same as `p p p'.
326: `o'
327: `O'
328: Given counts, that many copies of text will be inserted. Thus
329: `o a b c ESC' will insert 3 lines of `abc' below the current
330: line.
331: `/'
332: `?'
333: Given a count N, N-th occurrence will be searched.
334:
335:
336: File: vip Node: Marking, Prev: Counts, Up: Differences from Vi, Next: Region Commands
337:
338: Marking
339: -------
340:
341: Typing an `m' followed by a lower case character CH marks the
342: point to the register named CH as in Vi. In addition to these, we
343: have following key bindings for marking.
344:
345:
346: `m <'
347: Set mark at the beginning of buffer.
348: `m >'
349: Set mark at the end of buffer.
350: `m .'
351: Set mark at point (and push old mark on mark ring).
352: `m ,'
353: Jump to mark (and pop mark off the mark ring).
354:
355:
356: File: vip Node: Region Commands, Prev: Marking, Up: Differences from Vi, Next: New Commands
357:
358: Region Commands
359: ---------------
360:
361:
362: Vi operators like `d', `c' etc. are usually used in combination with motion
363: commands. It is now possible to use current region as the argument to
364: these operators. (A "region" is a part of buffer delimited by point and
365: mark.) The key `r' is used for this purpose. Thus `d r' will delete the
366: current region. If `R' is used instead of `r' the region will first be
367: enlarged so that it will become the smallest region containing the original
368: region and consisting of whole lines. Thus `m . d R' will have the same
369: effect as `d d'.
370:
371:
372: File: vip Node: New Commands, Prev: Region Commands, Up: Differences from Vi, Next: New Bindings
373:
374: Some New Commands
375: -----------------
376:
377: Note that the keys below (except for `R') are not used in Vi.
378:
379: `C-a'
380: Move point to the beginning of line.
381: `C-n'
382: If you have two or more windows in the screen, this key will move point to
383: the next window.
384: `C-o'
385: Insert a newline and leave point before it, and then enter insert mode.
386: `C-r'
387: Backward incremental search.
388: `C-s'
389: Forward incremental search.
390: `C-c'
391: `C-x'
392: `ESC'
393: These keys will exit from vi mode and return to emacs mode temporarily. If
394: you hit one of these keys, Emacs will be in emacs mode and will believe
395: that you hit that key in emacs mode. For example, if you hit `C-x'
396: followed by `2', then the current window will be split into 2 and you
397: will be in vi mode again.
398: `\'
399: Escape to emacs mode. Hitting `\' will take you to emacs mode, and
400: you can execute a single Emacs command. After executing the Emacs
401: command you will be in vi mode again. You can give a count before
402: typing `\'. Thus `5 \ *', as well as `\ C-u 5 *', will insert `*****'
403: before point. Similarly `1 0 \ C-p' will move the point 10 lines
404: above the current line.
405: `K'
406: Kill current buffer if it is not modified. Useful when you selected a
407: buffer which you did not want.
408: `Q'
409: `R'
410: `Q' is for query replace and `R' is for replace. By default,
411: string to be replaced are treated literally. If you wish to do a regular
412: expression replace, first do replace with empty string as the string to be
413: replaced. In this way, you can toggle between vanilla and regular
414: expression replacement.
415: `v'
416: `V'
417: These keys are used to Visit files. `v' will switch to a buffer
418: visiting file whose name can be entered in the minibuffer. `V' is
419: similar, but will use window different from the current window.
420: `#'
421: If followed by a certain character CH, it becomes an operator whose
422: argument is the region determined by the motion command that follows.
423: Currently, CH can be one of `c', `C', `g', `q' and `s'.
424: `# c'
425: Change upper case characters in the region to lower case
426: (`downcase-region').
427: `# C'
428: Change lower case characters in the region to upper case. For instance,
429: `# C 3 w' will capitalize 3 words from the current point
430: (`upcase-region').
431: `# g'
432: Execute last keyboard macro for each line in the region
433: (`vip-global-execute').
434: `# q'
435: Insert specified string at the beginning of each line in the region
436: (`vip-quote-region').
437: `# s'
438: Check spelling of words in the region (`spell-region').
439: `*'
440: Call last keyboard macro.
441:
442:
443: File: vip Node: New Bindings, Prev: New Commands, Up: Differences from Vi, Next: Window Commands
444:
445: New Key Bindings
446: ----------------
447:
448: In VIP the meanings of some keys are entirely different from Vi. These key
449: bindings are done deliberately in the hope that editing under Emacs will
450: become easier. It is however possible to rebind these keys to functions
451: which behave similarly as in Vi. *Note Customizing Key Bindings::, for
452: details.
453:
454: `C-g'
455: `g'
456: In Vi, `C-g' is used to get information about the file associated to
457: the current buffer. Here, `g' will do that, and `C-g' is
458: used to abort a command (this is for compatibility with emacs mode.)
459: `SPC'
460: `RET'
461: Now these keys will scroll up and down the text of current window.
462: Convenient for viewing the text.
463: `s'
464: `S'
465: They are used to switch to a specified buffer. Useful for switching to
466: already existing buffer since buffer name completion is provided. Also
467: a default buffer will be given as part of the prompt, to which you can
468: switch by just typing RET key. `s' is used to select buffer
469: in the current window, while `S' selects buffer in another window.
470: `C'
471: `X'
472: These keys will exit from vi mode and return to emacs mode
473: temporarily. If you type `C' (`X'), Emacs will be in emacs mode and
474: will believe that you have typed `C-c' (`C-x', resp.) in emacs mode.
475: Moreover, if the following character you type is an upper case letter,
476: then Emacs will believe that you have typed the corresponding control
477: character. You will be in vi mode again after the command is
478: executed. For example, typing `X S' in vi mode is the same as typing
479: `C-x C-s' in emacs mode. You get the same effect by typing `C-x C-s'
480: in vi mode, but the idea here is that you can execute useful Emacs
481: commands without typing control characters. For example, if you hit
482: `X' (or `C-x') followed by `2', then the current window will be split
483: into 2 and you will be in vi mode again.
484:
485: In addition to these, `ctl-x-map' is slightly modified:
486:
487:
488: `X 3'
489: `C-x 3'
490: This is equivalent to `C-x 1 C-x 2' (1 + 2 = 3).
491:
492:
493: File: vip Node: Window Commands, Prev: New Bindings, Up: Differences from Vi, Next: Buffer Commands
494:
495: Window Commands
496: ---------------
497:
498: In this and following subsections, we give a summary of key bindings for
499: basic functions related to windows, buffers and files.
500:
501: `C-n'
502: Switch to next window.
503: `X 1'
504: `C-x 1'
505: Delete other windows.
506: `X 2'
507: `C-x 2'
508: Split current window into two windows.
509: `X 3'
510: `C-x 3'
511: Show current buffer in two windows.
512:
513:
514: File: vip Node: Buffer Commands, Prev: Window Commands, Up: Differences from Vi, Next: File Commands
515:
516: Buffer Commands
517: ---------------
518:
519: `s'
520: Switch to the specified buffer in the current window
521: (`vip-switch-to-buffer').
522: `S'
523: Switch to the specified buffer in another window
524: (`vip-switch-to-buffer-other-window').
525: `K'
526: Kill the current buffer if it is not modified.
527: `X S'
528: `C-x C-s'
529: Save the current buffer in the file associated to the buffer.
530:
531:
532: File: vip Node: File Commands, Prev: Buffer Commands, Up: Differences from Vi, Next: Misc Commands
533:
534: File Commands
535: -------------
536:
537: `v'
538: Visit specified file in the current window.
539: `V'
540: Visit specified file in another window.
541: `X W'
542: `C-x C-w'
543: Write current buffer into the specified file.
544: `X I'
545: `C-x C-i'
546:
547: Insert specified file at point.
548:
549:
550: File: vip Node: Misc Commands, Prev: File Commands, Up: Differences from Vi, Next: Vi Commands
551:
552: Miscellaneous Commands
553: ----------------------
554:
555: `X ('
556: `C-x ('
557: Start remembering keyboard macro.
558: `X )'
559: `C-x )'
560: Finish remembering keyboard macro.
561: `*'
562: Call last remembered keyboard macro.
563: `X Z'
564: `C-x C-z'
565: Suspend Emacs.
566: `Z Z'
567: Exit Emacs.
568: `Q'
569: Query replace.
570: `R'
571: Replace.
572:
573:
574: File: vip Node: Vi Commands, Prev: Misc Commands, Up: Top, Next: Numeric Arguments
575:
576: Vi Commands
577: ***********
578:
579: This chapter describes Vi commands other than Ex commands implemented in
580: VIP. Except for the last section which discusses insert mode, all the
581: commands described in this chapter are to be used in vi mode.
582:
583: * Menu:
584:
585: * Numeric Arguments:: Many commands accept numeric arguments
586: * Important Keys:: Some very important keys.
587: * Buffers and Windows:: Commands for handling buffers and windows.
588: * Files:: Commands for handling files.
589: * Viewing the Buffer:: How you can view the current buffer.
590: * Mark Commands:: Marking positions in a buffer.
591: * Motion Commands:: Commands for moving point.
592: * Modifying Commands:: Commands for modifying the buffer.
593:
594:
595: File: vip Node: Numeric Arguments, Prev: Vi Commands, Up: Vi Commands, Next: Important Keys
596:
597: Numeric Arguments
598: =================
599:
600:
601: Most Vi commands accept a "numeric argument" which can be supplied as a
602: prefix to the commands. A numeric argument is also called a "count". In
603: many cases, if a count is given, the command is executed that many times.
604: For instance, `5 d d' deletes 5 lines while simple `d d' deletes a line.
605: In this manual the metavariable N will denote a count.
606:
607:
608: File: vip Node: Important Keys, Prev: Numeric Arguments, Up: Vi Commands, Next: Buffers and Windows
609:
610: Important Keys
611: ==============
612:
613: The keys `C-g' and `C-l' are unique in that their associated
614: functions are the same in any of emacs, vi and insert mode.
615:
616: `C-g'
617: Quit. Cancel running or partially typed command (`keyboard-quit').
618: `C-l'
619: Clear the screen and reprint everything (`recenter').
620:
621: In Emacs many commands are bound to the key strokes that start with `C-x',
622: `C-c' and ESC. These commands can be accessed from vi mode as easily as
623: from emacs mode.
624:
625: `C-x'
626: `C-c'
627: `ESC'
628: Typing one of these keys have the same effect as typing it in emacs mode.
629: Appropriate command will be executed according as the keys you type after
630: it. You will be in vi mode again after the execution of the command.
631: For instance, if you type `ESC <' (in vi mode) then the cursor will
632: move to the beginning of the buffer and you will still be in vi mode.
633: `C'
634: `X'
635: Typing one of these keys have the effect of typing the corresponding
636: control character in emacs mode. Moreover, if you type an upper case
637: character following it, that character will also be translated to the
638: corresponding control character. Thus typing `X W' in vi mode is the
639: same as typing `C-x C-w' in emacs mode. You will be in vi mode again
640: after the execution of a command.
641: `\'
642: Escape to emacs mode. Hitting the `\' key will take you to emacs
643: mode, and you can execute a single Emacs command. After executing the
644: Emacs command you will be in vi mode again. You can give a count
645: before typing `\'. Thus `5 \ +', as well as `\ C-u 5 +', will insert
646: `+++++' before point.
647:
648:
649: File: vip Node: Buffers and Windows, Prev: Important Keys, Up: Vi Commands, Next: Files
650:
651: Buffers and Windows
652: ===================
653:
654:
655: In Emacs the text you edit is stored in a "buffer". See GNU Emacs Manual,
656: for details. There is always one "selected" buffer which is called the
657: "current buffer".
658:
659:
660: You can see the contents of buffers through "windows" created by Emacs.
661: When you have multiple windows on the screen only one of them is selected.
662: Each buffer has a unique name, and each window has a mode line which shows
663: the name of the buffer associated with the window and other information
664: about the status of the buffer. You can change the format of the mode
665: line, but normally if you see `**' at the beginning of a mode line it
666: means that the buffer is "modified". If you write out the content of
667: the buffer to a file, then the buffer will become not modified. Also if
668: you see `%%' at the beginning of the mode line, it means that the file
669: associated with the buffer is write protected.
670:
671: We have the following commands related to windows and buffers.
672:
673: `C-n'
674: Move cursor to the next-window (`vip-next-window').
675: `X 1'
676: Delete other windows and make the selected window fill the screen
677: (`delete-other-windows').
678: `X 2'
679: Split current window into two windows (`split-window-vertically').
680: `X 3'
681: Show current buffer in two windows.
682: `s BUFFER RET'
683: Select or create a buffer named BUFFER (`vip-switch-to-buffer').
684: `S BUFFER RET'
685: Similar but select a buffer named BUFFER in another window
686: (`vip-switch-to-buffer-other-window').
687: `K'
688: Kill the current buffer if it is not modified or if it is not associated
689: with a file (`vip-kill-buffer').
690: `X B'
691: List the existing buffers (`list-buffers').
692:
693:
694: As "buffer name completion" is provided, you have only to type in
695: initial substring of the buffer name which is sufficient to identify it
696: among names of existing buffers. After that, if you hit TAB the rest
697: of the buffer name will be supplied by the system, and you can confirm it
698: by RET. The default buffer name to switch to will also be prompted,
699: and you can select it by giving a simple RET. See GNU Emacs Manual
700: for details of completion.
701:
702:
703: File: vip Node: Files, Prev: Buffers and Windows, Up: Vi Commands, Next: Viewing the Buffer
704:
705: Files
706: =====
707:
708: We have the following commands related to files. They are used to visit,
709: save and insert files.
710:
711: `v FILE RET'
712: Visit specified file in the current window (`vip-find-file').
713: `V FILE RET'
714: Visit specified file in another window (`vip-find-file-other-window').
715: `X S'
716: Save current buffer to the file associated with the buffer. If no file is
717: associated with the buffer, the name of the file to write out the content
718: of the buffer will be asked in the minibuffer.
719: `X W FILE RET'
720: Write current buffer into a specified file.
721: `X I FILE RET'
722: Insert a specified file at point.
723: `g'
724: Give information on the file associated with the current buffer. Tell you
725: the name of the file associated with the buffer, the line number of the
726: current point and total line numbers in the buffer. If no file is
727: associated with the buffer, this fact will be indicated by the null file
728: name `""'.
729:
730:
731: In Emacs, you can edit a file by "visiting" it. If you wish to visit a
732: file in the current window, you can just type `v'. Emacs maintains the
733: "default directory" which is specific to each buffer. Suppose, for
734: instance, that the default directory of the current buffer is
735: `/usr/masahiko/lisp/'. Then you will get the following prompt in the
736: minibuffer.
737: visit file: /usr/masahiko/lisp/
738: If you wish to visit, say, `vip.el' in this directory, then you can
739: just type `vip.el' followed by RET. If the file `vip.el'
740: already exists in the directory, Emacs will visit that file, and if not,
741: the file will be created. Emacs will use the file name (`vip.el', in
742: this case) as the name of the buffer visiting the file. In order to make
743: the buffer name unique, Emacs may append `<2>', `<3>' etc., to
744: the buffer name. As the "file name completion" is provided here, you
745: can sometime save typing. For instance, suppose there is only one file in the
746: default directory whose name starts with `v', that is `vip.el'.
747: Then if you just type `v TAB' then it will be completed to
748: `vip.el'. Thus, in this case, you just have to type `v v TAB
749: RET' to visit `/usr/masahiko/lisp/vip.el'. Continuing the
750: example, let us now suppose that you wished to visit the file
751: `/usr/masahiko/man/vip.texinfo'. Then to the same prompt which you get
752: after you typed `v', you can enter `/usr/masahiko/man/vip.texinfo' or
753: `../man/vip.texinfo' followed by RET.
754:
755: Use `V' instead of `v', if you wish to visit a file in another
756: window.
757:
758: You can verify which file you are editing by typing `g'. (You can also
759: type `X B' to get nformation on other buffers too.) If you type `g' you
760: will get an information like below in the echo area:
761: "/usr/masahiko/man/vip.texinfo" line 921 of 1949
762:
763: After you edited the buffer (`vip.texinfo', in our example) for a while,
764: you may wish to save it in a file. If you wish to save it in the file
765: associated with the buffer (`/usr/masahiko/man/vip.texinfo', in this case),
766: you can just say `X S'. If you wish to save it in another file, you can
767: type `X W'. You will then get a similar prompt as you get for `v', to
768: which you can enter the file name.
769:
770:
771: File: vip Node: Viewing the Buffer, Prev: Files, Up: Vi Commands, Next: Mark Commands
772:
773: Viewing the Buffer
774: ==================
775:
776: In this and next section we discuss commands for moving around in the
777: buffer. These command do not change the content of the buffer. The
778: following commands are useful for viewing the content of the current
779: buffer.
780:
781: `SPC'
782: `C-f'
783: Scroll text of current window upward almost full screen. You can go
784: forward in the buffer by this command (`vip-scroll').
785: `RET'
786: `C-b'
787: Scroll text of current window downward almost full screen. You can go
788: backward in the buffer by this command (`vip-scroll-back').
789: `C-d'
790: Scroll text of current window upward half screen. You can go
791: down in the buffer by this command (`vip-scroll-down').
792: `C-u'
793: Scroll text of current window downward half screen. You can go
794: up in the buffer by this command (`vip-scroll-up').
795: `C-y'
796: Scroll text of current window upward by one line (`vip-scroll-down-one').
797: `C-e'
798: Scroll text of current window downward by one line (`vip-scroll-up-one').
799: You can repeat these commands by giving a count. Thus, `2 SPC'
800: has the same effect as `SPC SPC'.
801:
802: The following commands reposition point in the window.
803:
804: `z H'
805: `z RET'
806: Put point on the top (home) line in the window. So the current line
807: becomes the top line in the window. Given a count N, point will be
808: placed in the N-th line from top (`vip-line-to-top').
809: `z M'
810: `z .'
811: Put point on the middle line in the window. Given a count N,
812: point will be placed in the N-th line from the middle line
813: (`vip-line-to-middle').
814: `z L'
815: `z -'
816: Put point on the bottom line in the window. Given a count N,
817: point will be placed in the N-th line from bottom
818: (`vip-line-to-bottom').
819: `C-l'
820: Center point in window and redisplay screen (`recenter').
821:
822:
823: File: vip Node: Mark Commands, Prev: Viewing the Buffer, Up: Vi Commands, Next: Motion Commands
824:
825: Mark Commands
826: =============
827:
828: The following commands are used to mark positions in the buffer.
829:
830: `m CH'
831: Store current point in the register CH. CH must be a lower
832: case character between `a' and `z'.
833: `m <'
834: Set mark at the beginning of current buffer.
835: `m >'
836: Set mark at the end of current buffer.
837: `m .'
838: Set mark at point.
839: `m ,'
840: Jump to mark (and pop mark off the mark ring).
841:
842:
843: Emacs uses the "mark ring" to store marked positions. The commands
844: `m <', `m >' and `m .' not only set mark but also add it as the
845: latest element of the mark ring (replacing the oldest one). By repeating
846: the command ``m ,'' you can visit older and older marked positions. You
847: will eventually be in a loop as the mark ring is a ring.
848:
849:
850: File: vip Node: Motion Commands, Prev: Mark Commands, Up: Vi Commands, Next: Searching and Replacing
851:
852: Motion Commands
853: ===============
854:
855: Commands for moving around in the current buffer are collected here. These
856: commands are used as an `argument' for the delete, change and yank commands
857: to be described in the next section.
858:
859: `h'
860: Move point backward by one character. Signal error if point is at the
861: beginning of buffer, but (unlike Vi) do not complain otherwise
862: (`vip-backward-char').
863: `l'
864: Move point backward by one character. Signal error if point is at the
865: end of buffer, but (unlike Vi) do not complain otherwise
866: (`vip-forward-char').
867: `j'
868: Move point to the next line keeping the current column. If point is on the
869: last line of the buffer, a new line will be created and point will move to
870: that line (`vip-next-line').
871: `k'
872: Move point to the previous line keeping the current column
873: (`vip-next-line').
874: `+'
875: Move point to the next line at the first non-white character. If point is
876: on the last line of the buffer, a new line will be created and point will
877: move to the beginning of that lin (`vip-next-line-at-bol').
878: `-'
879: Move point to the previous line at the first non-white character
880: (`vip-previous-line-at-bol').
881: If a count is given to these commands, the commands will be repeated that
882: many times.
883:
884: `0'
885: Move point to the beginning of line (`vip-beginning-of-line').
886: `^'
887: Move point to the first non-white character on the line
888: (`vip-bol-and-skip-white').
889: `$'
890: Move point to the end of line (`vip-goto-eol').
891: `N |'
892: Move point to the N-th column on the line (`vip-goto-col').
893: Except for the `|' command, these commands neglect a count.
894:
895:
896: `w'
897: Move point forward to the beginning of the next word
898: (`vip-forward-word').
899: `W'
900: Move point forward to the beginning of the next word, where a "word" is
901: considered as a sequence of non-white characters (`vip-forward-Word').
902: `b'
903: Move point backward to the beginning of a word (`vip-backward-word').
904: `B'
905: Move point backward to the beginning of a word, where a word is
906: considered as a sequence of non-white characters (`vip-forward-Word').
907: `e'
908: Move point forward to the end of a word (`vip-end-of-word').
909: `E'
910: Move point forward to the end of a word, where a word is
911: considered as a sequence of non-white characters (`vip-end-of-Word').
912: Here the meaning of the word `word' for the `w', `b' and `e'
913: commands is determined by the "syntax table" effective in the current
914: buffer. Each major mode has its syntax mode, and therefore the meaning of
915: a word also changes as the major mode changes. See GNU Emacs Manual for
916: details of syntax table.
917:
918: `H'
919: Move point to the beginning of the home (top) line of the window.
920: Given a count N, go to the N-th line from top
921: (`vip-window-top').
922: `M'
923: Move point to the beginning of the middle line of the window. Given
924: a count N, go to the N-th line from the middle line
925: (`vip-window-middle').
926: `L'
927: Move point to the beginning of the lowest (bottom) line of the
928: window. Given count, go to the N-th line from bottom
929: (`vip-window-bottom').
930: These commands can be used to go to the desired line visible on the screen.
931:
932: `('
933: Move point backward to the beginning of the sentence
934: (`vip-backward-sentence').
935: `)'
936: Move point forward to the end of the sentence
937: (`vip-forward-sentence').
938: `{'
939: Move point backward to the beginning of the paragraph
940: (`vip-backward-paragraph').
941: `}'
942: Move point forward to the end of the paragraph
943: (`vip-forward-paragraph').
944: A count repeats the effect for these commands.
945:
946: `G'
947: Given a count N, move point to the N-th line in the buffer on
948: the first non-white character. Without a count, go to the end of the buffer
949: (`vip-goto-line').
950: `` `'
951: Exchange point and mark (`vip-goto-mark').
952: `` CH'
953: Move point to the position stored in the register CH. CH must
954: be a lower case letter.
955: `' ''
956: Exchange point and mark, and then move point to the first non-white
957: character on the line (`vip-goto-mark-and-skip-white').
958: `' CH'
959: Move point to the position stored in the register CH and skip to the
960: first non-white character on the line. CH must be a lower case letter.
961: `%'
962: Move point to the matching parenthesis if point is looking at `(',
963: `)', `{', `}', `[' or `]'
964: (`vip-paren-match').
965: The command `G' mark point before move, so that you can return to the
966: original point by `` `'. The original point will also be stored in
967: the mark ring.
968:
969: The following commands are useful for moving points on the line. A count
970: will repeat the effect.
971:
972: `f CH'
973: Move point forward to the character CH on the line. Signal error if
974: CH could not be found (`vip-find-char-forward').
975: `F CH'
976: Move point backward to the character CH on the line. Signal error if
977: CH could not be found (`vip-find-char-backward').
978: `t CH'
979: Move point forward upto the character CH on the line. Signal error if
980: CH could not be found (`vip-goto-char-forward').
981: `T CH'
982: Move point backward upto the character CH on the line. Signal error if
983: CH could not be found (`vip-goto-char-backward').
984: `;'
985: Repeat previous `f', `t', `F' or `T' command
986: (`vip-repeat-find').
987: `,'
988: Repeat previous `f', `t', `F' or `T' command, in the
989: opposite direction (`vip-repeat-find-opposite').
990:
991:
992: File: vip Node: Searching and Replacing, Prev: Motion Commands, Up: Vi Commands, Next: Modifying Commands
993:
994: Searching and Replacing
995: =======================
996:
997: Following commands are available for searching and replacing.
998:
999:
1000: `/ STRING RET'
1001: Search the first occurrence of the string STRING forward starting
1002: from point. Given a count N, the N-th occurrence of
1003: STRING will be searched. If the variable `vip-re-search' has value
1004: `t' then "regular expression" search is done and the string
1005: matching the regular expression STRING is found. If you give an
1006: empty string as STRING then the search mode will change from vanilla
1007: search to regular expression search and vice versa
1008: (`vip-search-forward').
1009: `? STRING RET'
1010: Same as `/', except that search is done backward
1011: (`vip-search-backward').
1012: `n'
1013: Search the previous search pattern in the same direction as before
1014: (`vip-search-next').
1015: `N'
1016: Search the previous search pattern in the opposite direction
1017: (`vip-search-Next').
1018: `C-s'
1019: Search forward incrementally. See GNU Emacs Manual for details
1020: (`isearch-forward').
1021: `C-r'
1022: Search backward incrementally (`isearch-backward').
1023: `R STRING RET NEWSTRING'
1024: There are two modes of replacement, "vanilla" and "regular expression".
1025: If the mode is vanilla you will get a prompt `Replace string:',
1026: and if the mode is regular expression you will ge a prompt
1027: `Replace regexp:'. The mode is initially vanilla, but you can
1028: toggle these modes by giving a null string as STRING. If the mode is
1029: vanilla, this command replaces every occurrence of STRING with
1030: NEWSTRING. If the mode is regular expression, STRING is
1031: treated as a regular expression and every string matching the regular
1032: expression is replaced with NEWSTRING (`vip-replace-string').
1033: `Q STRING RET NEWSTRING'
1034: Same as `R' except that you will be asked form confirmation before each
1035: replacement
1036: (`vip-query-replace').
1037: `r CH'
1038: Replace the character point is looking at by the character CH. Give
1039: count, replace that many characters by CH (`vip-replace-char').
1040: The commands `/' and `?' mark point before move, so that you can
1041: return to the original point by `` `'.
1042:
1043:
1044: File: vip Node: Modifying Commands, Prev: Searching and Replacing, Up: Vi Commands, Next: Delete Commands
1045:
1046: Modifying Commands
1047: ==================
1048:
1049: In this section, commands for modifying the content of a buffer are
1050: described. These commands affect the region determined by a motion command
1051: which is given to the commands as their argument.
1052:
1053:
1054: We classify motion commands into "point commands" and
1055: "line commands". The point commands are as follows:
1056: `h', `l', `0', `^', `$', `w', `W', `b', `B', `e', `E', `(', `)', `/', `?', ``', `f', `F', `t', `T', `%', `;', `,'
1057: The line commands are as follows:
1058: `j', `k', `+', `-', `H', `M', `L', `{', `}', `G', `''
1059: If a point command is given as an argument to a modifying command, the
1060: region determined by the point command will be affected by the modifying
1061: command. On the other hand, if a line command is given as an argument to a
1062: modifying command, the region determined by the line command will be
1063: enlarged so that it will become the smallest region properly containing the
1064: region and consisting of whole lines (we call this process "expanding
1065: the region"), and then the enlarged region will be affected by the modifying
1066: command.
1067:
1068: * Menu:
1069:
1070: * Delete Commands:: Commands for deleting text.
1071: * Yank Commands:: Commands for yanking text in Vi's sense.
1072: * Put Back Commands:: Commands for putting bake deleted/yanked text.
1073: * Change Commands:: Commands for changing text.
1074:
1075: File: vip Node: Delete Commands, Prev: Modifying Commands, Up: Modifying Commands, Next: Yank Commands
1076:
1077: Delete Commands
1078: ---------------
1079:
1080: `d MOTION-COMMAND'
1081: Delete the region determined by the motion command MOTION-COMMAND.
1082: For example, `d $' will delete the region between point and end of
1083: current line since `$' is a point command that moves point to end of line.
1084: `d G' will delete the region between the beginning of current line and
1085: end of the buffer, since `G' is a line command. A count given to the
1086: command above will become the count for the associated motion command.
1087: Thus, `3 d w' will delete three words.
1088:
1089: It is also possible to save the deleted text into a register you specify.
1090: For example, you can say `" t 3 d w' to delete three words and save it
1091: to register `t'. The name of a register is a lower case letter between
1092: `a' and `z'. If you give an upper case letter as an argument to
1093: a delete command, then the deleted text will be appended to the content of
1094: the register having the corresponding lower case letter as its name. So,
1095: `" T d w' will delete a word and append it to register `t'. Other
1096: modifying commands also accept a register name as their argument, and we
1097: will not repeat similar explanations.
1098:
1099: We have more delete commands as below.
1100:
1101: `d d'
1102: Delete a line. Given a count N, delete N lines.
1103: `d r'
1104: Delete current region.
1105: `d R'
1106: Expand current region and delete it.
1107: `D'
1108: Delete to the end of a line (`vip-kill-line').
1109: `x'
1110: Delete a character after point. Given N, delete N characters
1111: (`vip-delete-char').
1112: `DEL'
1113: Delete a character before point. Given N, delete N characters
1114: (`vip-delete-backward-char').
1115:
1116:
1117: File: vip Node: Yank Commands, Prev: Delete Commands, Up: Modifying Commands, Next: Put Back Commands
1118:
1119: Yank Commands
1120: -------------
1121:
1122:
1123: Yank commands "yank" a text of buffer into a (usually anonymous) register.
1124: Here the word `yank' is used in Vi's sense. Thus yank commands do not
1125: alter the content of the buffer, and useful only in combination with
1126: commands that put back the yanked text into the buffer.
1127:
1128: `y MOTION-COMMAND'
1129: Yank the region determined by the motion command MOTION-COMMAND.
1130: For example, `y $' will yank the text between point and the end of line
1131: into an anonymous register, while `"c y $' will yank the same text into
1132: register `c'.
1133:
1134: Use the following command to yank consecutive lines of text.
1135:
1136: `y y'
1137: `Y'
1138: Yank a line. Given N, yank N lines (`vip-yank-line').
1139: `y r'
1140: Yank current region.
1141: `y R'
1142: Expand current region and yank it.
1143:
1144:
1145: File: vip Node: Put Back Commands, Prev: Yank Commands, Up: Modifying Commands, Next: Change Commands
1146:
1147: Put Back Commands
1148: -----------------
1149: Deleted or yanked texts can be put back into the buffer by the command
1150: below.
1151:
1152: `p'
1153: Insert, after the character point is looking at, most recently
1154: deleted/yanked text from anonymous register. Given a register name
1155: argument, the content of the named register will be put back. Given a
1156: count, the command will be repeated that many times. This command also
1157: checks if the text to put back ends with a new line character, and if so
1158: the text will be but below the current line (`vip-put-back').
1159: `P'
1160: Insert at point most recently deleted/yanked text from anonymous register.
1161: Given a register name argument, the content of the named register will
1162: be put back. Given a count, the command will be repeated that many times.
1163: This command also checks if the text to put back ends with a new line
1164: character, and if so the text will be put above the current line rather
1165: than at point (`vip-Put-back').
1166: Thus, `" c p' will put back the content of the register `c' into the
1167: buffer. It is also possible to specify "number register" which is a
1168: numeral between `1' and `9'. If the number register N is
1169: specified, N-th previously deleted/yanked text will be put back. It
1170: is an error to specify a number register for the delete/yank commands.
1171:
1172:
1173: File: vip Node: Change Commands, Prev: Put Back Commands, Up: Modifying Commands, Next: Repeating and Undoing Modifications
1174:
1175: Change Commands
1176: ---------------
1177:
1178: Most commonly used change command takes the following form.
1179:
1180: `c MOTION-COMMAND'
1181: Replace the content of the region determined by the motion command
1182: MOTION-COMMAND by the text you type. If the motion command is a
1183: point command then you will type the text into minibuffer, and if the
1184: motion command is a line command then the region will be deleted first and
1185: you can insert the text in INSERT MODE. For example, if point is at
1186: the beginning of a word `foo' and you wish to change it to `bar', you can
1187: type `c w'. Then, as `w' is a point command, you will get the prompt `foo
1188: =>' in the minibuffer, for which you can type `b a r RET' to complete the
1189: change command.
1190:
1191: `c c'
1192: Change a line. Given a count, that many lines are changed.
1193: `c r'
1194: Change current region.
1195: `c R'
1196: Expand current region and change it.
1197:
1198:
1199: File: vip Node: Repeating and Undoing Modifications, Prev: Change Commands, Up: Modifying Commands, Next: Other Vi Commands
1200:
1201: Repeating and Undoing Modifications
1202: -----------------------------------
1203:
1204: VIP records the previous modifying command, so that it is easy to repeat
1205: it. It is also very easy to undo changes made by modifying commands.
1206:
1207: `u'
1208: Undo the last change. You can undo more by repeating undo by the repeat
1209: command `.'. For example, you can undo 5 previous changes by typing
1210: `u....'. If you type `uu', then the second `u' undoes the
1211: first undo command (`vip-undo').
1212: `.'
1213: Repeat the last modifying command. Given count N it becomes the new
1214: count for the repeated command. Otherwise, the count for the last
1215: modifying command is used again (`vip-repeat').
1216:
1217:
1218: File: vip Node: Other Vi Commands, Prev: Repeating and Undoing Modifications, Up: Vi Commands, Next: Commands in Insert Mode
1219:
1220: Other Vi Commands
1221: =================
1222:
1223: Miscellaneous Vi commands are collected here.
1224:
1225: `Z Z'
1226: Exit Emacs. If modified buffers exist, you will be asked whether you wish
1227: to save them or not (`save-buffers-kill-emacs').
1228: `! MOTION-COMMAND FORMAT-COMMAND'
1229: `N ! ! FORMAT-COMMAND'
1230: The region determined by the motion command MOTION-COMMAND will be
1231: given to the shell command FORMAT-COMMAND and the region will be
1232: replaced by its output. If a count is given, it will be passed to
1233: MOTION-COMMAND. For example, `3!Gsort' will sort the region
1234: between point and the 3rd line. If `!' is used instead of
1235: MOTION-COMMAND then N lines will be processed by
1236: FORMAT-COMMAND (`vip-command-argument').
1237: `J'
1238: Join two lines. Given count, join that many lines. A space will be
1239: inserted at each junction (`vip-join-lines').
1240: `< MOTION-COMMAND'
1241: `N < <'
1242: Shift region determined by the motion command MOTION-COMMAND to
1243: left by SHIFT-WIDTH (default is 8). If `<' is used instead of
1244: MOTION-COMMAND then shift N lines
1245: (`vip-command-argument').
1246: `> MOTION-COMMAND'
1247: `N > >'
1248: Shift region determined by the motion command MOTION-COMMAND to
1249: right by SHIFT-WIDTH (default is 8). If `<' is used instead of
1250: MOTION-COMMAND then shift N lines
1251: (`vip-command-argument').
1252: `= MOTION-COMMAND'
1253: Indent region determined by the motion command MOTION-COMMAND. If
1254: `=' is used instead of MOTION-COMMAND then indent N lines
1255: (`vip-command-argument').
1256: `*'
1257: Call last remembered keyboard macro.
1258: `#'
1259: A new vi operator. *Note New Commands::, for more details.
1260:
1261: The following keys are reserved for future extensions, and currently
1262: assigned to a function that just beeps (`vip-nil').
1263:
1264:
1265: &, @, U, [, ], _, q, ~
1266:
1267: VIP uses a special local keymap to interpret key strokes you enter in vi
1268: mode. The following keys are bound to NIL in the keymap. Therefore,
1269: these keys are interpreted by the global keymap of Emacs. We give below a
1270: short description of the functions bound to these keys in the global
1271: keymap. See GNU Emacs Manual for details.
1272:
1273: `C-@'
1274: Set mark and push previous mark on mark ring (`set-mark-command').
1275: `TAB'
1276: Indent line for current major mode (`indent-for-tab-command').
1277: `LFD'
1278: Insert a newline, then indent according to mode (`newline-and-indent').
1279: `C-k'
1280: Kill the rest of the current line; before a newline, kill the newline.
1281: With prefix argument, kill that many lines from point. Negative arguments
1282: kill lines backward (`kill-line').
1283: `C-l'
1284: Clear the screen and reprint everything (`recenter').
1285: `N C-p'
1286: Move cursor vertically up N lines (`previous-line').
1287: `C-q'
1288: Read next input character and insert it. Useful for inserting control
1289: characters
1290: (`quoted-insert').
1291: `C-r'
1292: Search backward incrementally (`isearch-backward').
1293: `C-s'
1294: Search forward incrementally (`isearch-forward').
1295: `N C-t'
1296: Interchange charcters around point, moving forward one character. With
1297: count N, take character before point and drag it forward past N
1298: other characters. If no argument and at end of line, the previous two
1299: characters are exchanged (`transpose-chars').
1300: `N C-v'
1301: Scroll text upward N lines. If N is not given, scroll near
1302: full screen (`scroll-up').
1303: `C-w'
1304: Kill between point and mark. The text is save in the kill ring. The
1305: command `P' or `p' can retrieve it from kill ring
1306: (`kill-region').
1307:
1308:
1309: File: vip Node: Commands in Insert Mode, Prev: Other Vi Commands, Up: Vi Commands, Next: Ex Commands
1310:
1311: Insert Mode
1312: ===========
1313:
1314: You can enter insert mode by one of the following commands. In addition to
1315: these, you will enter insert mode if you give a change command with a line
1316: command as the motion command. Insert commands are also modifying commands
1317: and you can repeat them by the repeat command `.' (`vip-repeat').
1318:
1319: `i'
1320: Enter insert mode at point (`vip-insert').
1321: `I'
1322: Enter insert mode at the first non white character on the line
1323: (`vip-Insert').
1324: `a'
1325: Move point forward by one character and then enter insert mode
1326: (`vip-append').
1327: `A'
1328: Enter insert mode at end of line (`vip-Append').
1329: `o'
1330: Open a new line below the current line and enter insert mode
1331: (`vip-open-line').
1332: `O'
1333: Open a new line above the current line and enter insert mode
1334: (`vip-Open-line').
1335: `C-o'
1336: Insert a newline and leave point before it, and then enter insert mode
1337: (`vip-open-line-at-point').
1338:
1339: Insert mode is almost like emacs mode. Only the following 4 keys behave
1340: differently from emacs mode.
1341:
1342: `ESC'
1343: This key will take you back to vi mode (`vip-change-mode-to-vi').
1344: `C-h'
1345: Delete previous character (`delete-backward-char').
1346: `C-w'
1347: Delete previous word (`vip-delete-backward-word').
1348: `C-z'
1349: This key simulates ESC key in emacs mode. For instance, typing
1350: `C-z x' in insert mode iw the same as typing `ESC x' in emacs mode
1351: (`vip-ESC').
1352: You can also bind `C-h' to `help-command' if you like.
1353: (*Note Customizing Key Bindings::, for details.) Binding `C-h' to
1354: `help-command' has the effect of making the meaning of `C-h'
1355: uniform among emacs, vi and insert modes.
1356:
1357: When you enter insert mode, VIP records point as the start point of
1358: insertion, and when you leave insert mode the region between point and
1359: start point is saved for later use by repeat command etc. Therefore, repeat
1360: command will not really repeat insertion if you move point by emacs
1361: commands while in insert mode.
1362:
1363:
1364: File: vip Node: Ex Commands, Prev: Commands in Insert Mode, Up: Top, Next: Ex Command Reference
1365:
1366: Ex Commands
1367: ***********
1368:
1369:
1370: In vi mode, you can execute an Ex command EX-COMMAND by typing:
1371: `: EX-COMMAND RET'
1372: Every Ex command follows the following pattern:
1373: ADDRESS COMMAND `!' PARAMETERS COUNT FLAGS
1374: where all parts are optional. For the syntax of "address", the reader
1375: is referred to the reference manual of Ex.
1376:
1377:
1378: In the current version of VIP, searching by Ex commands is always
1379: "magic". That is, search patterns are always treated as "regular
1380: expressions". For example, a typical forward search would be invoked by
1381: `:/PAT/'. If you wish to include `/' as part of
1382: PAT you must preceded it by `\'. VIP strips off these `\''s
1383: before `/' and the resulting PAT becomes the actual search
1384: pattern. Emacs provides a different and richer class or regular
1385: expressions than Vi/Ex, and VIP uses Emacs' regular expressions. See GNU
1386: Emacs Manual for details of regular expressions.
1387:
1388: Several Ex commands can be entered in a line by separating them by a pipe
1389: character `|'.
1390:
1391: * Menu:
1392:
1393: * Ex Command Reference:: Explain all the Ex commands available in VIP.
1394:
1395: File: vip Node: Ex Command Reference, Prev: Ex Commands, Up: Ex Commands, Next: Customization
1396:
1397: Ex Command Reference
1398: ====================
1399: In this section we briefly explain all the Ex commands supported by VIP.
1400: Most Ex commands expect ADDRESS as their argument, and they use
1401: default addresses if they are not explicitly given. In the following, such
1402: default addresses will be shown in parentheses.
1403:
1404: Most command names can and preferably be given in abbreviated forms. In
1405: the following, optional parts of command names will be enclosed in
1406: brackets. For example, `co[py]' will mean that copy command can be
1407: give as `co' or `cop' or `copy'.
1408:
1409: If COMMAND is empty, point will move to the beginning of the line
1410: specified by the ADDRESS. If ADDRESS is also empty, point will
1411: move to the beginning of the current line.
1412:
1413:
1414: Some commands accept "flags" which are one of `p', `l' and
1415: `#'. If FLAGS are given, the text affected by the commands will
1416: be displayed on a temporary window, and you will be asked to hit return to
1417: continue. In this way, you can see the text affected by the commands
1418: before the commands will be executed. If you hit `C-g' instead of
1419: RET then the commands will be aborted. Note that the meaning of
1420: FLAGS is different in VIP from that in Vi/Ex.
1421:
1422: `(.,.) co[py] ADDR FLAGS'
1423: `(.,.) t ADDR FLAGS'
1424: Place a copy of specified lines after ADDR. If ADDR is
1425: `0', it will be placed before the first line.
1426: `(.,.) d[elete] REGISTER COUNT FLAGS'
1427: Delete specified lines. Text will be saved in a named REGISTER if a
1428: lower case letter is given, and appended to a register if a capital letter is
1429: given.
1430: `e[dit] ! +ADDR FILE'
1431: `e[x] ! +ADDR FILE'
1432: `vi[sual] ! +ADDR FILE'
1433: Edit a new file FILE in the current window. The command will abort
1434: if current buffer is modified, which you can override by giving `!'.
1435: If `+'ADDR is given, ADDR becomes the current line.
1436: `file'
1437: Give information about the current file.
1438: `(1,$) g[lobal] ! /PAT/ CMDS'
1439: `(1,$) v /PAT/ CMDS'
1440: Among specified lines first mark each line which matches the regular
1441: expression PAT, and then execute CMDS on each marked line.
1442: If `!' is given, CMDS will be executed on each line not matching
1443: PAT. `v' is same as `g!'.
1444: `(.,.+1) j[oin] ! COUNT FLAGS'
1445: Join specified lines into a line. Without `!', a space character will
1446: be inserted at each junction.
1447: `(.) k CH'
1448: `(.) mar[k] CH'
1449: Mark specified line by a lower case character CH. Then the
1450: addressing form `''CH will refer to this line. No white space is
1451: required between `k' and CH. A white space is necessary between
1452: `mark' and CH, however.
1453: `map CH RHS'
1454: Define a macro for vi mode. After this command, the character CH
1455: will be expanded to RHS in vi mode.
1456: `(.,.) m[ove] ADDR'
1457: Move specified lines after ADDR.
1458: `(.) pu[t] REGISTER'
1459: Put back previously deleted or yanked text. If REGISTER is given,
1460: the text saved in the register will be put back; otherwise, last deleted or
1461: yanked text will be put back.
1462: `q[uit] !'
1463: Quit from Emacs. If modified buffers with associated files exist, you will
1464: be asked whether you wish to save each of them. At this point, you may
1465: choose not to quit, by hitting `C-g'. If `!' is given, exit from
1466: Emacs without saving modified buffers.
1467: `(.) r[ead] FILE'
1468: Read in the content of the file FILE after the specified line.
1469: `(.) r[ead] ! COMMAND'
1470: Read in the output of the shell command COMMAND after the specified
1471: line.
1472: `se[t]'
1473: Set a variable's value. *Note Customizing Constants::, for the list of variables
1474: you can set.
1475: `sh[ell]'
1476: Run a subshell in a window.
1477: `(.,.) s[ubstitute] /PAT/REPL/ OPTIONS COUNT FLAGS'
1478: `(.,.) & OPTIONS COUNT FLAGS'
1479: On each specified line, the first occurrence of string matching regular
1480: expression PAT is replaced by replacement pattern REPL. Option
1481: characters are `g' and `c'. If global option character `g'
1482: appears as part of OPTIONS, all occurrences are substituted. If
1483: confirm option character `c' appears, you will be asked to give
1484: confirmation before each substitution. If `/PAT/REPL/' is
1485: missing, the last substitution is repeated.
1486: `st[op]'
1487: Suspend Emacs.
1488: `ta[g] TAG'
1489: Find first definition of TAG. If no TAG is given, previously
1490: given TAG is used and next alternate definition is find. By default,
1491: the file `TAGS' in the current directory becomes the "selected tag
1492: table". You can select another tag table by `set' command.
1493: *Note Customizing Constants::, for details.
1494: `und[o]'
1495: Undo the last change.
1496: `unm[ap] CH'
1497: The macro expansion associated with CH is removed.
1498: `ve[rsion]'
1499: Tell the version number of VIP.
1500: `(1,$) w[rite] ! FILE'
1501: Write out specified lines into file FILE. If no FILE is given,
1502: text will be written to the file associated to the current buffer. Unless
1503: `!' is given, if FILE is different from the file associated to
1504: the current buffer and if the file FILE exists, the command will not
1505: be executed. Unlike Ex, FILE becomes the file associated to the
1506: current buffer.
1507: `(1,$) w[rite]>> FILE'
1508: Write out specified lines at the end of file FILE. FILE
1509: becomes the file associated to the current buffer.
1510: `(1,$) wq ! FILE'
1511: Same as `write' and then `quit'. If `!' is given, same as
1512: `write !' then `quit'.
1513: `(.,.) y[ank] REGISTER COUNT'
1514: Save specified lines into register REGISTER. If no register is
1515: specified, text will be saved in an anonymous register.
1516: `ADDR ! COMMAND'
1517: Execute shell command COMMAND. The output will be shown in a new
1518: window. If ADDR is given, specified lines will be used as standard
1519: input to COMMAND.
1520: `($) ='
1521: Print the line number of the addressed line.
1522: `(.,.) > COUNT FLAGS'
1523: Shift specified lines to the right. The variable `vip-shift-width'
1524: (default value is 8) determines the amount of shift.
1525: `(.,.) < COUNT FLAGS'
1526: Shift specified lines to the left. The variable `vip-shift-width'
1527: (default value is 8) determines the amount of shift.
1528: `(.,.) ~ OPTIONS COUNT FLAGS'
1529: Repeat the previous `substitute' command using previous search pattern
1530: as PAT for matching.
1531:
1532: The following Ex commands are available in Vi, but not implemented in VIP.
1533: `abbreviate', `list', `next', `print', `preserve', `recover', `rewind', `source',
1534: `unabbreviate', `xit', `z'
1535:
1536:
1537: File: vip Node: Customization, Prev: Ex Command Reference, Up: Top, Next: Customizing Constants
1538:
1539: Customization
1540: *************
1541:
1542: If you have a file called `.vip' in your home directory, then it
1543: will also be loaded when VIP is loaded. This file is thus useful for
1544: customizing VIP.
1545:
1546: * Menu:
1547:
1548: * Customizing Constants:: How to change values of constants.
1549: * Customizing Key Bindings:: How to change key bindings.
1550: * Adding Lisp Code:: Most powerful way of customization.
1551:
1552: File: vip Node: Customizing Constants, Prev: Customization, Up: Customization, Next: Customizing Key Bindings
1553:
1554: Customizing Constants
1555: =====================
1556: An easy way to customize VIP is to change the values of constants used
1557: in VIP. Here is the list of the constants used in VIP and their default
1558: values.
1559:
1560: `vip-shift-width 8'
1561: The number of columns shifted by `>' and `<' command.
1562: `vip-re-replace nil'
1563: If `t' then do regexp replace, if `nil' then do string replace.
1564: `vip-search-wrap-around t'
1565: If `t', search wraps around the buffer.
1566: `vip-re-search nil'
1567: If `t' then search is reg-exp search, if `nil' then vanilla
1568: search.
1569: `vip-case-fold-search nil'
1570: If `t' search ignores cases.
1571: `vip-re-query-replace nil'
1572: If `t' then do reg-exp replace in query replace.
1573: `vip-open-with-indent nil'
1574: If `t' then indent to the previous current line when open a new line
1575: by `o' or `O' command.
1576: `vip-tags-file-name "TAGS"'
1577: The name of the file used as the tag table.
1578: `vip-help-in-insert-mode nil'
1579: If `t' then C-h is bound to `help-command' in insert mode,
1580: if `nil' then it sis bound to `delete-backward-char'.
1581: You can reset these constants in VIP by the Ex command `set'. Or you
1582: can include a line like this in your `.vip' file:
1583: (setq vip-case-fold-search t)
1584:
1585:
1586: File: vip Node: Customizing Key Bindings, Prev: Customizing Constants, Up: Customization
1587:
1588: Customizing Key Bindings
1589: ========================
1590:
1591:
1592: VIP uses `vip-command-mode-map' as the "local keymap" for vi mode.
1593: For example, in vi mode, SPC is bound to the function
1594: `vip-scroll'. But, if you wish to make SPC and some other keys
1595: behave like Vi, you can include the following lines in your `.vip'
1596: file.
1597:
1598: (define-key vip-command-mode-map "\C-g" 'vip-info-on-file)
1599: (define-key vip-command-mode-map "\C-h" 'vip-backward-char)
1600: (define-key vip-command-mode-map "\C-m" 'vip-next-line-at-bol)
1601: (define-key vip-command-mode-map " " 'vip-forward-char)
1602: (define-key vip-command-mode-map "g" 'vip-keyboard-quit)
1603: (define-key vip-command-mode-map "s" 'vip-substitute)
1604: (define-key vip-command-mode-map "C" 'vip-change-to-eol)
1605: (define-key vip-command-mode-map "R" 'vip-change-to-eol)
1606: (define-key vip-command-mode-map "S" 'vip-substitute-line)
1607: (define-key vip-command-mode-map "X" 'vip-delete-backward-char)
1608:
1609:
1610: Key Index
1611: *********
1612:
1613:
1614: * Menu:
1615:
1616: * 000 @kbd{C-@@} (@code{set-mark-command}): Other Vi Commands.
1617: * 001 @kbd{C-a} (@code{vip-beginning-of-line}): New Commands.
1618: * 002 @kbd{C-b} (@code{vip-scroll-back}): Viewing the Buffer.
1619: * 003 @kbd{C-c} (@code{vip-ctl-c}): Important Keys.
1620: * 003 @kbd{C-c} (@code{vip-ctl-c}): New Commands.
1621: * 004 @kbd{C-d} (@code{vip-scroll-up}): Viewing the Buffer.
1622: * 005 @kbd{C-e} (@code{vip-scroll-up-one}): Viewing the Buffer.
1623: * 006 @kbd{C-f} (@code{vip-scroll-back}): Viewing the Buffer.
1624: * 007 @kbd{C-g} (@code{vip-keyboard-quit}): Changing.
1625: * 007 @kbd{C-g} (@code{vip-keyboard-quit}): Important Keys.
1626: * 007 @kbd{C-g} (@code{vip-keyboard-quit}): New Bindings.
1627: * 010 @kbd{C-h} (@code{delete-backward-char}) (insert mode): Commands in Insert Mode.
1628: * 010 @kbd{C-h} (@code{vip-delete-backward-char}) (insert mode): Insert Mode.
1629: * 011 @kbd{TAB} (@code{indent-for-tab-command}): Other Vi Commands.
1630: * 012 @kbd{LFD} (@code{newline-and-indent}): Other Vi Commands.
1631: * 013 @kbd{C-k} (@code{kill-line}): Other Vi Commands.
1632: * 014 @kbd{C-l} (@code{recenter}): Important Keys.
1633: * 014 @kbd{C-l} (@code{recenter}): Other Vi Commands.
1634: * 015 @kbd{RET} (@code{vip-scroll-back}): New Bindings.
1635: * 015 @kbd{RET} (@code{vip-scroll-back}): Viewing the Buffer.
1636: * 016 @kbd{C-n} (@code{vip-next-window}): Buffers and Windows.
1637: * 016 @kbd{C-n} (@code{vip-next-window}): New Commands.
1638: * 016 @kbd{C-n} (@code{vip-next-window}): Window Commands.
1639: * 017 @kbd{C-o} (@code{vip-open-line-at-point}): Commands in Insert Mode.
1640: * 017 @kbd{C-o} (@code{vip-open-line-at-point}): New Commands.
1641: * 020 @kbd{C-p} (@code{previous-line}): Other Vi Commands.
1642: * 021 @kbd{C-q} (@code{quoted-insert}): Other Vi Commands.
1643: * 022 @kbd{C-r} (@code{isearch-backward}): New Commands.
1644: * 022 @kbd{C-r} (@code{isearch-backward}): Other Vi Commands.
1645: * 022 @kbd{C-r} (@code{isearch-backward}): Searching and Replacing.
1646: * 023 @kbd{C-s} (@code{isearch-forward}): New Commands.
1647: * 023 @kbd{C-s} (@code{isearch-forward}): Other Vi Commands.
1648: * 023 @kbd{C-s} (@code{isearch-forward}): Searching and Replacing.
1649: * 024 @kbd{C-t} (@code{transpose-chars}): Other Vi Commands.
1650: * 025 @kbd{C-u} (@code{vip-scroll-down}): Viewing the Buffer.
1651: * 026 @kbd{C-v} (@code{scroll-up}): Other Vi Commands.
1652: * 027 @kbd{C-w} (@code{kill-region}): Other Vi Commands.
1653: * 027 @kbd{C-w} (@code{vip-delete-backward-word}) (insert mode): Commands in Insert Mode.
1654: * 027 @kbd{C-w} (@code{vip-delete-backward-word}) (insert mode): Insert Mode.
1655: * 0300 @kbd{C-x} (@code{vip-ctl-x}): Important Keys.
1656: * 0300 @kbd{C-x} (@code{vip-ctl-x}): New Commands.
1657: * 0301 @kbd{C-x C-z} (@code{suspend-emacs}): Modes in VIP.
1658: * 031 @kbd{C-y} (@code{vip-scroll-down-one}): Viewing the Buffer.
1659: * 032 @kbd{C-z} (@code{vip-change-mode-to-vi}): Emacs Mode.
1660: * 032 @kbd{C-z} (@code{vip-change-mode-to-vi}): Modes in VIP.
1661: * 032 @kbd{C-z} (@code{vip-ESC}) (insert mode): Commands in Insert Mode.
1662: * 032 @kbd{C-z} (@code{vip-ESC}) (insert mode): Insert Mode.
1663: * 033 @kbd{ESC} (@code{vip-change-mode-to-vi}) (insert mode): Commands in Insert Mode.
1664: * 033 @kbd{ESC} (@code{vip-change-mode-to-vi}) (insert mode): Insert Mode.
1665: * 033 @kbd{ESC} (@code{vip-ESC}): Important Keys.
1666: * 033 @kbd{ESC} (@code{vip-ESC}): New Commands.
1667: * 040 @kbd{SPC} (@code{vip-scroll}): New Bindings.
1668: * 040 @kbd{SPC} (@code{vip-scroll}): Viewing the Buffer.
1669: * 041 @kbd{!} (@code{vip-command-argument}): Other Vi Commands.
1670: * 042 @kbd{"} (@code{vip-command-argument}): Delete Commands.
1671: * 0430 @kbd{#} (@code{vip-command-argument}): New Commands.
1672: * 0431 @kbd{# C} (@code{upcase-region}): New Commands.
1673: * 0432 @kbd{# c} (@code{downcase-region}): New Commands.
1674: * 0432 @kbd{# g} (@code{vip-global-execute}): New Commands.
1675: * 0432 @kbd{# q} (@code{vip-quote-region}): New Commands.
1676: * 0432 @kbd{# s} (@code{spell-region}): New Commands.
1677: * 044 @kbd{$} (@code{vip-goto-eol}): Motion Commands.
1678: * 045 @kbd{%} (@code{vip-paren-match}): Motion Commands.
1679: * 046 @kbd{&} (@code{vip-nil}): Other Vi Commands.
1680: * 047 @kbd{'} (@code{vip-goto-mark-and-skip-white}): Motion Commands.
1681: * 050 @kbd{(} (@code{vip-backward-sentence}): Motion Commands.
1682: * 051 @kbd{)} (@code{vip-forward-sentence}): Motion Commands.
1683: * 052 @kbd{*} (@code{vip-call-last-kbd-macro}): Misc Commands.
1684: * 052 @kbd{*} (@code{vip-call-last-kbd-macro}): New Commands.
1685: * 052 @kbd{*} (@code{vip-call-last-kbd-macro}): Other Vi Commands.
1686: * 053 @kbd{+} (@code{vip-next-line-at-bol}): Motion Commands.
1687: * 054 @kbd{,} (@code{vip-repeat-find-opposite}): Motion Commands.
1688: * 055 @kbd{-} (@code{vip-previous-line-at-bol}): Motion Commands.
1689: * 056 @kbd{.} (@code{vip-repeat}): Repeating and Undoing Modifications.
1690: * 056 @kbd{.} (@code{vip-repeat}): Undoing.
1691: * 057 @kbd{/} (@code{vip-search-forward}): Counts.
1692: * 057 @kbd{/} (@code{vip-search-forward}): Searching.
1693: * 057 @kbd{/} (@code{vip-search-forward}): Searching and Replacing.
1694: * 060 @kbd{0} (@code{vip-beginning-of-line}): Motion Commands.
1695: * 061 @kbd{1} (numeric argument): Numeric Arguments.
1696: * 062 @kbd{2} (numeric argument): Numeric Arguments.
1697: * 063 @kbd{3} (numeric argument): Numeric Arguments.
1698: * 064 @kbd{4} (numeric argument): Numeric Arguments.
1699: * 065 @kbd{5} (numeric argument): Numeric Arguments.
1700: * 066 @kbd{6} (numeric argument): Numeric Arguments.
1701: * 067 @kbd{7} (numeric argument): Numeric Arguments.
1702: * 068 @kbd{8} (numeric argument): Numeric Arguments.
1703: * 069 @kbd{9} (numeric argument): Numeric Arguments.
1704: * 072 @kbd{:} (@code{vip-ex}): Ex Commands.
1705: * 073 @kbd{;} (@code{vip-repeat-find}): Motion Commands.
1706: * 074 @kbd{<} (@code{vip-command-argument}): Other Vi Commands.
1707: * 075 @kbd{=} (@code{vip-command-argument}): Other Vi Commands.
1708: * 076 @kbd{>} (@code{vip-command-argument}): Other Vi Commands.
1709: * 077 @kbd{?} (@code{vip-search-backward}): Counts.
1710: * 077 @kbd{?} (@code{vip-search-backward}): Searching.
1711: * 077 @kbd{?} (@code{vip-search-backward}): Searching and Replacing.
1712: * 100 @kbd{@@} (@code{vip-nil}): Other Vi Commands.
1713: * 101 @kbd{A} (@code{vip-Append}): Commands in Insert Mode.
1714: * 102 @kbd{B} (@code{vip-backward-Word}): Motion Commands.
1715: * 103 @kbd{C} (@code{vip-ctl-c-equivalent}): Important Keys.
1716: * 103 @kbd{C} (@code{vip-ctl-c-equivalent}): New Bindings.
1717: * 104 @kbd{D} (@code{vip-kill-line}): Delete Commands.
1718: * 105 @kbd{E} (@code{vip-end-of-Word}): Motion Commands.
1719: * 106 @kbd{F} (@code{vip-find-char-backward}): Motion Commands.
1720: * 107 @kbd{G} (@code{vip-goto-line}): Motion Commands.
1721: * 110 @kbd{H} (@code{vip-window-top}): Motion Commands.
1722: * 111 @kbd{I} (@code{vip-Insert}): Commands in Insert Mode.
1723: * 112 @kbd{J} (@code{vip-join-lines}): Other Vi Commands.
1724: * 113 @kbd{K} (@code{vip-kill-buffer}): Buffer Commands.
1725: * 113 @kbd{K} (@code{vip-kill-buffer}): Buffers and Windows.
1726: * 113 @kbd{K} (@code{vip-kill-buffer}): New Commands.
1727: * 114 @kbd{L} (@code{vip-window-bottom}): Motion Commands.
1728: * 115 @kbd{M} (@code{vip-window-middle}): Motion Commands.
1729: * 116 @kbd{N} (@code{vip-search-Next}): Searching and Replacing.
1730: * 117 @kbd{O} (@code{vip-Open-line}): Commands in Insert Mode.
1731: * 117 @kbd{O} (@code{vip-Open-line}): Counts.
1732: * 120 @kbd{P} (@code{vip-Put-back}): Counts.
1733: * 120 @kbd{P} (@code{vip-Put-back}): Put Back Commands.
1734: * 121 @kbd{Q} (@code{vip-query-replace}): New Commands.
1735: * 121 @kbd{Q} (@code{vip-query-replace}): Searching and Replacing.
1736: * 122 @kbd{R} (@code{vip-replace-string}): New Commands.
1737: * 122 @kbd{R} (@code{vip-replace-string}): Searching and Replacing.
1738: * 123 @kbd{S} (@code{vip-switch-to-buffer-other-window}): Buffer Commands.
1739: * 123 @kbd{S} (@code{vip-switch-to-buffer-other-window}): Buffers and Windows.
1740: * 123 @kbd{S} (@code{vip-switch-to-buffer-other-window}): New Bindings.
1741: * 124 @kbd{T} (@code{vip-goto-char-backward}): Motion Commands.
1742: * 125 @kbd{U} (@code{vip-nil}): Other Vi Commands.
1743: * 126 @kbd{V} (@code{vip-find-file-other-window}): File Commands.
1744: * 126 @kbd{V} (@code{vip-find-file-other-window}): Files.
1745: * 126 @kbd{V} (@code{vip-find-file-other-window}): New Commands.
1746: * 127 @kbd{W} (@code{vip-forward-Word}): Motion Commands.
1747: * 1300 @kbd{X} (@code{vip-ctl-x-equivalent}): Important Keys.
1748: * 1300 @kbd{X} (@code{vip-ctl-x-equivalent}): New Bindings.
1749: * 1301 @kbd{X )} (@code{end-kbd-macro}): Misc Commands.
1750: * 1301 @kbd{X (} (@code{start-kbd-macro}): Misc Commands.
1751: * 1301 @kbd{X 1} (@code{delete-other-windows}): Buffers and Windows.
1752: * 1301 @kbd{X 1} (@code{delete-other-windows}): Window Commands.
1753: * 1301 @kbd{X 2} (@code{split-window-vertically}): Buffers and Windows.
1754: * 1301 @kbd{X 2} (@code{split-window-vertically}): Window Commands.
1755: * 1301 @kbd{X 3} (@code{vip-buffer-in-two-windows}): Buffers and Windows.
1756: * 1301 @kbd{X 3} (@code{vip-buffer-in-two-windows}): New Bindings.
1757: * 1301 @kbd{X 3} (@code{vip-buffer-in-two-windows}): Window Commands.
1758: * 1302 @kbd{X B} (@code{list-buffers}): Buffers and Windows.
1759: * 1302 @kbd{X I} (@code{insert-file}): File Commands.
1760: * 1302 @kbd{X I} (@code{insert-file}): Files.
1761: * 1302 @kbd{X S} (@code{save-buffer}): Buffer Commands.
1762: * 1302 @kbd{X S} (@code{save-buffer}): Files.
1763: * 1302 @kbd{X W} (@code{write-file}): File Commands.
1764: * 1302 @kbd{X W} (@code{write-file}): Files.
1765: * 1302 @kbd{X Z} (@code{suspend-emacs}): Misc Commands.
1766: * 131 @kbd{Y} (@code{vip-yank-line}): Yank Commands.
1767: * 132 @kbd{Z Z} (@code{save-buffers-kill-emacs}): Other Vi Commands.
1768: * 133 @kbd{[} (@code{vip-nil}): Other Vi Commands.
1769: * 134 @kbd{\} (@code{vip-escape-to-emacs}): Important Keys.
1770: * 134 @kbd{\} (@code{vip-escape-to-emacs}): New Commands.
1771: * 135 @kbd{]} (@code{vip-nil}): Other Vi Commands.
1772: * 136 @kbd{^} (@code{vip-bol-and-skip-white}): Motion Commands.
1773: * 137 @kbd{_} (@code{vip-nil}): Other Vi Commands.
1774: * 140 @kbd{`} (@code{vip-goto-mark}): Motion Commands.
1775: * 141 @kbd{a} (@code{vip-append}): Commands in Insert Mode.
1776: * 142 @kbd{b} (@code{vip-backward-word}): Motion Commands.
1777: * 1430 @kbd{c} (@code{vip-command-argument}): Change Commands.
1778: * 1431 @kbd{c R}: Change Commands.
1779: * 1432 @kbd{c c}: Change Commands.
1780: * 1432 @kbd{c r}: Change Commands.
1781: * 1440 @kbd{d} (@code{vip-command-argument}): Delete Commands.
1782: * 1441 @kbd{d R}: Delete Commands.
1783: * 1442 @kbd{d d}: Delete Commands.
1784: * 1442 @kbd{d r}: Delete Commands.
1785: * 145 @kbd{e} (@code{vip-end-of-word}): Motion Commands.
1786: * 146 @kbd{f} (@code{vip-find-char-forward}): Motion Commands.
1787: * 147 @kbd{g} (@code{vip-info-on-file}): Files.
1788: * 147 @kbd{g} (@code{vip-info-on-file}): New Bindings.
1789: * 150 @kbd{h} (@code{vip-backward-char}): Motion Commands.
1790: * 151 @kbd{i} (@code{vip-insert}): Commands in Insert Mode.
1791: * 152 @kbd{j} (@code{vip-next-line}): Motion Commands.
1792: * 153 @kbd{k} (@code{vip-previous-line}): Motion Commands.
1793: * 154 @kbd{l} (@code{vip-forward-char}): Motion Commands.
1794: * 155 @kbd{m} (@code{vip-mark-point}): Mark Commands.
1795: * 155 @kbd{m} (@code{vip-mark-point}): Marking.
1796: * 156 @kbd{n} (@code{vip-search-next}): Searching and Replacing.
1797: * 157 @kbd{o} (@code{vip-open-line}): Commands in Insert Mode.
1798: * 157 @kbd{o} (@code{vip-open-line}): Counts.
1799: * 160 @kbd{p} (@code{vip-put-back}): Counts.
1800: * 160 @kbd{p} (@code{vip-put-back}): Put Back Commands.
1801: * 161 @kbd{q} (@code{vip-nil}): Other Vi Commands.
1802: * 162 @kbd{r} (@code{vip-replace-char}): Searching and Replacing.
1803: * 163 @kbd{s} (@code{vip-switch-to-buffer}): Buffer Commands.
1804: * 163 @kbd{s} (@code{vip-switch-to-buffer}): Buffers and Windows.
1805: * 163 @kbd{s} (@code{vip-switch-to-buffer}): New Bindings.
1806: * 164 @kbd{t} (@code{vip-goto-char-forward}): Motion Commands.
1807: * 165 @kbd{u} (@code{vip-undo}): Repeating and Undoing Modifications.
1808: * 165 @kbd{u} (@code{vip-undo}): Undoing.
1809: * 166 @kbd{v} (@code{vip-find-file}): File Commands.
1810: * 166 @kbd{v} (@code{vip-find-file}): Files.
1811: * 166 @kbd{v} (@code{vip-find-file}): New Commands.
1812: * 167 @kbd{w} (@code{vip-forward-word}): Motion Commands.
1813: * 170 @kbd{x} (@code{vip-delete-char}): Delete Commands.
1814: * 1710 @kbd{y} (@code{vip-command-argument}): Yank Commands.
1815: * 1711 @kbd{y R}: Yank Commands.
1816: * 1712 @kbd{y r}: Yank Commands.
1817: * 1712 @kbd{y y} (@code{vip-yank-line}): Yank Commands.
1818: * 1721 @kbd{z RET} (@code{vip-line-to-top}): Viewing the Buffer.
1819: * 1721 @kbd{z RET} (@code{vip-line-to-top}): z Command.
1820: * 1722 @kbd{z -} (@code{vip-line-to-bottom}): Viewing the Buffer.
1821: * 1722 @kbd{z -} (@code{vip-line-to-bottom}): z Command.
1822: * 1722 @kbd{z .} (@code{vip-line-to-middle}): Viewing the Buffer.
1823: * 1722 @kbd{z .} (@code{vip-line-to-middle}): z Command.
1824: * 1723 @kbd{z H} (@code{vip-line-to-top}): Viewing the Buffer.
1825: * 1723 @kbd{z H} (@code{vip-line-to-top}): z Command.
1826: * 1723 @kbd{z L} (@code{vip-line-to-bottom}): Viewing the Buffer.
1827: * 1723 @kbd{z L} (@code{vip-line-to-bottom}): z Command.
1828: * 1723 @kbd{z M} (@code{vip-line-to-middle}): Viewing the Buffer.
1829: * 1723 @kbd{z M} (@code{vip-line-to-middle}): z Command.
1830: * 173 @kbd{@{} (@code{vip-backward-paragraph}): Motion Commands.
1831: * 174 @kbd{|} (@code{vip-goto-col}): Motion Commands.
1832: * 175 @kbd{@}} (@code{vip-forward-paragraph}): Motion Commands.
1833: * 176 @kbd{~} (@code{vip-nil}): Other Vi Commands.
1834: * 177 @kbd{DEL} (@code{vip-delete-backward-char}): Delete Commands.
1835:
1836:
1837: Concept Index
1838: *************
1839:
1840: * Menu:
1841:
1842: * address: Ex Commands.
1843: * buffer: Basic Concepts.
1844: * buffer: Buffers and Windows.
1845: * buffer name completion: Buffers and Windows.
1846: * count: Numeric Arguments.
1847: * current buffer: Buffers and Windows.
1848: * default directory: Files.
1849: * emacs mode: Modes in VIP.
1850: * end (of buffer): Basic Concepts.
1851: * expanding (region): Modifying Commands.
1852: * file name completion: Files.
1853: * flag: Ex Command Reference.
1854: * global keymap: Basic Concepts.
1855: * insert mode: Modes in VIP.
1856: * keymap: Basic Concepts.
1857: * line commands: Modifying Commands.
1858: * local keymap: Basic Concepts.
1859: * local keymap: Customizing Key Bindings.
1860: * looking at: Basic Concepts.
1861: * magic: Ex Commands.
1862: * mark: Basic Concepts.
1863: * mark ring: Mark Commands.
1864: * mode: Basic Concepts.
1865: * mode line: Modes in VIP.
1866: * modified (buffer): Buffers and Windows.
1867: * number register: Put Back Commands.
1868: * numeric arguments: Numeric Arguments.
1869: * point: Basic Concepts.
1870: * point commands: Modifying Commands.
1871: * region: Basic Concepts.
1872: * region: Region Commands.
1873: * regular expression: Ex Commands.
1874: * regular expression (replacement): Searching and Replacing.
1875: * regular expression (search): Searching and Replacing.
1876: * selected buffer: Buffers and Windows.
1877: * selected tag table: Ex Command Reference.
1878: * syntax table: Motion Commands.
1879: * tag: Ex Command Reference.
1880: * text: Basic Concepts.
1881: * vanilla (replacement): Searching and Replacing.
1882: * vi mode: Modes in VIP.
1883: * visiting (a file): Files.
1884: * window: Basic Concepts.
1885: * window: Buffers and Windows.
1886: * word: Motion Commands.
1887: * yank: Yank Commands.
1888:
1889:
1890: Tag table:
1891: Node: Top712
1892: Node: Survey1690
1893: Node: Basic Concepts2168
1894: Node: Loading VIP3780
1895: Node: Modes in VIP4500
1896: Node: Emacs Mode7026
1897: Node: Vi Mode7374
1898: Node: Insert Mode7675
1899: Node: Differences from Vi8304
1900: Node: Undoing9291
1901: Node: Changing9641
1902: Node: Searching10244
1903: Node: z Command10952
1904: Node: Counts11277
1905: Node: Marking11805
1906: Node: Region Commands12316
1907: Node: New Commands12979
1908: Node: New Bindings15804
1909: Node: Window Commands17995
1910: Node: Buffer Commands18485
1911: Node: File Commands18983
1912: Node: Misc Commands19374
1913: Node: Vi Commands19825
1914: Node: Numeric Arguments20581
1915: Node: Important Keys21064
1916: Node: Buffers and Windows22817
1917: Node: Files25047
1918: Node: Viewing the Buffer28277
1919: Node: Mark Commands30212
1920: Node: Motion Commands31078
1921: Node: Searching and Replacing36717
1922: Node: Modifying Commands39009
1923: Node: Delete Commands40427
1924: Node: Yank Commands42142
1925: Node: Put Back Commands43034
1926: Node: Change Commands44472
1927: Node: Repeating and Undoing Modifications45498
1928: Node: Other Vi Commands46315
1929: Node: Commands in Insert Mode50024
1930: Node: Ex Commands52115
1931: Node: Ex Command Reference53274
1932: Node: Customization59890
1933: Node: Customizing Constants60357
1934: Node: Customizing Key Bindings61709
1935:
1936: End tag table
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.