1 % Quick Reference Card for VIP 3.5 under GNU Emacs version 18 on Unix systems
3 \newcount\columnsperpage
5 % This file can be printed with 1, 2, or 3 columns per page (see below).
6 % Specify how many you want here.
10 % PDF output layout. 0 for A4, 1 for letter (US), a `l' is added for
16 % Nothing else needs to be changed.
17 % Copyright (C) 1987, 2001, 2002, 2003, 2004, 2005,
18 % 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
20 % This file is part of GNU Emacs.
22 % GNU Emacs is free software: you can redistribute it and/or modify
23 % it under the terms of the GNU General Public License as published by
24 % the Free Software Foundation, either version 3 of the License, or
25 % (at your option) any later version.
27 % GNU Emacs is distributed in the hope that it will be useful,
28 % but WITHOUT ANY WARRANTY; without even the implied warranty of
29 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
30 % GNU General Public License for more details.
32 % You should have received a copy of the GNU General Public License
33 % along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
35 % This file is intended to be processed by plain TeX (TeX82).
37 % The final reference card has six columns, three on each side.
38 % This file can be used to produce it in any of three ways:
40 % produces six separate pages, each of which needs to be reduced to 80%.
41 % This gives the best resolution.
43 % produces three already-reduced pages.
44 % You will still need to cut and paste.
46 % produces two pages which must be printed sideways to make a
47 % ready-to-use 8.5 x 11 inch reference card.
48 % For this you need a dvi device driver that can print sideways.
49 % Which mode to use is controlled by setting \columnsperpage above.
53 % Internet: ms@sail.stanford.edu
54 % Junet: masahiko@sato.riec.tohoku.junet
56 % The original TeX code for formatting the reference card was written by:
58 % UUCP: mit-erl!gildea
59 % Internet: gildea@stop.mail-abuse.org
62 \def\versionnumber{1.2}
63 \def\year{2009} % latest copyright year
64 \def\version{September
2006\ v
\versionnumber}
66 \def\shortcopyrightnotice{\vskip 1ex plus
2 fill
67 \centerline{\small \copyright\
\year\ Free Software Foundation, Inc.
68 Permissions on back. v
\versionnumber}}
71 %\vskip 1ex plus 2 fill\begingroup\small
72 \vskip 1ex
\begingroup\small
73 \centerline{Copyright
\copyright\
\year\ Free Software Foundation, Inc.
}
74 \centerline{designed by Masahiko Sato,
\version}
75 \centerline{for VIP
3.5 under GNU Emacs version
18 on Unix systems
}
77 Permission is granted to make and distribute copies of
78 this card provided the copyright notice and this permission notice
79 are preserved on all copies.
81 For copies of the GNU Emacs manual, write to the Free Software
82 Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA
02110-
1301, USA.
86 % make \bye not \outer so that the \def\bye in the \else clause below
87 % can be scanned without complaint.
88 \def\bye{\par\vfill\supereject\end}
90 \newdimen\intercolumnskip
94 \def\ncolumns{\the\columnsperpage}
96 \message{[\ncolumns\space
97 column
\if 1\ncolumns\else s
\fi\space per page
]}
99 \def\scaledmag#1{ scaled
\magstep #1}
101 % This multi-way format was designed by Stephen Gildea
103 % Slightly modified by Masahiko Sato, September 1987.
109 \font\titlefont=
\fontname\tenbf \scaledmag3
110 \font\headingfont=
\fontname\tenbf \scaledmag2
111 \font\miniheadingfont=
\fontname\tenbf \scaledmag1 % masahiko
112 \font\smallfont=
\fontname\sevenrm
113 \font\smallsy=
\fontname\sevensy
115 \footline{\hss\folio}
116 \def\makefootline{\baselineskip10pt\hsize6.5in
\line{\the\footline}}
120 \hsize 3.41in
% masahiko
121 \vsize 8in
% masahiko
124 \font\titlefont=cmbx10
\scaledmag2
125 \font\headingfont=cmbx10
\scaledmag1
126 \font\miniheadingfont=cmbx10
% masahiko
140 \def\sl{\eightsl} % masahiko
142 \normalbaselineskip=
.8\normalbaselineskip
143 \normallineskip=
.8\normallineskip
144 \normallineskiplimit=
.8\normallineskiplimit
145 \normalbaselines\rm %make definitions take effect
149 \footline{\hss\rm\folio\hss}
150 \def\makefootline{\vskip 2in
\hsize=
6.86in
\line{\the\footline}}
155 \errhelp{You must set
\columnsperpage equal to
1,
2, or
3.
}
156 \errmessage{Illegal number of columns per page
}
159 %\intercolumnskip=.46in
160 \intercolumnskip=
.19in
% masahiko .19x4 + 3.41x3 = 10.99
163 % This next line is useful when designing the layout.
164 %\immediate\write16{Column \folio\abc\space starts with \firstmark}
165 \if \maxcolumn\abc \multicolumnformat \global\def\abc{a
}
167 \global\setbox\columna\columnbox \global\def\abc{b
}
168 %% in case we never use \columnb (two-column mode)
169 \global\setbox\columnb\hbox to -
\intercolumnskip{}
171 \global\setbox\columnb\columnbox \global\def\abc{c
}\fi\fi}
172 \def\multicolumnformat{\shipout\vbox{\makeheadline
173 \hbox{\box\columna\hskip\intercolumnskip
174 \box\columnb\hskip\intercolumnskip\columnbox}
175 \makefootline}\advancepageno}
176 \def\columnbox{\leftline{\pagebody}}
178 \def\bye{\par\vfill\supereject
179 \if a
\abc \else\null\vfill\eject\fi
180 \if a
\abc \else\null\vfill\eject\fi
184 % we won't be using math mode much, so redefine some of the characters
185 % we might want to talk about
193 \hyphenation{mini-buf-fer
}
196 \parskip 1ex plus
.5ex minus
.5ex
198 \def\small{\smallfont\textfont2=
\smallsy\baselineskip=
.8\baselineskip}
200 \outer\def\newcolumn{\vfill\eject}
202 \outer\def\title#1{{\titlefont\centerline{#1}}\vskip 1ex plus
.5ex
}
204 \outer\def\section#1{\par\filbreak
205 \vskip 3ex plus
2ex minus
2ex
{\headingfont #1}\mark{#1}%
206 \vskip 2ex plus
1ex minus
1.5ex
}
209 \outer\def\subsection#1{\par\filbreak
210 \vskip 2ex plus
2ex minus
2ex
{\miniheadingfont #1}\mark{#1}%
211 \vskip 1ex plus
1ex minus
1.5ex
}
215 \def\beginindentedkeys{\keyindent=
1em
}
216 \def\endindentedkeys{\keyindent=
0em
}
219 \def\paralign{\vskip\parskip\halign}
221 \def\<
#1>
{$
\langle$
{\rm #1}$
\rangle$
}
223 \def\kbd#1{{\tt#1}\null} %\null so not an abbrev even if period follows
225 \def\beginexample{\par\leavevmode\begingroup
226 \obeylines\obeyspaces\parskip0pt\tt}
227 {\obeyspaces\global\let =\
}
228 \def\endexample{\endgroup}
230 \def\key#1#2{\leavevmode\hbox to
\hsize{\vtop
231 {\hsize=
.75\hsize\rightskip=
1em
232 \hskip\keyindent\relax#1}\kbd{#2}\hfil}}
235 \setbox\metaxbox\hbox{\kbd{M-x
}}
237 \metaxwidth=
\wd\metaxbox
239 \def\metax#1#2{\leavevmode\hbox to
\hsize{\hbox to
.75\hsize
240 {\hskip\keyindent\relax#1\hfil}%
241 \hskip -
\metaxwidth minus
1fil
244 \def\fivecol#1#2#3#4#5{\hskip\keyindent\relax#1\hfil&
\kbd{#2}\quad
245 &
\kbd{#3}\quad&
\kbd{#4}\quad&
\kbd{#5}\cr}
247 \def\fourcol#1#2#3#4{\hskip\keyindent\relax#1\hfil&
\kbd{#2}\quad
248 &
\kbd{#3}\quad&
\kbd{#4}\quad\cr}
250 \def\threecol#1#2#3{\hskip\keyindent\relax#1\hfil&
\kbd{#2}\quad
253 \def\twocol#1#2{\hskip\keyindent\relax\kbd{#1}\hfil&
\kbd{#2}\quad\cr}
255 \def\twocolkey#1#2#3#4{\hskip\keyindent\relax#1\hfil&
\kbd{#2}\quad&
\relax#3\hfil&
\kbd{#4}\quad\cr}
261 \title{VIP Quick Reference Card
}
263 \centerline{(for version
3.5 under GNU Emacs version
18)
}
267 \section{Loading VIP
}
269 Just type
\kbd{M-x vip-mode
} followed by
\kbd{RET
}
273 VIP has three modes:
{\it emacs mode
},
{\it vi mode
} and
{\it insert mode
}.
274 Mode line tells you which mode you are in.
275 In emacs mode you can do all the normal GNU Emacs editing.
276 This card explains only vi mode and insert mode.
277 {\bf GNU Emacs Reference Card
} explains emacs mode.
278 You can switch modes as follows.
280 \key{from emacs mode to vi mode
}{C-z
}
281 \key{from vi mode to emacs mode
}{C-z
}
282 \metax{from vi mode to insert mode
}{i, I, a, A, o, O
{\rm or
} C-o
}
283 \key{from insert mode to vi mode
}{ESC
}
285 If you wish to be in vi mode just after you startup Emacs,
289 \kbd{(setq term-setup-hook 'vip-mode)
}
291 in your
\kbd{.emacs
} file.
292 Or, you can put the following alias in your
\kbd{.cshrc
} file.
295 \kbd{alias vip 'emacs \\!* -f vip-mode'
}
298 \section{Insert Mode
}
299 Insert mode is like emacs mode except for the following.
301 \key{go back to vi mode
}{ESC
}
302 \key{delete previous character
}{C-h
}
303 \key{delete previous word
}{C-w
}
304 \key{emulate
\kbd{ESC
} key in emacs mode
}{C-z
}
306 The rest of this card explains commands in
{\bf vi mode
}.
308 \section{Getting Information on VIP
}
310 Execute info command by typing
\kbd{M-x info
} and select menu item
313 \key{describe function attached to the key
{\it x
}}{C-h k
{\it x
}}
315 \section{Leaving Emacs
}
317 \key{suspend Emacs
}{X Z
{\rm or
} :st
}
318 \metax{exit Emacs permanently
}{Z Z
{\rm or
} X C
{\rm or
} :q
}
320 \section{Error Recovery
}
322 \key{abort partially typed or executing command
}{C-g
}
323 \key{redraw messed up screen
}{C-l
}
324 \metax{{\bf recover
} a file lost by a system crash
}{M-x recover-file
}
325 \metax{restore a buffer to its original contents
}{M-x revert-buffer
}
327 \shortcopyrightnotice
331 Most commands in vi mode accept a
{\it count
} which can be supplied as a
332 prefix to the commands. In most cases, if a count is given, the
333 command is executed that many times. E.g.,
\kbd{5 d d
} deletes
5
336 %\shortcopyrightnotice
339 There are
26 registers (
\kbd{a
} to
\kbd{z
}) that can store texts
341 You can append a text at the end of a register (say
\kbd{x
}) by
342 specifying the register name in capital letter (say
\kbd{X
}).
343 There are also
9 read only registers (
\kbd{1} to
\kbd{9}) that store
344 up to
9 previous changes.
345 We will use
{\it x\/
} to denote a register.
346 \section{Entering Insert Mode
}
348 \key{{\bf insert
} at point
}{i
}
349 \key{{\bf append
} after cursor
}{a
}
350 \key{{\bf insert
} before first non-white
}{I
}
351 \key{{\bf append
} at end of line
}{A
}
352 \key{{\bf open
} line below
}{o
}
353 \key{{\bf open
} line above
}{O
}
354 \key{{\bf open
} line at point
}{C-o
}
356 \section{Buffers and Windows
}
358 \key{move cursor to
{\bf next
} window
}{C-n
}
359 \key{delete current window
}{X
0}
360 \key{delete other windows
}{X
1}
361 \key{split current window into two windows
}{X
2}
362 \key{show current buffer in two windows
}{X
3}
363 \key{{\bf switch
} to a buffer in the current window
}{s
{\sl buffer
}}
364 \key{{\bf switch
} to a buffer in another window
}{S
{\sl buffer
}}
365 \key{{\bf kill
} a buffer
}{K
}
366 \key{list existing
{\bf buffers
}}{X B
}
370 \metax{{\bf visit
} file in the current window
}{v
{\sl file
} {\rm or
} :e
{\sl file
}}
371 \key{{\bf visit
} file in another window
}{V
{\sl file
}}
372 \key{{\bf save
} buffer to the associated file
}{X S
}
373 \key{{\bf write
} buffer to a specified file
}{X W
}
374 \key{{\bf insert
} a specified file at point
}{X I
}
375 \key{{\bf get
} information on the current
{\bf file
}}{g
{\rm or
} :f
}
376 \key{run the
{\bf directory
} editor
}{X d
}
378 \section{Viewing the Buffer
}
380 \key{scroll to next screen
}{SPC
{\rm or
} C-f
}
381 \key{scroll to previous screen
}{RET
{\rm or
} C-b
}
382 \key{scroll
{\bf down
} half screen
}{C-d
}
383 \key{scroll
{\bf up
} half screen
}{C-u
}
384 \key{scroll down one line
}{C-e
}
385 \key{scroll up one line
}{C-y
}
387 \key{put current line on the
{\bf home
} line
}{z H
{\rm or
} z RET
}
388 \key{put current line on the
{\bf middle
} line
}{z M
{\rm or
} z .
}
389 \key{put current line on the
{\bf last
} line
}{z L
{\rm or
} z -
}
391 \section{Marking and Returning
}
393 \key{{\bf mark
} point in register
{\it x
}}{m
{\it x
}}
394 \key{set mark at buffer beginning
}{m <
}
395 \key{set mark at buffer end
}{m >
}
396 \key{set mark at point
}{m .
}
397 \key{jump to mark
}{m ,
}
398 \key{exchange point and mark
}{` `
}
399 \key{... and skip to first non-white on line
}{' '
}
400 \key{go to mark
{\it x
}}{`
{\it x
}}
401 \key{... and skip to first non-white on line
}{'
{\it x
}}
405 \key{start remembering keyboard macro
}{X (
}
406 \key{finish remembering keyboard macro
}{X )
}
407 \key{call last keyboard macro
}{*
}
408 \key{execute macro stored in register
{\it x
}}{@
{\it x
}}
410 \section{Motion Commands
}
412 \key{go backward one character
}{h
}
413 \key{go forward one character
}{l
}
414 \key{next line keeping the column
}{j
}
415 \key{previous line keeping the column
}{k
}
416 \key{next line at first non-white
}{+
}
417 \key{previous line at first non-white
}{-
}
419 \key{beginning of line
}{0}
420 \key{first non-white on line
}{^
}
421 \key{end of line
}{\$
}
422 \key{go to
{\it n
}-th column on line
}{{\it n
} |
}
424 \key{go to
{\it n
}-th line
}{{\it n
} G
}
425 \key{go to last line
}{G
}
426 \key{find matching parenthesis for
\kbd{()
},
\kbd{\
{\
}} and
\kbd{[]}}{\%
}
428 \key{go to
{\bf home
} window line
}{H
}
429 \key{go to
{\bf middle
} window line
}{M
}
430 \key{go to
{\bf last
} window line
}{L
}
432 \subsection{Words, Sentences, Paragraphs
}
434 \key{forward
{\bf word
}}{w
{\rm or
} W
}
435 \key{{\bf backward
} word
}{b
{\rm or
} B
}
436 \key{{\bf end
} of word
}{e
{\rm or
} E
}
438 In the case of capital letter commands, a word is delimited by a
441 \key{forward sentence
}{)
}
442 \key{backward sentence
}{(
}
444 \key{forward paragraph
}{\
}}
445 \key{backward paragraph
}{\
{}
447 \subsection{Find Characters on the Line
}
449 \key{{\bf find
} {\it c
} forward on line
}{f
{\it c
}}
450 \key{{\bf find
} {\it c
} backward on line
}{F
{\it c
}}
451 \key{up
{\bf to
} {\it c
} forward on line
}{t
{\it c
}}
452 \key{up
{\bf to
} {\it c
} backward on line
}{T
{\it c
}}
453 \key{repeat previous
\kbd{f
},
\kbd{F
},
\kbd{t
} or
\kbd{T
}}{;
}
454 \key{... in the opposite direction
}{,
}
457 \title{VIP Quick Reference Card
}
459 \section{Searching and Replacing
}
461 \key{search forward for
{\sl pat
}}{/
{\sl pat
}}
462 \key{search backward for
{\sl pat
}}{?\
{\sl pat
}}
463 \key{repeat previous search
}{n
}
464 \key{... in the opposite direction
}{N
}
466 \key{incremental
{\bf search
}}{C-s
}
467 \key{{\bf reverse
} incremental search
}{C-r
}
469 \key{{\bf replace
}}{R
}
470 \key{{\bf query
} replace
}{Q
}
471 \key{{\bf replace
} a character by another character
{\it c
}}{r
{\it c
}}
473 \section{Modifying Commands
}
475 The delete (yank, change) commands explained below accept a motion command as
476 their argument and delete (yank, change) the region determined by the motion
477 command. Motion commands are classified into
{\it point commands
} and
478 {\it line commands
}. In the case of line commands, whole lines will
479 be affected by the command. Motion commands will be represented by
482 The point commands are as follows:
485 \kbd{h l
0 ^ \$ w W b B e E ( ) / ?\ ` f F t T \% ; ,
}
487 The line commands are as follows:
490 \kbd{j k + - H M L \
{ \
} G '
}
492 \subsection{Delete/Yank/Change Commands
}
494 \paralign to
\hsize{#
\tabskip=
10pt plus
1 fil&#
\tabskip=
0pt&#
\tabskip=
0pt&#
\cr
495 \fourcol{}{{\bf delete
}}{{\bf yank
}}{{\bf change
}}
496 \fourcol{region determined by
{\it m
}}{d
{\it m
}}{y
{\it m
}}{c
{\it m
}}
497 \fourcol{... into register
{\it x
}}{"
{\it x\/
} d
{\it m
}}{"
{\it x\/
} y
{\it m
}}{"
{\it x\/
} c
{\it m
}}
498 \fourcol{a line
}{d d
}{Y
{\rm or
} y y
}{c c
}
499 \fourcol{current
{\bf region
}}{d r
}{y r
}{c r
}
500 \fourcol{expanded
{\bf region
}}{d R
}{y R
}{c R
}
501 \fourcol{to end of line
}{D
}{y \$
}{c \$
}
502 \fourcol{a character after point
}{x
}{y l
}{c l
}
503 \fourcol{a character before point
}{DEL
}{y h
}{c h
}
506 \subsection{Put Back Commands
}
508 Deleted/yanked/changed text can be put back by the following commands.
510 \key{{\bf Put
} back at point/above line
}{P
}
511 \key{... from register
{\it x
}}{"
{\it x\/
} P
}
512 \key{{\bf put
} back after point/below line
}{p
}
513 \key{... from register
{\it x
}}{"
{\it x\/
} p
}
515 \subsection{Repeating and Undoing Modifications
}
517 \key{{\bf undo
} last change
}{u
{\rm or
} :und
}
518 \key{repeat last change
}{.\
{\rm (dot)
}}
520 Undo is undoable by
\kbd{u
} and repeatable by
\kbd{.
}.
521 For example,
\kbd{u...
} will undo
4 previous changes.
522 A
\kbd{.
} after
\kbd{5dd
} is equivalent to
\kbd{5dd
},
523 while
\kbd{3.
} after
\kbd{5dd
} is equivalent to
\kbd{3dd
}.
525 \section{Miscellaneous Commands
}
529 \paralign to
\hsize{#
\tabskip=
5pt plus
1 fil&#
\tabskip=
0pt&#
\tabskip=
0pt&#
\tabskip=
0pt&#
\cr
530 \fivecol{}{{\bf shift left
}}{{\bf shift right
}}{{\bf filter shell command
}}{{\bf indent
}}
531 \fivecol{region
}{<
{\it m
}}{>
{\it m
}}{!\
{\it m\/
} {\sl shell-com
}}{=
{\it m
}}
532 \fivecol{line
}{< <
}{> >
}{!\ !\
{\sl shell-com
}}{= =
}
535 \key{emulate
\kbd{ESC
}/
\kbd{C-h
} in emacs mode
}{ESC
{\rm /
}C-h
}
536 \key{emulate
\kbd{C-c
}/
\kbd{C-x
} in emacs mode
}{C
{\rm /
}X
}
538 \key{{\bf join
} lines
}{J
}
540 \key{lowercase region
}{\# c
{\it m
}}
541 \key{uppercase region
}{\# C
{\it m
}}
542 \key{execute last keyboard macro on each line in the region
}{\# g
{\it m
}}
544 \key{insert specified string for each line in the region
}{\# q
{\it m
}}
545 \key{check spelling of the words in the region
}{\# s
{\it m
}}
547 \section{Differences from Vi
}
551 In VIP some keys behave rather differently from Vi.
552 The table below lists such keys, and you can get the effect of typing
553 these keys by typing the corresponding keys in the VIP column.
555 \paralign to
\hsize{#
\tabskip=
10pt plus
1 fil&#
\tabskip=
0pt&#
\cr
556 \threecol{}{{\bf Vi
}}{{\bf VIP
}}
557 \threecol{forward character
}{SPC
}{l
}
558 \threecol{backward character
}{C-h
}{h
}
559 \threecol{next line at first non-white
}{RET
}{+
}
560 \threecol{delete previous character
}{X
}{DEL
}
561 \threecol{get information on file
}{C-g
}{g
}
562 \threecol{substitute characters
}{s
}{x i
}
563 \threecol{substitute line
}{S
}{c c
}
564 \threecol{change to end of line
}{C
{\rm or
} R
}{c \$
}
567 (Strictly speaking,
\kbd{C
} and
\kbd{R
} behave slightly differently in Vi.)
569 \section{Customization
}
571 By default, search is case sensitive.
572 You can change this by including the following line in your
\kbd{.vip
} file.
575 \kbd{(setq vip-case-fold-search t)
}
579 \paralign to
\hsize{#
\tabskip=
10pt plus
1 fil&#
\tabskip=
0pt&#
\cr
580 \twocol{{\bf variable
}}{{\bf default value
}}
581 \twocol{vip-search-wrap-around
}{t
}
582 \twocol{vip-case-fold-search
}{nil
}
583 \twocol{vip-re-search
}{nil
}
584 \twocol{vip-re-replace
}{nil
}
585 \twocol{vip-re-query-replace
}{nil
}
586 \twocol{vip-open-with-indent
}{nil
}
587 \twocol{vip-help-in-insert-mode
}{nil
}
588 \twocol{vip-shift-width
}{8}
589 \twocol{vip-tags-file-name
}{"TAGS"
}
592 %\subsection{Customizing Key Bindings}
594 Include (some of) following lines in your
\kbd{.vip
} file
595 to restore Vi key bindings.
598 (define-key vip-mode-map "\
\C-g" 'vip-info-on-file)
599 (define-key vip-mode-map "\
\C-h" 'vip-backward-char)
600 (define-key vip-mode-map "\
\C-m" 'vip-next-line-at-bol)
601 (define-key vip-mode-map " " 'vip-forward-char)
602 (define-key vip-mode-map "g" 'vip-keyboard-quit)
603 (define-key vip-mode-map "s" 'vip-substitute)
604 (define-key vip-mode-map "C" 'vip-change-to-eol)
605 (define-key vip-mode-map "R" 'vip-change-to-eol)
606 (define-key vip-mode-map "S" 'vip-substitute-line)
607 (define-key vip-mode-map "X" 'vip-delete-backward-char)
612 \title{Ex Commands in VIP
}
614 In vi mode, an Ex command is entered by typing:
617 \kbd{:\
{\sl ex-command
} RET
}
619 \section{Ex Addresses
}
621 \paralign to
\hsize{#
\tabskip=
5pt plus
1 fil&#
\tabskip=
2pt&#
\tabskip=
5pt plus
1 fil&#
\cr
622 \twocolkey{current line
}{.
}{next line with
{\sl pat
}}{/
{\sl pat
} /
}
623 \twocolkey{line
{\it n
}}{{\it n
}}{previous line with
{\sl pat
}}{?\
{\sl pat
} ?
}
624 \twocolkey{last line
}{\$
}{{\it n\/
} line before
{\it a
}}{{\it a
} -
{\it n
}}
625 \twocolkey{next line
}{+
}{{\it a\/
} through
{\it b
}}{{\it a\/
} ,
{\it b
}}
626 \twocolkey{previous line
}{-
}{line marked with
{\it x
}}{'
{\it x
}}
627 \twocolkey{entire buffer
}{\%
}{previous context
}{' '
}
630 Addresses can be specified in front of a command.
636 moves
11 lines below current line to the end of buffer.
638 \section{Ex Commands
}
642 \key{mark lines matching
{\sl pat
} and execute
{\sl cmds
} on these lines
}{:g /
{\sl pat
}/
{\sl cmds
}}
644 \key{mark lines
{\it not\/
} matching
{\sl pat
} and execute
{\sl cmds
} on these lines
}{:v /
{\sl pat
}/
{\sl cmds
}}
647 \key{{\bf move
} specified lines after
{\sl addr
}}{:m
{\sl addr
}}
648 \key{{\bf copy
} specified lines after
{\sl addr
}}{:co
\rm\ (or
\kbd{:t
})\
\sl addr
}
649 \key{{\bf delete
} specified lines
[into register
{\it x\/
}]}{:d
{\rm [{\it x\/
}]}}
650 \key{{\bf yank
} specified lines
[into register
{\it x\/
}]}{:y
{\rm [{\it x\/
}]}}
651 \key{{\bf put
} back text
[from register
{\it x\/
}]}{:pu
{\rm [{\it x\/
}]}}
653 \key{{\bf substitute
} {\sl repl
} for first string on line matching
{\sl pat
}}{:s /
{\sl pat
}/
{\sl repl
}/
}
655 \key{repeat last substitution
}{:\&
}
656 \key{repeat previous substitute with previous search pattern as
{\sl pat
}}{:\~
{}}
658 \key{{\bf read
} in a file
}{:r
{\sl file
}}
659 \key{{\bf read
} in the output of a shell command
}{:r!\
{\sl command
}}
660 \key{write out specified lines into
{\sl file
}}{:w
{\sl file
}}
661 \key{write out specified lines at the end of
{\sl file
}}{:w>>
{\sl file
}}
662 \key{write out and then quit
}{:wq
{\sl file
}}
664 \key{define a macro
{\it x
} that expands to
{\sl cmd
}}{:map
{\it x
} {\sl cmd
}}
665 \key{remove macro expansion associated with
{\it x
}}{:unma
{\it x
}}
667 \key{print line number
}{:=
}
668 \key{print
{\bf version
} number of VIP
}{:ve
}
670 \key{shift specified lines to the right
}{:>
}
671 \key{shift specified lines to the left
}{:<
}
673 \key{{\bf join
} lines
}{:j
}
674 \key{mark specified line to register
{\it x
}}{:k
{\it x
}}
675 \key{{\bf set
} a variable's value
}{:se
}
676 \key{run a sub
{\bf shell
} in a window
}{:sh
}
677 \key{execute shell command
{\sl command
}}{:!\
{\sl command
}}
678 \key{find first definition of
{\bf tag
} {\sl tag
}}{:ta
{\sl tag
}}
686 % compile-command: "pdftex vipcard"
689 % arch-tag: 342a9548-4de4-499d-b864-74fb426b6729