📄 vipcard.tex
字号:
% Quick Reference Card for VIP 3.5 under GNU Emacs version 18 on Unix systems%**start of header\newcount\columnsperpage% This file can be printed with 1, 2, or 3 columns per page (see below).% Specify how many you want here. Nothing else needs to be changed.\columnsperpage=1% Copyright (c) 1987 Free Software Foundation, Inc.% This file is part of GNU Emacs.% This file is distributed in the hope that it will be useful,% but WITHOUT ANY WARRANTY. No author or distributor% accepts responsibility to anyone for the consequences of using it% or for whether it serves any particular purpose or describes% any piece of software unless they say so in writing. Refer to the% GNU Emacs General Public License for full details.%% Permission is granted to copy, modify and redistribute this source% file provided the copyright notice and permission notices are% preserved on all copies.%% Permission is granted to process this file through TeX and print the% results, provided the printed document carries copyright and% permission notices identical to the ones below.% This file is intended to be processed by plain TeX (TeX82).%% The final reference card has six columns, three on each side.% This file can be used to produce it in any of three ways:% 1 column per page% produces six separate pages, each of which needs to be reduced to 80%.% This gives the best resolution.% 2 columns per page% produces three already-reduced pages.% You will still need to cut and paste.% 3 columns per page% produces two pages which must be printed sideways to make a% ready-to-use 8.5 x 11 inch reference card.% For this you need a dvi device driver that can print sideways.% Which mode to use is controlled by setting \columnsperpage above.%% Author:% Masahiko Sato% Internet: ms@sail.stanford.edu% Junet: masahiko@sato.riec.tohoku.junet%% The original TeX code for formatting the reference card was written by:% Stephen Gildea% UUCP: mit-erl!gildea% Internet: gildea@stop.mail-abuse.org\def\versionnumber{1.2}\def\year{1987}\def\version{September \year\ v\versionnumber}\def\shortcopyrightnotice{\vskip 1ex plus 2 fill \centerline{\small \copyright\ \year\ Free Software Foundation, Inc. Permissions on back. v\versionnumber}}\def\copyrightnotice{%\vskip 1ex plus 2 fill\begingroup\small\vskip 1ex \begingroup\small\centerline{Copyright \copyright\ \year\ Free Software Foundation, Inc.}\centerline{designed by Masahiko Sato, \version}\centerline{for VIP 3.5 under GNU Emacs version 18 on Unix systems}Permission is granted to make and distribute copies ofthis card provided the copyright notice and this permission noticeare preserved on all copies.For copies of the GNU Emacs manual, write to the Free SoftwareFoundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\endgroup}% make \bye not \outer so that the \def\bye in the \else clause below% can be scanned without complaint.\def\bye{\par\vfill\supereject\end}\newdimen\intercolumnskip\newbox\columna\newbox\columnb\def\ncolumns{\the\columnsperpage}\message{[\ncolumns\space column\if 1\ncolumns\else s\fi\space per page]}\def\scaledmag#1{ scaled \magstep #1}% This multi-way format was designed by Stephen Gildea% October 1986.% Slightly modified by Masahiko Sato, September 1987.\if 1\ncolumns \hsize 4in \vsize 10in %\voffset -.7in \voffset -.57in \font\titlefont=\fontname\tenbf \scaledmag3 \font\headingfont=\fontname\tenbf \scaledmag2 \font\miniheadingfont=\fontname\tenbf \scaledmag1 % masahiko \font\smallfont=\fontname\sevenrm \font\smallsy=\fontname\sevensy \footline{\hss\folio} \def\makefootline{\baselineskip10pt\hsize6.5in\line{\the\footline}}\else %\hsize 3.2in %\vsize 7.95in \hsize 3.41in % masahiko \vsize 8in % masahiko \hoffset -.75in \voffset -.745in \font\titlefont=cmbx10 \scaledmag2 \font\headingfont=cmbx10 \scaledmag1 \font\miniheadingfont=cmbx10 % masahiko \font\smallfont=cmr6 \font\smallsy=cmsy6 \font\eightrm=cmr8 \font\eightbf=cmbx8 \font\eightit=cmti8 \font\eightsl=cmsl8 \font\eighttt=cmtt8 \font\eightsy=cmsy8 \textfont0=\eightrm \textfont2=\eightsy \def\rm{\eightrm} \def\bf{\eightbf} \def\it{\eightit} \def\sl{\eightsl} % masahiko \def\tt{\eighttt} \normalbaselineskip=.8\normalbaselineskip \normallineskip=.8\normallineskip \normallineskiplimit=.8\normallineskiplimit \normalbaselines\rm %make definitions take effect \if 2\ncolumns \let\maxcolumn=b \footline{\hss\rm\folio\hss} \def\makefootline{\vskip 2in \hsize=6.86in\line{\the\footline}} \else \if 3\ncolumns \let\maxcolumn=c \nopagenumbers \else \errhelp{You must set \columnsperpage equal to 1, 2, or 3.} \errmessage{Illegal number of columns per page} \fi\fi %\intercolumnskip=.46in \intercolumnskip=.19in % masahiko .19x4 + 3.41x3 = 10.99 \def\abc{a} \output={% % This next line is useful when designing the layout. %\immediate\write16{Column \folio\abc\space starts with \firstmark} \if \maxcolumn\abc \multicolumnformat \global\def\abc{a} \else\if a\abc \global\setbox\columna\columnbox \global\def\abc{b} %% in case we never use \columnb (two-column mode) \global\setbox\columnb\hbox to -\intercolumnskip{} \else \global\setbox\columnb\columnbox \global\def\abc{c}\fi\fi} \def\multicolumnformat{\shipout\vbox{\makeheadline \hbox{\box\columna\hskip\intercolumnskip \box\columnb\hskip\intercolumnskip\columnbox} \makefootline}\advancepageno} \def\columnbox{\leftline{\pagebody}} \def\bye{\par\vfill\supereject \if a\abc \else\null\vfill\eject\fi \if a\abc \else\null\vfill\eject\fi \end} \fi% we won't be using math mode much, so redefine some of the characters% we might want to talk about\catcode`\^=12\catcode`\_=12\chardef\\=`\\\chardef\{=`\{\chardef\}=`\}\hyphenation{mini-buf-fer}\parindent 0pt\parskip 1ex plus .5ex minus .5ex\def\small{\smallfont\textfont2=\smallsy\baselineskip=.8\baselineskip}\outer\def\newcolumn{\vfill\eject}\outer\def\title#1{{\titlefont\centerline{#1}}\vskip 1ex plus .5ex}\outer\def\section#1{\par\filbreak \vskip 3ex plus 2ex minus 2ex {\headingfont #1}\mark{#1}% \vskip 2ex plus 1ex minus 1.5ex}% masahiko\outer\def\subsection#1{\par\filbreak \vskip 2ex plus 2ex minus 2ex {\miniheadingfont #1}\mark{#1}% \vskip 1ex plus 1ex minus 1.5ex}\newdimen\keyindent\def\beginindentedkeys{\keyindent=1em}\def\endindentedkeys{\keyindent=0em}\endindentedkeys\def\paralign{\vskip\parskip\halign}\def\<#1>{$\langle${\rm #1}$\rangle$}\def\kbd#1{{\tt#1}\null} %\null so not an abbrev even if period follows\def\beginexample{\par\leavevmode\begingroup \obeylines\obeyspaces\parskip0pt\tt}{\obeyspaces\global\let =\ }\def\endexample{\endgroup}\def\key#1#2{\leavevmode\hbox to \hsize{\vtop {\hsize=.75\hsize\rightskip=1em \hskip\keyindent\relax#1}\kbd{#2}\hfil}}\newbox\metaxbox\setbox\metaxbox\hbox{\kbd{M-x }}\newdimen\metaxwidth\metaxwidth=\wd\metaxbox\def\metax#1#2{\leavevmode\hbox to \hsize{\hbox to .75\hsize {\hskip\keyindent\relax#1\hfil}% \hskip -\metaxwidth minus 1fil \kbd{#2}\hfil}}\def\fivecol#1#2#3#4#5{\hskip\keyindent\relax#1\hfil&\kbd{#2}\quad &\kbd{#3}\quad&\kbd{#4}\quad&\kbd{#5}\cr}\def\fourcol#1#2#3#4{\hskip\keyindent\relax#1\hfil&\kbd{#2}\quad &\kbd{#3}\quad&\kbd{#4}\quad\cr}\def\threecol#1#2#3{\hskip\keyindent\relax#1\hfil&\kbd{#2}\quad &\kbd{#3}\quad\cr}\def\twocol#1#2{\hskip\keyindent\relax\kbd{#1}\hfil&\kbd{#2}\quad\cr}\def\twocolkey#1#2#3#4{\hskip\keyindent\relax#1\hfil&\kbd{#2}\quad&\relax#3\hfil&\kbd{#4}\quad\cr}%**end of header\beginindentedkeys\title{VIP Quick Reference Card}\centerline{(for version 3.5 under GNU Emacs version 18)}%\copyrightnotice\section{Loading VIP}Just type \kbd{M-x vip-mode} followed by \kbd{RET}\section{VIP Modes}VIP has three modes: {\it emacs mode}, {\it vi mode} and {\it insert mode}.Mode line tells you which mode you are in.In emacs mode you can do all the normal GNU Emacs editing.This card explains only vi mode and insert mode.{\bf GNU Emacs Reference Card} explains emacs mode.You can switch modes as follows.\key{from emacs mode to vi mode}{C-z}\key{from vi mode to emacs mode}{C-z}\metax{from vi mode to insert mode}{i, I, a, A, o, O {\rm or} C-o}\key{from insert mode to vi mode}{ESC}If you wish to be in vi mode just after you startup Emacs,include the line:\hskip 5ex\kbd{(setq term-setup-hook 'vip-mode)}in your \kbd{.emacs} file.Or, you can put the following alias in your \kbd{.cshrc} file.\hskip 5ex\kbd{alias vip 'emacs \\!* -f vip-mode'}\section{Insert Mode}Insert mode is like emacs mode except for the following.\key{go back to vi mode}{ESC}\key{delete previous character}{C-h}\key{delete previous word}{C-w}\key{emulate \kbd{ESC} key in emacs mode}{C-z}The rest of this card explains commands in {\bf vi mode}.\section{Getting Information on VIP}Execute info command by typing \kbd{M-x info} and select menu item\kbd{vip}. Also:\key{describe function attached to the key {\it x}}{C-h k {\it x}}\section{Leaving Emacs}\key{suspend Emacs}{X Z {\rm or} :st}\metax{exit Emacs permanently}{Z Z {\rm or} X C {\rm or} :q}\section{Error Recovery}\key{abort partially typed or executing command}{C-g}\key{redraw messed up screen}{C-l}\metax{{\bf recover} a file lost by a system crash}{M-x recover-file}\metax{restore a buffer to its original contents}{M-x revert-buffer}\shortcopyrightnotice\section{Counts}Most commands in vi mode accept a {\it count} which can be supplied as aprefix to the commands. In most cases, if a count is given, thecommand is executed that many times. E.g., \kbd{5 d d} deletes 5lines.%\shortcopyrightnotice\section{Registers}There are 26 registers (\kbd{a} to \kbd{z}) that can store textsand marks.You can append a text at the end of a register (say \kbd{x}) byspecifying the register name in capital letter (say \kbd{X}).There are also 9 read only registers (\kbd{1} to \kbd{9}) that storeup to 9 previous changes.We will use {\it x\/} to denote a register.\section{Entering Insert Mode}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -