annotate etc/vipcard.tex @ 89954:97905c4f1a42

Revision: miles@gnu.org--gnu-2004/emacs--unicode--0--patch-24 Merge from lorentey@elte.hu--2004/emacs--hacks--0, emacs--cvs-trunk--0 Patches applied: * lorentey@elte.hu--2004/emacs--hacks--0--patch-2 Prevent special events from appending dashes to the echo string. * lorentey@elte.hu--2004/emacs--hacks--0--patch-4 Added ChangeLog entry. * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-451 Update from CVS: lisp/subr.el (get-buffer-window-list): Doc fix. * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-452 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-454 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-455 Bash the dashes * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-456 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-458 Update from CVS
author Miles Bader <miles@gnu.org>
date Sat, 17 Jul 2004 02:46:48 +0000
parents 68c22ea6027c
children f9a65d7ebd29
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
25853
Dave Love <fx@gnu.org>
parents:
diff changeset
1 % Quick Reference Card for VIP 3.5 under GNU Emacs version 18 on Unix systems
Dave Love <fx@gnu.org>
parents:
diff changeset
2 %**start of header
Dave Love <fx@gnu.org>
parents:
diff changeset
3 \newcount\columnsperpage
Dave Love <fx@gnu.org>
parents:
diff changeset
4
Dave Love <fx@gnu.org>
parents:
diff changeset
5 % This file can be printed with 1, 2, or 3 columns per page (see below).
Dave Love <fx@gnu.org>
parents:
diff changeset
6 % Specify how many you want here. Nothing else needs to be changed.
Dave Love <fx@gnu.org>
parents:
diff changeset
7
Dave Love <fx@gnu.org>
parents:
diff changeset
8 \columnsperpage=1
Dave Love <fx@gnu.org>
parents:
diff changeset
9
Dave Love <fx@gnu.org>
parents:
diff changeset
10 % Copyright (c) 1987 Free Software Foundation, Inc.
Dave Love <fx@gnu.org>
parents:
diff changeset
11
Dave Love <fx@gnu.org>
parents:
diff changeset
12 % This file is part of GNU Emacs.
Dave Love <fx@gnu.org>
parents:
diff changeset
13
Dave Love <fx@gnu.org>
parents:
diff changeset
14 % This file is distributed in the hope that it will be useful,
Dave Love <fx@gnu.org>
parents:
diff changeset
15 % but WITHOUT ANY WARRANTY. No author or distributor
Dave Love <fx@gnu.org>
parents:
diff changeset
16 % accepts responsibility to anyone for the consequences of using it
Dave Love <fx@gnu.org>
parents:
diff changeset
17 % or for whether it serves any particular purpose or describes
Dave Love <fx@gnu.org>
parents:
diff changeset
18 % any piece of software unless they say so in writing. Refer to the
Dave Love <fx@gnu.org>
parents:
diff changeset
19 % GNU Emacs General Public License for full details.
Dave Love <fx@gnu.org>
parents:
diff changeset
20 %
Dave Love <fx@gnu.org>
parents:
diff changeset
21 % Permission is granted to copy, modify and redistribute this source
Dave Love <fx@gnu.org>
parents:
diff changeset
22 % file provided the copyright notice and permission notices are
Dave Love <fx@gnu.org>
parents:
diff changeset
23 % preserved on all copies.
Dave Love <fx@gnu.org>
parents:
diff changeset
24 %
Dave Love <fx@gnu.org>
parents:
diff changeset
25 % Permission is granted to process this file through TeX and print the
Dave Love <fx@gnu.org>
parents:
diff changeset
26 % results, provided the printed document carries copyright and
Dave Love <fx@gnu.org>
parents:
diff changeset
27 % permission notices identical to the ones below.
Dave Love <fx@gnu.org>
parents:
diff changeset
28
Dave Love <fx@gnu.org>
parents:
diff changeset
29 % This file is intended to be processed by plain TeX (TeX82).
Dave Love <fx@gnu.org>
parents:
diff changeset
30 %
Dave Love <fx@gnu.org>
parents:
diff changeset
31 % The final reference card has six columns, three on each side.
Dave Love <fx@gnu.org>
parents:
diff changeset
32 % This file can be used to produce it in any of three ways:
Dave Love <fx@gnu.org>
parents:
diff changeset
33 % 1 column per page
Dave Love <fx@gnu.org>
parents:
diff changeset
34 % produces six separate pages, each of which needs to be reduced to 80%.
Dave Love <fx@gnu.org>
parents:
diff changeset
35 % This gives the best resolution.
Dave Love <fx@gnu.org>
parents:
diff changeset
36 % 2 columns per page
Dave Love <fx@gnu.org>
parents:
diff changeset
37 % produces three already-reduced pages.
Dave Love <fx@gnu.org>
parents:
diff changeset
38 % You will still need to cut and paste.
Dave Love <fx@gnu.org>
parents:
diff changeset
39 % 3 columns per page
Dave Love <fx@gnu.org>
parents:
diff changeset
40 % produces two pages which must be printed sideways to make a
Dave Love <fx@gnu.org>
parents:
diff changeset
41 % ready-to-use 8.5 x 11 inch reference card.
Dave Love <fx@gnu.org>
parents:
diff changeset
42 % For this you need a dvi device driver that can print sideways.
Dave Love <fx@gnu.org>
parents:
diff changeset
43 % Which mode to use is controlled by setting \columnsperpage above.
Dave Love <fx@gnu.org>
parents:
diff changeset
44 %
Dave Love <fx@gnu.org>
parents:
diff changeset
45 % Author:
Dave Love <fx@gnu.org>
parents:
diff changeset
46 % Masahiko Sato
Dave Love <fx@gnu.org>
parents:
diff changeset
47 % Internet: ms@sail.stanford.edu
Dave Love <fx@gnu.org>
parents:
diff changeset
48 % Junet: masahiko@sato.riec.tohoku.junet
Dave Love <fx@gnu.org>
parents:
diff changeset
49 %
Dave Love <fx@gnu.org>
parents:
diff changeset
50 % The original TeX code for formatting the reference card was written by:
Dave Love <fx@gnu.org>
parents:
diff changeset
51 % Stephen Gildea
Dave Love <fx@gnu.org>
parents:
diff changeset
52 % UUCP: mit-erl!gildea
39400
e69aa66ec7cc Update Stephen Gildea's mail address.
Eli Zaretskii <eliz@gnu.org>
parents: 25853
diff changeset
53 % Internet: gildea@stop.mail-abuse.org
25853
Dave Love <fx@gnu.org>
parents:
diff changeset
54
Dave Love <fx@gnu.org>
parents:
diff changeset
55
Dave Love <fx@gnu.org>
parents:
diff changeset
56 \def\versionnumber{1.2}
Dave Love <fx@gnu.org>
parents:
diff changeset
57 \def\year{1987}
Dave Love <fx@gnu.org>
parents:
diff changeset
58 \def\version{September \year\ v\versionnumber}
Dave Love <fx@gnu.org>
parents:
diff changeset
59
Dave Love <fx@gnu.org>
parents:
diff changeset
60 \def\shortcopyrightnotice{\vskip 1ex plus 2 fill
Dave Love <fx@gnu.org>
parents:
diff changeset
61 \centerline{\small \copyright\ \year\ Free Software Foundation, Inc.
Dave Love <fx@gnu.org>
parents:
diff changeset
62 Permissions on back. v\versionnumber}}
Dave Love <fx@gnu.org>
parents:
diff changeset
63
Dave Love <fx@gnu.org>
parents:
diff changeset
64 \def\copyrightnotice{
Dave Love <fx@gnu.org>
parents:
diff changeset
65 %\vskip 1ex plus 2 fill\begingroup\small
Dave Love <fx@gnu.org>
parents:
diff changeset
66 \vskip 1ex \begingroup\small
Dave Love <fx@gnu.org>
parents:
diff changeset
67 \centerline{Copyright \copyright\ \year\ Free Software Foundation, Inc.}
Dave Love <fx@gnu.org>
parents:
diff changeset
68 \centerline{designed by Masahiko Sato, \version}
Dave Love <fx@gnu.org>
parents:
diff changeset
69 \centerline{for VIP 3.5 under GNU Emacs version 18 on Unix systems}
Dave Love <fx@gnu.org>
parents:
diff changeset
70
Dave Love <fx@gnu.org>
parents:
diff changeset
71 Permission is granted to make and distribute copies of
Dave Love <fx@gnu.org>
parents:
diff changeset
72 this card provided the copyright notice and this permission notice
Dave Love <fx@gnu.org>
parents:
diff changeset
73 are preserved on all copies.
Dave Love <fx@gnu.org>
parents:
diff changeset
74
Dave Love <fx@gnu.org>
parents:
diff changeset
75 For copies of the GNU Emacs manual, write to the Free Software
Dave Love <fx@gnu.org>
parents:
diff changeset
76 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Dave Love <fx@gnu.org>
parents:
diff changeset
77
Dave Love <fx@gnu.org>
parents:
diff changeset
78 \endgroup}
Dave Love <fx@gnu.org>
parents:
diff changeset
79
Dave Love <fx@gnu.org>
parents:
diff changeset
80 % make \bye not \outer so that the \def\bye in the \else clause below
Dave Love <fx@gnu.org>
parents:
diff changeset
81 % can be scanned without complaint.
Dave Love <fx@gnu.org>
parents:
diff changeset
82 \def\bye{\par\vfill\supereject\end}
Dave Love <fx@gnu.org>
parents:
diff changeset
83
Dave Love <fx@gnu.org>
parents:
diff changeset
84 \newdimen\intercolumnskip
Dave Love <fx@gnu.org>
parents:
diff changeset
85 \newbox\columna
Dave Love <fx@gnu.org>
parents:
diff changeset
86 \newbox\columnb
Dave Love <fx@gnu.org>
parents:
diff changeset
87
Dave Love <fx@gnu.org>
parents:
diff changeset
88 \def\ncolumns{\the\columnsperpage}
Dave Love <fx@gnu.org>
parents:
diff changeset
89
49600
23a1cea22d13 Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 39400
diff changeset
90 \message{[\ncolumns\space
25853
Dave Love <fx@gnu.org>
parents:
diff changeset
91 column\if 1\ncolumns\else s\fi\space per page]}
Dave Love <fx@gnu.org>
parents:
diff changeset
92
Dave Love <fx@gnu.org>
parents:
diff changeset
93 \def\scaledmag#1{ scaled \magstep #1}
Dave Love <fx@gnu.org>
parents:
diff changeset
94
Dave Love <fx@gnu.org>
parents:
diff changeset
95 % This multi-way format was designed by Stephen Gildea
Dave Love <fx@gnu.org>
parents:
diff changeset
96 % October 1986.
Dave Love <fx@gnu.org>
parents:
diff changeset
97 % Slightly modified by Masahiko Sato, September 1987.
Dave Love <fx@gnu.org>
parents:
diff changeset
98 \if 1\ncolumns
Dave Love <fx@gnu.org>
parents:
diff changeset
99 \hsize 4in
Dave Love <fx@gnu.org>
parents:
diff changeset
100 \vsize 10in
Dave Love <fx@gnu.org>
parents:
diff changeset
101 %\voffset -.7in
Dave Love <fx@gnu.org>
parents:
diff changeset
102 \voffset -.57in
Dave Love <fx@gnu.org>
parents:
diff changeset
103 \font\titlefont=\fontname\tenbf \scaledmag3
Dave Love <fx@gnu.org>
parents:
diff changeset
104 \font\headingfont=\fontname\tenbf \scaledmag2
Dave Love <fx@gnu.org>
parents:
diff changeset
105 \font\miniheadingfont=\fontname\tenbf \scaledmag1 % masahiko
Dave Love <fx@gnu.org>
parents:
diff changeset
106 \font\smallfont=\fontname\sevenrm
Dave Love <fx@gnu.org>
parents:
diff changeset
107 \font\smallsy=\fontname\sevensy
Dave Love <fx@gnu.org>
parents:
diff changeset
108
Dave Love <fx@gnu.org>
parents:
diff changeset
109 \footline{\hss\folio}
Dave Love <fx@gnu.org>
parents:
diff changeset
110 \def\makefootline{\baselineskip10pt\hsize6.5in\line{\the\footline}}
Dave Love <fx@gnu.org>
parents:
diff changeset
111 \else
Dave Love <fx@gnu.org>
parents:
diff changeset
112 %\hsize 3.2in
Dave Love <fx@gnu.org>
parents:
diff changeset
113 %\vsize 7.95in
Dave Love <fx@gnu.org>
parents:
diff changeset
114 \hsize 3.41in % masahiko
Dave Love <fx@gnu.org>
parents:
diff changeset
115 \vsize 8in % masahiko
Dave Love <fx@gnu.org>
parents:
diff changeset
116 \hoffset -.75in
Dave Love <fx@gnu.org>
parents:
diff changeset
117 \voffset -.745in
Dave Love <fx@gnu.org>
parents:
diff changeset
118 \font\titlefont=cmbx10 \scaledmag2
Dave Love <fx@gnu.org>
parents:
diff changeset
119 \font\headingfont=cmbx10 \scaledmag1
Dave Love <fx@gnu.org>
parents:
diff changeset
120 \font\miniheadingfont=cmbx10 % masahiko
Dave Love <fx@gnu.org>
parents:
diff changeset
121 \font\smallfont=cmr6
Dave Love <fx@gnu.org>
parents:
diff changeset
122 \font\smallsy=cmsy6
Dave Love <fx@gnu.org>
parents:
diff changeset
123 \font\eightrm=cmr8
Dave Love <fx@gnu.org>
parents:
diff changeset
124 \font\eightbf=cmbx8
Dave Love <fx@gnu.org>
parents:
diff changeset
125 \font\eightit=cmti8
Dave Love <fx@gnu.org>
parents:
diff changeset
126 \font\eightsl=cmsl8
Dave Love <fx@gnu.org>
parents:
diff changeset
127 \font\eighttt=cmtt8
Dave Love <fx@gnu.org>
parents:
diff changeset
128 \font\eightsy=cmsy8
Dave Love <fx@gnu.org>
parents:
diff changeset
129 \textfont0=\eightrm
Dave Love <fx@gnu.org>
parents:
diff changeset
130 \textfont2=\eightsy
Dave Love <fx@gnu.org>
parents:
diff changeset
131 \def\rm{\eightrm}
Dave Love <fx@gnu.org>
parents:
diff changeset
132 \def\bf{\eightbf}
Dave Love <fx@gnu.org>
parents:
diff changeset
133 \def\it{\eightit}
Dave Love <fx@gnu.org>
parents:
diff changeset
134 \def\sl{\eightsl} % masahiko
Dave Love <fx@gnu.org>
parents:
diff changeset
135 \def\tt{\eighttt}
Dave Love <fx@gnu.org>
parents:
diff changeset
136 \normalbaselineskip=.8\normalbaselineskip
Dave Love <fx@gnu.org>
parents:
diff changeset
137 \normallineskip=.8\normallineskip
Dave Love <fx@gnu.org>
parents:
diff changeset
138 \normallineskiplimit=.8\normallineskiplimit
Dave Love <fx@gnu.org>
parents:
diff changeset
139 \normalbaselines\rm %make definitions take effect
Dave Love <fx@gnu.org>
parents:
diff changeset
140
Dave Love <fx@gnu.org>
parents:
diff changeset
141 \if 2\ncolumns
Dave Love <fx@gnu.org>
parents:
diff changeset
142 \let\maxcolumn=b
Dave Love <fx@gnu.org>
parents:
diff changeset
143 \footline{\hss\rm\folio\hss}
Dave Love <fx@gnu.org>
parents:
diff changeset
144 \def\makefootline{\vskip 2in \hsize=6.86in\line{\the\footline}}
Dave Love <fx@gnu.org>
parents:
diff changeset
145 \else \if 3\ncolumns
Dave Love <fx@gnu.org>
parents:
diff changeset
146 \let\maxcolumn=c
Dave Love <fx@gnu.org>
parents:
diff changeset
147 \nopagenumbers
Dave Love <fx@gnu.org>
parents:
diff changeset
148 \else
Dave Love <fx@gnu.org>
parents:
diff changeset
149 \errhelp{You must set \columnsperpage equal to 1, 2, or 3.}
Dave Love <fx@gnu.org>
parents:
diff changeset
150 \errmessage{Illegal number of columns per page}
Dave Love <fx@gnu.org>
parents:
diff changeset
151 \fi\fi
Dave Love <fx@gnu.org>
parents:
diff changeset
152
Dave Love <fx@gnu.org>
parents:
diff changeset
153 %\intercolumnskip=.46in
Dave Love <fx@gnu.org>
parents:
diff changeset
154 \intercolumnskip=.19in % masahiko .19x4 + 3.41x3 = 10.99
Dave Love <fx@gnu.org>
parents:
diff changeset
155 \def\abc{a}
Dave Love <fx@gnu.org>
parents:
diff changeset
156 \output={%
Dave Love <fx@gnu.org>
parents:
diff changeset
157 % This next line is useful when designing the layout.
Dave Love <fx@gnu.org>
parents:
diff changeset
158 %\immediate\write16{Column \folio\abc\space starts with \firstmark}
Dave Love <fx@gnu.org>
parents:
diff changeset
159 \if \maxcolumn\abc \multicolumnformat \global\def\abc{a}
Dave Love <fx@gnu.org>
parents:
diff changeset
160 \else\if a\abc
Dave Love <fx@gnu.org>
parents:
diff changeset
161 \global\setbox\columna\columnbox \global\def\abc{b}
Dave Love <fx@gnu.org>
parents:
diff changeset
162 %% in case we never use \columnb (two-column mode)
Dave Love <fx@gnu.org>
parents:
diff changeset
163 \global\setbox\columnb\hbox to -\intercolumnskip{}
Dave Love <fx@gnu.org>
parents:
diff changeset
164 \else
Dave Love <fx@gnu.org>
parents:
diff changeset
165 \global\setbox\columnb\columnbox \global\def\abc{c}\fi\fi}
Dave Love <fx@gnu.org>
parents:
diff changeset
166 \def\multicolumnformat{\shipout\vbox{\makeheadline
Dave Love <fx@gnu.org>
parents:
diff changeset
167 \hbox{\box\columna\hskip\intercolumnskip
Dave Love <fx@gnu.org>
parents:
diff changeset
168 \box\columnb\hskip\intercolumnskip\columnbox}
Dave Love <fx@gnu.org>
parents:
diff changeset
169 \makefootline}\advancepageno}
Dave Love <fx@gnu.org>
parents:
diff changeset
170 \def\columnbox{\leftline{\pagebody}}
Dave Love <fx@gnu.org>
parents:
diff changeset
171
Dave Love <fx@gnu.org>
parents:
diff changeset
172 \def\bye{\par\vfill\supereject
Dave Love <fx@gnu.org>
parents:
diff changeset
173 \if a\abc \else\null\vfill\eject\fi
Dave Love <fx@gnu.org>
parents:
diff changeset
174 \if a\abc \else\null\vfill\eject\fi
49600
23a1cea22d13 Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 39400
diff changeset
175 \end}
25853
Dave Love <fx@gnu.org>
parents:
diff changeset
176 \fi
Dave Love <fx@gnu.org>
parents:
diff changeset
177
Dave Love <fx@gnu.org>
parents:
diff changeset
178 % we won't be using math mode much, so redefine some of the characters
Dave Love <fx@gnu.org>
parents:
diff changeset
179 % we might want to talk about
Dave Love <fx@gnu.org>
parents:
diff changeset
180 \catcode`\^=12
Dave Love <fx@gnu.org>
parents:
diff changeset
181 \catcode`\_=12
Dave Love <fx@gnu.org>
parents:
diff changeset
182
Dave Love <fx@gnu.org>
parents:
diff changeset
183 \chardef\\=`\\
Dave Love <fx@gnu.org>
parents:
diff changeset
184 \chardef\{=`\{
Dave Love <fx@gnu.org>
parents:
diff changeset
185 \chardef\}=`\}
Dave Love <fx@gnu.org>
parents:
diff changeset
186
Dave Love <fx@gnu.org>
parents:
diff changeset
187 \hyphenation{mini-buf-fer}
Dave Love <fx@gnu.org>
parents:
diff changeset
188
Dave Love <fx@gnu.org>
parents:
diff changeset
189 \parindent 0pt
Dave Love <fx@gnu.org>
parents:
diff changeset
190 \parskip 1ex plus .5ex minus .5ex
Dave Love <fx@gnu.org>
parents:
diff changeset
191
Dave Love <fx@gnu.org>
parents:
diff changeset
192 \def\small{\smallfont\textfont2=\smallsy\baselineskip=.8\baselineskip}
Dave Love <fx@gnu.org>
parents:
diff changeset
193
Dave Love <fx@gnu.org>
parents:
diff changeset
194 \outer\def\newcolumn{\vfill\eject}
Dave Love <fx@gnu.org>
parents:
diff changeset
195
Dave Love <fx@gnu.org>
parents:
diff changeset
196 \outer\def\title#1{{\titlefont\centerline{#1}}\vskip 1ex plus .5ex}
Dave Love <fx@gnu.org>
parents:
diff changeset
197
Dave Love <fx@gnu.org>
parents:
diff changeset
198 \outer\def\section#1{\par\filbreak
Dave Love <fx@gnu.org>
parents:
diff changeset
199 \vskip 3ex plus 2ex minus 2ex {\headingfont #1}\mark{#1}%
Dave Love <fx@gnu.org>
parents:
diff changeset
200 \vskip 2ex plus 1ex minus 1.5ex}
Dave Love <fx@gnu.org>
parents:
diff changeset
201
Dave Love <fx@gnu.org>
parents:
diff changeset
202 % masahiko
Dave Love <fx@gnu.org>
parents:
diff changeset
203 \outer\def\subsection#1{\par\filbreak
Dave Love <fx@gnu.org>
parents:
diff changeset
204 \vskip 2ex plus 2ex minus 2ex {\miniheadingfont #1}\mark{#1}%
Dave Love <fx@gnu.org>
parents:
diff changeset
205 \vskip 1ex plus 1ex minus 1.5ex}
Dave Love <fx@gnu.org>
parents:
diff changeset
206
Dave Love <fx@gnu.org>
parents:
diff changeset
207 \newdimen\keyindent
Dave Love <fx@gnu.org>
parents:
diff changeset
208
Dave Love <fx@gnu.org>
parents:
diff changeset
209 \def\beginindentedkeys{\keyindent=1em}
Dave Love <fx@gnu.org>
parents:
diff changeset
210 \def\endindentedkeys{\keyindent=0em}
Dave Love <fx@gnu.org>
parents:
diff changeset
211 \endindentedkeys
Dave Love <fx@gnu.org>
parents:
diff changeset
212
Dave Love <fx@gnu.org>
parents:
diff changeset
213 \def\paralign{\vskip\parskip\halign}
Dave Love <fx@gnu.org>
parents:
diff changeset
214
Dave Love <fx@gnu.org>
parents:
diff changeset
215 \def\<#1>{$\langle${\rm #1}$\rangle$}
Dave Love <fx@gnu.org>
parents:
diff changeset
216
Dave Love <fx@gnu.org>
parents:
diff changeset
217 \def\kbd#1{{\tt#1}\null} %\null so not an abbrev even if period follows
Dave Love <fx@gnu.org>
parents:
diff changeset
218
Dave Love <fx@gnu.org>
parents:
diff changeset
219 \def\beginexample{\par\leavevmode\begingroup
Dave Love <fx@gnu.org>
parents:
diff changeset
220 \obeylines\obeyspaces\parskip0pt\tt}
Dave Love <fx@gnu.org>
parents:
diff changeset
221 {\obeyspaces\global\let =\ }
Dave Love <fx@gnu.org>
parents:
diff changeset
222 \def\endexample{\endgroup}
Dave Love <fx@gnu.org>
parents:
diff changeset
223
Dave Love <fx@gnu.org>
parents:
diff changeset
224 \def\key#1#2{\leavevmode\hbox to \hsize{\vtop
Dave Love <fx@gnu.org>
parents:
diff changeset
225 {\hsize=.75\hsize\rightskip=1em
Dave Love <fx@gnu.org>
parents:
diff changeset
226 \hskip\keyindent\relax#1}\kbd{#2}\hfil}}
Dave Love <fx@gnu.org>
parents:
diff changeset
227
Dave Love <fx@gnu.org>
parents:
diff changeset
228 \newbox\metaxbox
Dave Love <fx@gnu.org>
parents:
diff changeset
229 \setbox\metaxbox\hbox{\kbd{M-x }}
Dave Love <fx@gnu.org>
parents:
diff changeset
230 \newdimen\metaxwidth
Dave Love <fx@gnu.org>
parents:
diff changeset
231 \metaxwidth=\wd\metaxbox
Dave Love <fx@gnu.org>
parents:
diff changeset
232
Dave Love <fx@gnu.org>
parents:
diff changeset
233 \def\metax#1#2{\leavevmode\hbox to \hsize{\hbox to .75\hsize
Dave Love <fx@gnu.org>
parents:
diff changeset
234 {\hskip\keyindent\relax#1\hfil}%
Dave Love <fx@gnu.org>
parents:
diff changeset
235 \hskip -\metaxwidth minus 1fil
Dave Love <fx@gnu.org>
parents:
diff changeset
236 \kbd{#2}\hfil}}
Dave Love <fx@gnu.org>
parents:
diff changeset
237
Dave Love <fx@gnu.org>
parents:
diff changeset
238 \def\fivecol#1#2#3#4#5{\hskip\keyindent\relax#1\hfil&\kbd{#2}\quad
Dave Love <fx@gnu.org>
parents:
diff changeset
239 &\kbd{#3}\quad&\kbd{#4}\quad&\kbd{#5}\cr}
Dave Love <fx@gnu.org>
parents:
diff changeset
240
Dave Love <fx@gnu.org>
parents:
diff changeset
241 \def\fourcol#1#2#3#4{\hskip\keyindent\relax#1\hfil&\kbd{#2}\quad
Dave Love <fx@gnu.org>
parents:
diff changeset
242 &\kbd{#3}\quad&\kbd{#4}\quad\cr}
Dave Love <fx@gnu.org>
parents:
diff changeset
243
Dave Love <fx@gnu.org>
parents:
diff changeset
244 \def\threecol#1#2#3{\hskip\keyindent\relax#1\hfil&\kbd{#2}\quad
Dave Love <fx@gnu.org>
parents:
diff changeset
245 &\kbd{#3}\quad\cr}
Dave Love <fx@gnu.org>
parents:
diff changeset
246
Dave Love <fx@gnu.org>
parents:
diff changeset
247 \def\twocol#1#2{\hskip\keyindent\relax\kbd{#1}\hfil&\kbd{#2}\quad\cr}
Dave Love <fx@gnu.org>
parents:
diff changeset
248
Dave Love <fx@gnu.org>
parents:
diff changeset
249 \def\twocolkey#1#2#3#4{\hskip\keyindent\relax#1\hfil&\kbd{#2}\quad&\relax#3\hfil&\kbd{#4}\quad\cr}
Dave Love <fx@gnu.org>
parents:
diff changeset
250
Dave Love <fx@gnu.org>
parents:
diff changeset
251 %**end of header
Dave Love <fx@gnu.org>
parents:
diff changeset
252
Dave Love <fx@gnu.org>
parents:
diff changeset
253 \beginindentedkeys
Dave Love <fx@gnu.org>
parents:
diff changeset
254
Dave Love <fx@gnu.org>
parents:
diff changeset
255 \title{VIP Quick Reference Card}
Dave Love <fx@gnu.org>
parents:
diff changeset
256
Dave Love <fx@gnu.org>
parents:
diff changeset
257 \centerline{(for version 3.5 under GNU Emacs version 18)}
Dave Love <fx@gnu.org>
parents:
diff changeset
258
Dave Love <fx@gnu.org>
parents:
diff changeset
259 %\copyrightnotice
Dave Love <fx@gnu.org>
parents:
diff changeset
260
Dave Love <fx@gnu.org>
parents:
diff changeset
261 \section{Loading VIP}
Dave Love <fx@gnu.org>
parents:
diff changeset
262
Dave Love <fx@gnu.org>
parents:
diff changeset
263 Just type \kbd{M-x vip-mode} followed by \kbd{RET}
Dave Love <fx@gnu.org>
parents:
diff changeset
264
Dave Love <fx@gnu.org>
parents:
diff changeset
265 \section{VIP Modes}
Dave Love <fx@gnu.org>
parents:
diff changeset
266
Dave Love <fx@gnu.org>
parents:
diff changeset
267 VIP has three modes: {\it emacs mode}, {\it vi mode} and {\it insert mode}.
Dave Love <fx@gnu.org>
parents:
diff changeset
268 Mode line tells you which mode you are in.
Dave Love <fx@gnu.org>
parents:
diff changeset
269 In emacs mode you can do all the normal GNU Emacs editing.
Dave Love <fx@gnu.org>
parents:
diff changeset
270 This card explains only vi mode and insert mode.
Dave Love <fx@gnu.org>
parents:
diff changeset
271 {\bf GNU Emacs Reference Card} explains emacs mode.
Dave Love <fx@gnu.org>
parents:
diff changeset
272 You can switch modes as follows.
Dave Love <fx@gnu.org>
parents:
diff changeset
273
Dave Love <fx@gnu.org>
parents:
diff changeset
274 \key{from emacs mode to vi mode}{C-z}
Dave Love <fx@gnu.org>
parents:
diff changeset
275 \key{from vi mode to emacs mode}{C-z}
Dave Love <fx@gnu.org>
parents:
diff changeset
276 \metax{from vi mode to insert mode}{i, I, a, A, o, O {\rm or} C-o}
Dave Love <fx@gnu.org>
parents:
diff changeset
277 \key{from insert mode to vi mode}{ESC}
Dave Love <fx@gnu.org>
parents:
diff changeset
278
Dave Love <fx@gnu.org>
parents:
diff changeset
279 If you wish to be in vi mode just after you startup Emacs,
Dave Love <fx@gnu.org>
parents:
diff changeset
280 include the line:
Dave Love <fx@gnu.org>
parents:
diff changeset
281
Dave Love <fx@gnu.org>
parents:
diff changeset
282 \hskip 5ex
Dave Love <fx@gnu.org>
parents:
diff changeset
283 \kbd{(setq term-setup-hook 'vip-mode)}
Dave Love <fx@gnu.org>
parents:
diff changeset
284
Dave Love <fx@gnu.org>
parents:
diff changeset
285 in your \kbd{.emacs} file.
Dave Love <fx@gnu.org>
parents:
diff changeset
286 Or, you can put the following alias in your \kbd{.cshrc} file.
Dave Love <fx@gnu.org>
parents:
diff changeset
287
Dave Love <fx@gnu.org>
parents:
diff changeset
288 \hskip 5ex
Dave Love <fx@gnu.org>
parents:
diff changeset
289 \kbd{alias vip 'emacs \\!* -f vip-mode'}
Dave Love <fx@gnu.org>
parents:
diff changeset
290
Dave Love <fx@gnu.org>
parents:
diff changeset
291
Dave Love <fx@gnu.org>
parents:
diff changeset
292 \section{Insert Mode}
Dave Love <fx@gnu.org>
parents:
diff changeset
293 Insert mode is like emacs mode except for the following.
Dave Love <fx@gnu.org>
parents:
diff changeset
294
Dave Love <fx@gnu.org>
parents:
diff changeset
295 \key{go back to vi mode}{ESC}
Dave Love <fx@gnu.org>
parents:
diff changeset
296 \key{delete previous character}{C-h}
Dave Love <fx@gnu.org>
parents:
diff changeset
297 \key{delete previous word}{C-w}
Dave Love <fx@gnu.org>
parents:
diff changeset
298 \key{emulate \kbd{ESC} key in emacs mode}{C-z}
Dave Love <fx@gnu.org>
parents:
diff changeset
299
Dave Love <fx@gnu.org>
parents:
diff changeset
300 The rest of this card explains commands in {\bf vi mode}.
Dave Love <fx@gnu.org>
parents:
diff changeset
301
Dave Love <fx@gnu.org>
parents:
diff changeset
302 \section{Getting Information on VIP}
Dave Love <fx@gnu.org>
parents:
diff changeset
303
Dave Love <fx@gnu.org>
parents:
diff changeset
304 Execute info command by typing \kbd{M-x info} and select menu item
Dave Love <fx@gnu.org>
parents:
diff changeset
305 \kbd{vip}. Also:
Dave Love <fx@gnu.org>
parents:
diff changeset
306
Dave Love <fx@gnu.org>
parents:
diff changeset
307 \key{describe function attached to the key {\it x}}{C-h k {\it x}}
Dave Love <fx@gnu.org>
parents:
diff changeset
308
Dave Love <fx@gnu.org>
parents:
diff changeset
309 \section{Leaving Emacs}
Dave Love <fx@gnu.org>
parents:
diff changeset
310
Dave Love <fx@gnu.org>
parents:
diff changeset
311 \key{suspend Emacs}{X Z {\rm or} :st}
Dave Love <fx@gnu.org>
parents:
diff changeset
312 \metax{exit Emacs permanently}{Z Z {\rm or} X C {\rm or} :q}
Dave Love <fx@gnu.org>
parents:
diff changeset
313
Dave Love <fx@gnu.org>
parents:
diff changeset
314 \section{Error Recovery}
Dave Love <fx@gnu.org>
parents:
diff changeset
315
Dave Love <fx@gnu.org>
parents:
diff changeset
316 \key{abort partially typed or executing command}{C-g}
Dave Love <fx@gnu.org>
parents:
diff changeset
317 \key{redraw messed up screen}{C-l}
Dave Love <fx@gnu.org>
parents:
diff changeset
318 \metax{{\bf recover} a file lost by a system crash}{M-x recover-file}
Dave Love <fx@gnu.org>
parents:
diff changeset
319 \metax{restore a buffer to its original contents}{M-x revert-buffer}
Dave Love <fx@gnu.org>
parents:
diff changeset
320
Dave Love <fx@gnu.org>
parents:
diff changeset
321 \shortcopyrightnotice
Dave Love <fx@gnu.org>
parents:
diff changeset
322
Dave Love <fx@gnu.org>
parents:
diff changeset
323 \section{Counts}
Dave Love <fx@gnu.org>
parents:
diff changeset
324
Dave Love <fx@gnu.org>
parents:
diff changeset
325 Most commands in vi mode accept a {\it count} which can be supplied as a
Dave Love <fx@gnu.org>
parents:
diff changeset
326 prefix to the commands. In most cases, if a count is given, the
Dave Love <fx@gnu.org>
parents:
diff changeset
327 command is executed that many times. E.g., \kbd{5 d d} deletes 5
Dave Love <fx@gnu.org>
parents:
diff changeset
328 lines.
Dave Love <fx@gnu.org>
parents:
diff changeset
329
Dave Love <fx@gnu.org>
parents:
diff changeset
330 %\shortcopyrightnotice
Dave Love <fx@gnu.org>
parents:
diff changeset
331 \section{Registers}
Dave Love <fx@gnu.org>
parents:
diff changeset
332
Dave Love <fx@gnu.org>
parents:
diff changeset
333 There are 26 registers (\kbd{a} to \kbd{z}) that can store texts
Dave Love <fx@gnu.org>
parents:
diff changeset
334 and marks.
Dave Love <fx@gnu.org>
parents:
diff changeset
335 You can append a text at the end of a register (say \kbd{x}) by
Dave Love <fx@gnu.org>
parents:
diff changeset
336 specifying the register name in capital letter (say \kbd{X}).
Dave Love <fx@gnu.org>
parents:
diff changeset
337 There are also 9 read only registers (\kbd{1} to \kbd{9}) that store
Dave Love <fx@gnu.org>
parents:
diff changeset
338 up to 9 previous changes.
Dave Love <fx@gnu.org>
parents:
diff changeset
339 We will use {\it x\/} to denote a register.
Dave Love <fx@gnu.org>
parents:
diff changeset
340 \section{Entering Insert Mode}
Dave Love <fx@gnu.org>
parents:
diff changeset
341
Dave Love <fx@gnu.org>
parents:
diff changeset
342 \key{{\bf insert} at point}{i}
Dave Love <fx@gnu.org>
parents:
diff changeset
343 \key{{\bf append} after cursor}{a}
Dave Love <fx@gnu.org>
parents:
diff changeset
344 \key{{\bf insert} before first non-white}{I}
Dave Love <fx@gnu.org>
parents:
diff changeset
345 \key{{\bf append} at end of line}{A}
Dave Love <fx@gnu.org>
parents:
diff changeset
346 \key{{\bf open} line below}{o}
Dave Love <fx@gnu.org>
parents:
diff changeset
347 \key{{\bf open} line above}{O}
Dave Love <fx@gnu.org>
parents:
diff changeset
348 \key{{\bf open} line at point}{C-o}
Dave Love <fx@gnu.org>
parents:
diff changeset
349
Dave Love <fx@gnu.org>
parents:
diff changeset
350 \section{Buffers and Windows}
Dave Love <fx@gnu.org>
parents:
diff changeset
351
Dave Love <fx@gnu.org>
parents:
diff changeset
352 \key{move cursor to {\bf next} window}{C-n}
Dave Love <fx@gnu.org>
parents:
diff changeset
353 \key{delete current window}{X 0}
Dave Love <fx@gnu.org>
parents:
diff changeset
354 \key{delete other windows}{X 1}
Dave Love <fx@gnu.org>
parents:
diff changeset
355 \key{split current window into two windows}{X 2}
Dave Love <fx@gnu.org>
parents:
diff changeset
356 \key{show current buffer in two windows}{X 3}
Dave Love <fx@gnu.org>
parents:
diff changeset
357 \key{{\bf switch} to a buffer in the current window}{s {\sl buffer}}
Dave Love <fx@gnu.org>
parents:
diff changeset
358 \key{{\bf switch} to a buffer in another window}{S {\sl buffer}}
Dave Love <fx@gnu.org>
parents:
diff changeset
359 \key{{\bf kill} a buffer}{K}
Dave Love <fx@gnu.org>
parents:
diff changeset
360 \key{list existing {\bf buffers}}{X B}
Dave Love <fx@gnu.org>
parents:
diff changeset
361
Dave Love <fx@gnu.org>
parents:
diff changeset
362 \section{Files}
Dave Love <fx@gnu.org>
parents:
diff changeset
363
Dave Love <fx@gnu.org>
parents:
diff changeset
364 \metax{{\bf visit} file in the current window}{v {\sl file} {\rm or} :e {\sl file}}
Dave Love <fx@gnu.org>
parents:
diff changeset
365 \key{{\bf visit} file in another window}{V {\sl file}}
Dave Love <fx@gnu.org>
parents:
diff changeset
366 \key{{\bf save} buffer to the associated file}{X S}
Dave Love <fx@gnu.org>
parents:
diff changeset
367 \key{{\bf write} buffer to a specified file}{X W}
Dave Love <fx@gnu.org>
parents:
diff changeset
368 \key{{\bf insert} a specified file at point}{X I}
Dave Love <fx@gnu.org>
parents:
diff changeset
369 \key{{\bf get} information on the current {\bf file}}{g {\rm or} :f}
Dave Love <fx@gnu.org>
parents:
diff changeset
370 \key{run the {\bf directory} editor}{X d}
Dave Love <fx@gnu.org>
parents:
diff changeset
371
Dave Love <fx@gnu.org>
parents:
diff changeset
372 \section{Viewing the Buffer}
Dave Love <fx@gnu.org>
parents:
diff changeset
373
Dave Love <fx@gnu.org>
parents:
diff changeset
374 \key{scroll to next screen}{SPC {\rm or} C-f}
Dave Love <fx@gnu.org>
parents:
diff changeset
375 \key{scroll to previous screen}{RET {\rm or} C-b}
Dave Love <fx@gnu.org>
parents:
diff changeset
376 \key{scroll {\bf down} half screen}{C-d}
Dave Love <fx@gnu.org>
parents:
diff changeset
377 \key{scroll {\bf up} half screen}{C-u}
Dave Love <fx@gnu.org>
parents:
diff changeset
378 \key{scroll down one line}{C-e}
Dave Love <fx@gnu.org>
parents:
diff changeset
379 \key{scroll up one line}{C-y}
Dave Love <fx@gnu.org>
parents:
diff changeset
380
Dave Love <fx@gnu.org>
parents:
diff changeset
381 \key{put current line on the {\bf home} line}{z H {\rm or} z RET}
Dave Love <fx@gnu.org>
parents:
diff changeset
382 \key{put current line on the {\bf middle} line}{z M {\rm or} z .}
Dave Love <fx@gnu.org>
parents:
diff changeset
383 \key{put current line on the {\bf last} line}{z L {\rm or} z -}
Dave Love <fx@gnu.org>
parents:
diff changeset
384
Dave Love <fx@gnu.org>
parents:
diff changeset
385 \section{Marking and Returning}
Dave Love <fx@gnu.org>
parents:
diff changeset
386
Dave Love <fx@gnu.org>
parents:
diff changeset
387 \key{{\bf mark} point in register {\it x}}{m {\it x}}
Dave Love <fx@gnu.org>
parents:
diff changeset
388 \key{set mark at buffer beginning}{m <}
Dave Love <fx@gnu.org>
parents:
diff changeset
389 \key{set mark at buffer end}{m >}
Dave Love <fx@gnu.org>
parents:
diff changeset
390 \key{set mark at point}{m .}
Dave Love <fx@gnu.org>
parents:
diff changeset
391 \key{jump to mark}{m ,}
Dave Love <fx@gnu.org>
parents:
diff changeset
392 \key{exchange point and mark}{` `}
Dave Love <fx@gnu.org>
parents:
diff changeset
393 \key{... and skip to first non-white on line}{' '}
Dave Love <fx@gnu.org>
parents:
diff changeset
394 \key{go to mark {\it x}}{` {\it x}}
Dave Love <fx@gnu.org>
parents:
diff changeset
395 \key{... and skip to first non-white on line}{' {\it x}}
Dave Love <fx@gnu.org>
parents:
diff changeset
396
Dave Love <fx@gnu.org>
parents:
diff changeset
397 \section{Macros}
Dave Love <fx@gnu.org>
parents:
diff changeset
398
Dave Love <fx@gnu.org>
parents:
diff changeset
399 \key{start remembering keyboard macro}{X (}
Dave Love <fx@gnu.org>
parents:
diff changeset
400 \key{finish remembering keyboard macro}{X )}
Dave Love <fx@gnu.org>
parents:
diff changeset
401 \key{call last keyboard macro}{*}
Dave Love <fx@gnu.org>
parents:
diff changeset
402 \key{execute macro stored in register {\it x}}{@ {\it x}}
Dave Love <fx@gnu.org>
parents:
diff changeset
403
Dave Love <fx@gnu.org>
parents:
diff changeset
404 \section{Motion Commands}
Dave Love <fx@gnu.org>
parents:
diff changeset
405
Dave Love <fx@gnu.org>
parents:
diff changeset
406 \key{go backward one character}{h}
Dave Love <fx@gnu.org>
parents:
diff changeset
407 \key{go forward one character}{l}
Dave Love <fx@gnu.org>
parents:
diff changeset
408 \key{next line keeping the column}{j}
Dave Love <fx@gnu.org>
parents:
diff changeset
409 \key{previous line keeping the column}{k}
Dave Love <fx@gnu.org>
parents:
diff changeset
410 \key{next line at first non-white}{+}
Dave Love <fx@gnu.org>
parents:
diff changeset
411 \key{previous line at first non-white}{-}
Dave Love <fx@gnu.org>
parents:
diff changeset
412
Dave Love <fx@gnu.org>
parents:
diff changeset
413 \key{beginning of line}{0}
Dave Love <fx@gnu.org>
parents:
diff changeset
414 \key{first non-white on line}{^}
Dave Love <fx@gnu.org>
parents:
diff changeset
415 \key{end of line}{\$}
Dave Love <fx@gnu.org>
parents:
diff changeset
416 \key{go to {\it n}-th column on line}{{\it n} |}
Dave Love <fx@gnu.org>
parents:
diff changeset
417
Dave Love <fx@gnu.org>
parents:
diff changeset
418 \key{go to {\it n}-th line}{{\it n} G}
Dave Love <fx@gnu.org>
parents:
diff changeset
419 \key{go to last line}{G}
Dave Love <fx@gnu.org>
parents:
diff changeset
420 \key{find matching parenthesis for \kbd{()}, \kbd{\{\}} and \kbd{[]}}{\%}
Dave Love <fx@gnu.org>
parents:
diff changeset
421
Dave Love <fx@gnu.org>
parents:
diff changeset
422 \key{go to {\bf home} window line}{H}
Dave Love <fx@gnu.org>
parents:
diff changeset
423 \key{go to {\bf middle} window line}{M}
Dave Love <fx@gnu.org>
parents:
diff changeset
424 \key{go to {\bf last} window line}{L}
Dave Love <fx@gnu.org>
parents:
diff changeset
425
Dave Love <fx@gnu.org>
parents:
diff changeset
426 \subsection{Words, Sentences, Paragraphs}
Dave Love <fx@gnu.org>
parents:
diff changeset
427
Dave Love <fx@gnu.org>
parents:
diff changeset
428 \key{forward {\bf word}}{w {\rm or} W}
Dave Love <fx@gnu.org>
parents:
diff changeset
429 \key{{\bf backward} word}{b {\rm or} B}
Dave Love <fx@gnu.org>
parents:
diff changeset
430 \key{{\bf end} of word}{e {\rm or} E}
Dave Love <fx@gnu.org>
parents:
diff changeset
431
Dave Love <fx@gnu.org>
parents:
diff changeset
432 In the case of capital letter commands, a word is delimited by a
Dave Love <fx@gnu.org>
parents:
diff changeset
433 non-white character.
Dave Love <fx@gnu.org>
parents:
diff changeset
434
Dave Love <fx@gnu.org>
parents:
diff changeset
435 \key{forward sentence}{)}
Dave Love <fx@gnu.org>
parents:
diff changeset
436 \key{backward sentence}{(}
Dave Love <fx@gnu.org>
parents:
diff changeset
437
Dave Love <fx@gnu.org>
parents:
diff changeset
438 \key{forward paragraph}{\}}
Dave Love <fx@gnu.org>
parents:
diff changeset
439 \key{backward paragraph}{\{}
Dave Love <fx@gnu.org>
parents:
diff changeset
440
Dave Love <fx@gnu.org>
parents:
diff changeset
441 \subsection{Find Characters on the Line}
Dave Love <fx@gnu.org>
parents:
diff changeset
442
Dave Love <fx@gnu.org>
parents:
diff changeset
443 \key{{\bf find} {\it c} forward on line}{f {\it c}}
Dave Love <fx@gnu.org>
parents:
diff changeset
444 \key{{\bf find} {\it c} backward on line}{F {\it c}}
Dave Love <fx@gnu.org>
parents:
diff changeset
445 \key{up {\bf to} {\it c} forward on line}{t {\it c}}
Dave Love <fx@gnu.org>
parents:
diff changeset
446 \key{up {\bf to} {\it c} backward on line}{T {\it c}}
Dave Love <fx@gnu.org>
parents:
diff changeset
447 \key{repeat previous \kbd{f}, \kbd{F}, \kbd{t} or \kbd{T}}{;}
Dave Love <fx@gnu.org>
parents:
diff changeset
448 \key{... in the opposite direction}{,}
Dave Love <fx@gnu.org>
parents:
diff changeset
449
Dave Love <fx@gnu.org>
parents:
diff changeset
450 \newcolumn
Dave Love <fx@gnu.org>
parents:
diff changeset
451 \title{VIP Quick Reference Card}
Dave Love <fx@gnu.org>
parents:
diff changeset
452
Dave Love <fx@gnu.org>
parents:
diff changeset
453 \section{Searching and Replacing}
Dave Love <fx@gnu.org>
parents:
diff changeset
454
Dave Love <fx@gnu.org>
parents:
diff changeset
455 \key{search forward for {\sl pat}}{/ {\sl pat}}
Dave Love <fx@gnu.org>
parents:
diff changeset
456 \key{search backward for {\sl pat}}{?\ {\sl pat}}
Dave Love <fx@gnu.org>
parents:
diff changeset
457 \key{repeat previous search}{n}
Dave Love <fx@gnu.org>
parents:
diff changeset
458 \key{... in the opposite direction}{N}
Dave Love <fx@gnu.org>
parents:
diff changeset
459
Dave Love <fx@gnu.org>
parents:
diff changeset
460 \key{incremental {\bf search}}{C-s}
Dave Love <fx@gnu.org>
parents:
diff changeset
461 \key{{\bf reverse} incremental search}{C-r}
Dave Love <fx@gnu.org>
parents:
diff changeset
462
Dave Love <fx@gnu.org>
parents:
diff changeset
463 \key{{\bf replace}}{R}
Dave Love <fx@gnu.org>
parents:
diff changeset
464 \key{{\bf query} replace}{Q}
Dave Love <fx@gnu.org>
parents:
diff changeset
465 \key{{\bf replace} a character by another character {\it c}}{r {\it c}}
Dave Love <fx@gnu.org>
parents:
diff changeset
466
Dave Love <fx@gnu.org>
parents:
diff changeset
467 \section{Modifying Commands}
Dave Love <fx@gnu.org>
parents:
diff changeset
468
Dave Love <fx@gnu.org>
parents:
diff changeset
469 The delete (yank, change) commands explained below accept a motion command as
Dave Love <fx@gnu.org>
parents:
diff changeset
470 their argument and delete (yank, change) the region determined by the motion
Dave Love <fx@gnu.org>
parents:
diff changeset
471 command. Motion commands are classified into {\it point commands} and
Dave Love <fx@gnu.org>
parents:
diff changeset
472 {\it line commands}. In the case of line commands, whole lines will
Dave Love <fx@gnu.org>
parents:
diff changeset
473 be affected by the command. Motion commands will be represented by
Dave Love <fx@gnu.org>
parents:
diff changeset
474 {\it m} below.
Dave Love <fx@gnu.org>
parents:
diff changeset
475
Dave Love <fx@gnu.org>
parents:
diff changeset
476 The point commands are as follows:
Dave Love <fx@gnu.org>
parents:
diff changeset
477
Dave Love <fx@gnu.org>
parents:
diff changeset
478 \hskip 5ex
Dave Love <fx@gnu.org>
parents:
diff changeset
479 \kbd{h l 0 ^ \$ w W b B e E ( ) / ?\ ` f F t T \% ; ,}
Dave Love <fx@gnu.org>
parents:
diff changeset
480
Dave Love <fx@gnu.org>
parents:
diff changeset
481 The line commands are as follows:
Dave Love <fx@gnu.org>
parents:
diff changeset
482
Dave Love <fx@gnu.org>
parents:
diff changeset
483 \hskip 5ex
Dave Love <fx@gnu.org>
parents:
diff changeset
484 \kbd{j k + - H M L \{ \} G '}
Dave Love <fx@gnu.org>
parents:
diff changeset
485
Dave Love <fx@gnu.org>
parents:
diff changeset
486 \subsection{Delete/Yank/Change Commands}
Dave Love <fx@gnu.org>
parents:
diff changeset
487
Dave Love <fx@gnu.org>
parents:
diff changeset
488 \paralign to \hsize{#\tabskip=10pt plus 1 fil&#\tabskip=0pt&#\tabskip=0pt&#\cr
Dave Love <fx@gnu.org>
parents:
diff changeset
489 \fourcol{}{{\bf delete}}{{\bf yank}}{{\bf change}}
Dave Love <fx@gnu.org>
parents:
diff changeset
490 \fourcol{region determined by {\it m}}{d {\it m}}{y {\it m}}{c {\it m}}
Dave Love <fx@gnu.org>
parents:
diff changeset
491 \fourcol{... into register {\it x}}{" {\it x\/} d {\it m}}{" {\it x\/} y {\it m}}{" {\it x\/} c {\it m}}
Dave Love <fx@gnu.org>
parents:
diff changeset
492 \fourcol{a line}{d d}{Y {\rm or} y y}{c c}
Dave Love <fx@gnu.org>
parents:
diff changeset
493 \fourcol{current {\bf region}}{d r}{y r}{c r}
Dave Love <fx@gnu.org>
parents:
diff changeset
494 \fourcol{expanded {\bf region}}{d R}{y R}{c R}
Dave Love <fx@gnu.org>
parents:
diff changeset
495 \fourcol{to end of line}{D}{y \$}{c \$}
Dave Love <fx@gnu.org>
parents:
diff changeset
496 \fourcol{a character after point}{x}{y l}{c l}
Dave Love <fx@gnu.org>
parents:
diff changeset
497 \fourcol{a character before point}{DEL}{y h}{c h}
Dave Love <fx@gnu.org>
parents:
diff changeset
498 }
Dave Love <fx@gnu.org>
parents:
diff changeset
499
Dave Love <fx@gnu.org>
parents:
diff changeset
500 \subsection{Put Back Commands}
Dave Love <fx@gnu.org>
parents:
diff changeset
501
Dave Love <fx@gnu.org>
parents:
diff changeset
502 Deleted/yanked/changed text can be put back by the following commands.
Dave Love <fx@gnu.org>
parents:
diff changeset
503
Dave Love <fx@gnu.org>
parents:
diff changeset
504 \key{{\bf Put} back at point/above line}{P}
Dave Love <fx@gnu.org>
parents:
diff changeset
505 \key{... from register {\it x}}{" {\it x\/} P}
Dave Love <fx@gnu.org>
parents:
diff changeset
506 \key{{\bf put} back after point/below line}{p}
Dave Love <fx@gnu.org>
parents:
diff changeset
507 \key{... from register {\it x}}{" {\it x\/} p}
Dave Love <fx@gnu.org>
parents:
diff changeset
508
Dave Love <fx@gnu.org>
parents:
diff changeset
509 \subsection{Repeating and Undoing Modifications}
Dave Love <fx@gnu.org>
parents:
diff changeset
510
Dave Love <fx@gnu.org>
parents:
diff changeset
511 \key{{\bf undo} last change}{u {\rm or} :und}
Dave Love <fx@gnu.org>
parents:
diff changeset
512 \key{repeat last change}{.\ {\rm (dot)}}
Dave Love <fx@gnu.org>
parents:
diff changeset
513
Dave Love <fx@gnu.org>
parents:
diff changeset
514 Undo is undoable by \kbd{u} and repeatable by \kbd{.}.
Dave Love <fx@gnu.org>
parents:
diff changeset
515 For example, \kbd{u...} will undo 4 previous changes.
Dave Love <fx@gnu.org>
parents:
diff changeset
516 A \kbd{.} after \kbd{5dd} is equivalent to \kbd{5dd},
Dave Love <fx@gnu.org>
parents:
diff changeset
517 while \kbd{3.} after \kbd{5dd} is equivalent to \kbd{3dd}.
Dave Love <fx@gnu.org>
parents:
diff changeset
518
Dave Love <fx@gnu.org>
parents:
diff changeset
519 \section{Miscellaneous Commands}
Dave Love <fx@gnu.org>
parents:
diff changeset
520
Dave Love <fx@gnu.org>
parents:
diff changeset
521 \endindentedkeys
Dave Love <fx@gnu.org>
parents:
diff changeset
522
Dave Love <fx@gnu.org>
parents:
diff changeset
523 \paralign to \hsize{#\tabskip=5pt plus 1 fil&#\tabskip=0pt&#\tabskip=0pt&#\tabskip=0pt&#\cr
Dave Love <fx@gnu.org>
parents:
diff changeset
524 \fivecol{}{{\bf shift left}}{{\bf shift right}}{{\bf filter shell command}}{{\bf indent}}
Dave Love <fx@gnu.org>
parents:
diff changeset
525 \fivecol{region}{< {\it m}}{> {\it m}}{!\ {\it m\/} {\sl shell-com}}{= {\it m}}
Dave Love <fx@gnu.org>
parents:
diff changeset
526 \fivecol{line}{< <}{> >}{!\ !\ {\sl shell-com}}{= =}
Dave Love <fx@gnu.org>
parents:
diff changeset
527 }
Dave Love <fx@gnu.org>
parents:
diff changeset
528
Dave Love <fx@gnu.org>
parents:
diff changeset
529 \key{emulate \kbd{ESC}/\kbd{C-h} in emacs mode}{ESC{\rm /}C-h}
Dave Love <fx@gnu.org>
parents:
diff changeset
530 \key{emulate \kbd{C-c}/\kbd{C-x} in emacs mode}{C{\rm /}X}
Dave Love <fx@gnu.org>
parents:
diff changeset
531
Dave Love <fx@gnu.org>
parents:
diff changeset
532 \key{{\bf join} lines}{J}
Dave Love <fx@gnu.org>
parents:
diff changeset
533
Dave Love <fx@gnu.org>
parents:
diff changeset
534 \key{lowercase region}{\# c {\it m}}
Dave Love <fx@gnu.org>
parents:
diff changeset
535 \key{uppercase region}{\# C {\it m}}
Dave Love <fx@gnu.org>
parents:
diff changeset
536 \key{execute last keyboard macro on each line in the region}{\# g {\it m}}
Dave Love <fx@gnu.org>
parents:
diff changeset
537
Dave Love <fx@gnu.org>
parents:
diff changeset
538 \key{insert specified string for each line in the region}{\# q {\it m}}
Dave Love <fx@gnu.org>
parents:
diff changeset
539 \key{check spelling of the words in the region}{\# s {\it m}}
Dave Love <fx@gnu.org>
parents:
diff changeset
540
Dave Love <fx@gnu.org>
parents:
diff changeset
541 \section{Differences from Vi}
Dave Love <fx@gnu.org>
parents:
diff changeset
542
Dave Love <fx@gnu.org>
parents:
diff changeset
543 \beginindentedkeys
Dave Love <fx@gnu.org>
parents:
diff changeset
544
Dave Love <fx@gnu.org>
parents:
diff changeset
545 In VIP some keys behave rather differently from Vi.
Dave Love <fx@gnu.org>
parents:
diff changeset
546 The table below lists such keys, and you can get the effect of typing
Dave Love <fx@gnu.org>
parents:
diff changeset
547 these keys by typing the corresponding keys in the VIP column.
Dave Love <fx@gnu.org>
parents:
diff changeset
548
Dave Love <fx@gnu.org>
parents:
diff changeset
549 \paralign to \hsize{#\tabskip=10pt plus 1 fil&#\tabskip=0pt&#\cr
Dave Love <fx@gnu.org>
parents:
diff changeset
550 \threecol{}{{\bf Vi}}{{\bf VIP}}
Dave Love <fx@gnu.org>
parents:
diff changeset
551 \threecol{forward character}{SPC}{l}
Dave Love <fx@gnu.org>
parents:
diff changeset
552 \threecol{backward character}{C-h}{h}
Dave Love <fx@gnu.org>
parents:
diff changeset
553 \threecol{next line at first non-white}{RET}{+}
Dave Love <fx@gnu.org>
parents:
diff changeset
554 \threecol{delete previous character}{X}{DEL}
Dave Love <fx@gnu.org>
parents:
diff changeset
555 \threecol{get information on file}{C-g}{g}
Dave Love <fx@gnu.org>
parents:
diff changeset
556 \threecol{substitute characters}{s}{x i}
Dave Love <fx@gnu.org>
parents:
diff changeset
557 \threecol{substitute line}{S}{c c}
Dave Love <fx@gnu.org>
parents:
diff changeset
558 \threecol{change to end of line}{C {\rm or} R}{c \$}
Dave Love <fx@gnu.org>
parents:
diff changeset
559 }
Dave Love <fx@gnu.org>
parents:
diff changeset
560
Dave Love <fx@gnu.org>
parents:
diff changeset
561 (Strictly speaking, \kbd{C} and \kbd{R} behave slightly differently in Vi.)
Dave Love <fx@gnu.org>
parents:
diff changeset
562
Dave Love <fx@gnu.org>
parents:
diff changeset
563 \section{Customization}
Dave Love <fx@gnu.org>
parents:
diff changeset
564
Dave Love <fx@gnu.org>
parents:
diff changeset
565 By default, search is case sensitive.
Dave Love <fx@gnu.org>
parents:
diff changeset
566 You can change this by including the following line in your \kbd{.vip} file.
Dave Love <fx@gnu.org>
parents:
diff changeset
567
Dave Love <fx@gnu.org>
parents:
diff changeset
568 \hskip 5ex
Dave Love <fx@gnu.org>
parents:
diff changeset
569 \kbd{(setq vip-case-fold-search t)}
Dave Love <fx@gnu.org>
parents:
diff changeset
570
Dave Love <fx@gnu.org>
parents:
diff changeset
571 \beginindentedkeys
Dave Love <fx@gnu.org>
parents:
diff changeset
572
Dave Love <fx@gnu.org>
parents:
diff changeset
573 \paralign to \hsize{#\tabskip=10pt plus 1 fil&#\tabskip=0pt&#\cr
Dave Love <fx@gnu.org>
parents:
diff changeset
574 \twocol{{\bf variable}}{{\bf default value}}
Dave Love <fx@gnu.org>
parents:
diff changeset
575 \twocol{vip-search-wrap-around}{t}
Dave Love <fx@gnu.org>
parents:
diff changeset
576 \twocol{vip-case-fold-search}{nil}
Dave Love <fx@gnu.org>
parents:
diff changeset
577 \twocol{vip-re-search}{nil}
Dave Love <fx@gnu.org>
parents:
diff changeset
578 \twocol{vip-re-replace}{nil}
Dave Love <fx@gnu.org>
parents:
diff changeset
579 \twocol{vip-re-query-replace}{nil}
Dave Love <fx@gnu.org>
parents:
diff changeset
580 \twocol{vip-open-with-indent}{nil}
Dave Love <fx@gnu.org>
parents:
diff changeset
581 \twocol{vip-help-in-insert-mode}{nil}
Dave Love <fx@gnu.org>
parents:
diff changeset
582 \twocol{vip-shift-width}{8}
Dave Love <fx@gnu.org>
parents:
diff changeset
583 \twocol{vip-tags-file-name}{"TAGS"}
Dave Love <fx@gnu.org>
parents:
diff changeset
584 }
Dave Love <fx@gnu.org>
parents:
diff changeset
585
Dave Love <fx@gnu.org>
parents:
diff changeset
586 %\subsection{Customizing Key Bindings}
Dave Love <fx@gnu.org>
parents:
diff changeset
587
Dave Love <fx@gnu.org>
parents:
diff changeset
588 Include (some of) following lines in your \kbd{.vip} file
Dave Love <fx@gnu.org>
parents:
diff changeset
589 to restore Vi key bindings.
Dave Love <fx@gnu.org>
parents:
diff changeset
590
Dave Love <fx@gnu.org>
parents:
diff changeset
591 \beginexample
Dave Love <fx@gnu.org>
parents:
diff changeset
592 (define-key vip-mode-map "\\C-g" 'vip-info-on-file)
Dave Love <fx@gnu.org>
parents:
diff changeset
593 (define-key vip-mode-map "\\C-h" 'vip-backward-char)
Dave Love <fx@gnu.org>
parents:
diff changeset
594 (define-key vip-mode-map "\\C-m" 'vip-next-line-at-bol)
Dave Love <fx@gnu.org>
parents:
diff changeset
595 (define-key vip-mode-map " " 'vip-forward-char)
Dave Love <fx@gnu.org>
parents:
diff changeset
596 (define-key vip-mode-map "g" 'vip-keyboard-quit)
Dave Love <fx@gnu.org>
parents:
diff changeset
597 (define-key vip-mode-map "s" 'vip-substitute)
Dave Love <fx@gnu.org>
parents:
diff changeset
598 (define-key vip-mode-map "C" 'vip-change-to-eol)
Dave Love <fx@gnu.org>
parents:
diff changeset
599 (define-key vip-mode-map "R" 'vip-change-to-eol)
Dave Love <fx@gnu.org>
parents:
diff changeset
600 (define-key vip-mode-map "S" 'vip-substitute-line)
Dave Love <fx@gnu.org>
parents:
diff changeset
601 (define-key vip-mode-map "X" 'vip-delete-backward-char)
Dave Love <fx@gnu.org>
parents:
diff changeset
602 \endexample
Dave Love <fx@gnu.org>
parents:
diff changeset
603
Dave Love <fx@gnu.org>
parents:
diff changeset
604 \newcolumn
Dave Love <fx@gnu.org>
parents:
diff changeset
605
Dave Love <fx@gnu.org>
parents:
diff changeset
606 \title{Ex Commands in VIP}
Dave Love <fx@gnu.org>
parents:
diff changeset
607
Dave Love <fx@gnu.org>
parents:
diff changeset
608 In vi mode, an Ex command is entered by typing:
Dave Love <fx@gnu.org>
parents:
diff changeset
609
Dave Love <fx@gnu.org>
parents:
diff changeset
610 \hskip 5ex
Dave Love <fx@gnu.org>
parents:
diff changeset
611 \kbd{:\ {\sl ex-command} RET}
Dave Love <fx@gnu.org>
parents:
diff changeset
612
Dave Love <fx@gnu.org>
parents:
diff changeset
613 \section{Ex Addresses}
Dave Love <fx@gnu.org>
parents:
diff changeset
614
Dave Love <fx@gnu.org>
parents:
diff changeset
615 \paralign to \hsize{#\tabskip=5pt plus 1 fil&#\tabskip=2pt&#\tabskip=5pt plus 1 fil&#\cr
Dave Love <fx@gnu.org>
parents:
diff changeset
616 \twocolkey{current line}{.}{next line with {\sl pat}}{/ {\sl pat} /}
Dave Love <fx@gnu.org>
parents:
diff changeset
617 \twocolkey{line {\it n}}{{\it n}}{previous line with {\sl pat}}{?\ {\sl pat} ?}
Dave Love <fx@gnu.org>
parents:
diff changeset
618 \twocolkey{last line}{\$}{{\it n\/} line before {\it a}}{{\it a} - {\it n}}
Dave Love <fx@gnu.org>
parents:
diff changeset
619 \twocolkey{next line}{+}{{\it a\/} through {\it b}}{{\it a\/} , {\it b}}
Dave Love <fx@gnu.org>
parents:
diff changeset
620 \twocolkey{previous line}{-}{line marked with {\it x}}{' {\it x}}
Dave Love <fx@gnu.org>
parents:
diff changeset
621 \twocolkey{entire buffer}{\%}{previous context}{' '}
Dave Love <fx@gnu.org>
parents:
diff changeset
622 }
Dave Love <fx@gnu.org>
parents:
diff changeset
623
Dave Love <fx@gnu.org>
parents:
diff changeset
624 Addresses can be specified in front of a command.
Dave Love <fx@gnu.org>
parents:
diff changeset
625 For example,
Dave Love <fx@gnu.org>
parents:
diff changeset
626
Dave Love <fx@gnu.org>
parents:
diff changeset
627 \hskip 5ex
Dave Love <fx@gnu.org>
parents:
diff changeset
628 \kbd{:.,.+10m\$}
Dave Love <fx@gnu.org>
parents:
diff changeset
629
Dave Love <fx@gnu.org>
parents:
diff changeset
630 moves 11 lines below current line to the end of buffer.
Dave Love <fx@gnu.org>
parents:
diff changeset
631
Dave Love <fx@gnu.org>
parents:
diff changeset
632 \section{Ex Commands}
Dave Love <fx@gnu.org>
parents:
diff changeset
633
Dave Love <fx@gnu.org>
parents:
diff changeset
634 \endindentedkeys
Dave Love <fx@gnu.org>
parents:
diff changeset
635
Dave Love <fx@gnu.org>
parents:
diff changeset
636 \key{mark lines matching {\sl pat} and execute {\sl cmds} on these lines}{:g /{\sl pat}/ {\sl cmds}}
Dave Love <fx@gnu.org>
parents:
diff changeset
637
Dave Love <fx@gnu.org>
parents:
diff changeset
638 \key{mark lines {\it not\/} matching {\sl pat} and execute {\sl cmds} on these lines}{:v /{\sl pat}/ {\sl cmds}}
Dave Love <fx@gnu.org>
parents:
diff changeset
639
Dave Love <fx@gnu.org>
parents:
diff changeset
640
Dave Love <fx@gnu.org>
parents:
diff changeset
641 \key{{\bf move} specified lines after {\sl addr}}{:m {\sl addr}}
Dave Love <fx@gnu.org>
parents:
diff changeset
642 \key{{\bf copy} specified lines after {\sl addr}}{:co\rm\ (or \kbd{:t})\ \sl addr}
Dave Love <fx@gnu.org>
parents:
diff changeset
643 \key{{\bf delete} specified lines [into register {\it x\/}]}{:d {\rm [{\it x\/}]}}
Dave Love <fx@gnu.org>
parents:
diff changeset
644 \key{{\bf yank} specified lines [into register {\it x\/}]}{:y {\rm [{\it x\/}]}}
Dave Love <fx@gnu.org>
parents:
diff changeset
645 \key{{\bf put} back text [from register {\it x\/}]}{:pu {\rm [{\it x\/}]}}
Dave Love <fx@gnu.org>
parents:
diff changeset
646
Dave Love <fx@gnu.org>
parents:
diff changeset
647 \key{{\bf substitute} {\sl repl} for first string on line matching {\sl pat}}{:s /{\sl pat}/{\sl repl}/}
Dave Love <fx@gnu.org>
parents:
diff changeset
648
Dave Love <fx@gnu.org>
parents:
diff changeset
649 \key{repeat last substitution}{:\&}
Dave Love <fx@gnu.org>
parents:
diff changeset
650 \key{repeat previous substitute with previous search pattern as {\sl pat}}{:\~{}}
Dave Love <fx@gnu.org>
parents:
diff changeset
651
Dave Love <fx@gnu.org>
parents:
diff changeset
652 \key{{\bf read} in a file}{:r {\sl file}}
Dave Love <fx@gnu.org>
parents:
diff changeset
653 \key{{\bf read} in the output of a shell command}{:r!\ {\sl command}}
Dave Love <fx@gnu.org>
parents:
diff changeset
654 \key{write out specified lines into {\sl file}}{:w {\sl file}}
Dave Love <fx@gnu.org>
parents:
diff changeset
655 \key{write out specified lines at the end of {\sl file}}{:w>> {\sl file}}
Dave Love <fx@gnu.org>
parents:
diff changeset
656 \key{write out and then quit}{:wq {\sl file}}
Dave Love <fx@gnu.org>
parents:
diff changeset
657
Dave Love <fx@gnu.org>
parents:
diff changeset
658 \key{define a macro {\it x} that expands to {\sl cmd}}{:map {\it x} {\sl cmd}}
Dave Love <fx@gnu.org>
parents:
diff changeset
659 \key{remove macro expansion associated with {\it x}}{:unma {\it x}}
Dave Love <fx@gnu.org>
parents:
diff changeset
660
Dave Love <fx@gnu.org>
parents:
diff changeset
661 \key{print line number}{:=}
Dave Love <fx@gnu.org>
parents:
diff changeset
662 \key{print {\bf version} number of VIP}{:ve}
Dave Love <fx@gnu.org>
parents:
diff changeset
663
Dave Love <fx@gnu.org>
parents:
diff changeset
664 \key{shift specified lines to the right}{:>}
Dave Love <fx@gnu.org>
parents:
diff changeset
665 \key{shift specified lines to the left}{:<}
Dave Love <fx@gnu.org>
parents:
diff changeset
666
Dave Love <fx@gnu.org>
parents:
diff changeset
667 \key{{\bf join} lines}{:j}
Dave Love <fx@gnu.org>
parents:
diff changeset
668 \key{mark specified line to register {\it x}}{:k {\it x}}
Dave Love <fx@gnu.org>
parents:
diff changeset
669 \key{{\bf set} a variable's value}{:se}
Dave Love <fx@gnu.org>
parents:
diff changeset
670 \key{run a sub{\bf shell} in a window}{:sh}
Dave Love <fx@gnu.org>
parents:
diff changeset
671 \key{execute shell command {\sl command}}{:!\ {\sl command}}
Dave Love <fx@gnu.org>
parents:
diff changeset
672 \key{find first definition of {\bf tag} {\sl tag}}{:ta {\sl tag}}
Dave Love <fx@gnu.org>
parents:
diff changeset
673
Dave Love <fx@gnu.org>
parents:
diff changeset
674
Dave Love <fx@gnu.org>
parents:
diff changeset
675 \copyrightnotice
Dave Love <fx@gnu.org>
parents:
diff changeset
676
Dave Love <fx@gnu.org>
parents:
diff changeset
677 \bye
Dave Love <fx@gnu.org>
parents:
diff changeset
678
Dave Love <fx@gnu.org>
parents:
diff changeset
679 % Local variables:
Dave Love <fx@gnu.org>
parents:
diff changeset
680 % compile-command: "tex refcard"
Dave Love <fx@gnu.org>
parents:
diff changeset
681 % End:
89909
68c22ea6027c Sync to HEAD
Kenichi Handa <handa@m17n.org>
parents: 88123
diff changeset
682
68c22ea6027c Sync to HEAD
Kenichi Handa <handa@m17n.org>
parents: 88123
diff changeset
683 % arch-tag: 342a9548-4de4-499d-b864-74fb426b6729