⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 vipercard.tex

📁 windows版本的emacs
💻 TEX
📖 第 1 页 / 共 2 页
字号:
% ViperCard -- The Reference Card for Viper under GNU Emacs 20 and XEmacs 20%**start of header\newcount\columnsperpage% This file can be printed with 1 or 2 columns per page (see below).% Specify how many you want here.  Nothing else needs to be changed.\columnsperpage=2% Copyright (c) 1995, 1996, 1997 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 of Viper:%  Michael Kifer%  email: kifer@cs.sunysb.edu%% Author of VIP 4.3:%  Aamod Sane%  email: sane@cs.uiuc.edu%% Author of VIP 3.5:%  Masahiko Sato%  email: ms@sail.stanford.edu%% The original TeX code for formatting the reference card was written by:%  Stephen Gildea%  UUCP: mit-erl!gildea%  email: gildea@stop.mail-abuse.org\def\versionnumber{3.0}\def\year{1997}\def\version{August \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{by Michael Kifer, Viper \version}\centerline{by Aamod Sane, VIP version 4.3}\centerline{by Masahiko Sato, VIP version 3.5}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{ViperCard: Viper Reference Pal}\centerline{(Version 3.0 (Polyglot) for Emacs 20 and XEmacs 20)}%\copyrightnotice\section{Loading Viper}Just type \kbd{M-x viper-mode} followed by \kbd{RET}OR put(setq viper-mode t)(require 'viper)in .emacs\section{Viper States}Viper has four states: {\it emacs state}, {\it vi state}, {\it insert state}, {\it replace state}.Mode line tells you which state you are in.In emacs state you can do all the normal GNU Emacs editing.This card explains only vi state and insert state (replace state is similarto insert state).{\bf GNU Emacs Reference Card} explains emacs state.You can switch states as follows.\key{from emacs state to vi state}{C-z}\key{from vi state to emacs state}{C-z}\key{from vi state to emacs state for 1 command}{$\backslash$}\metax{from vi state to insert state}{i, I, a, A, o, O}\metax{from vi state to replace state}{c, C, R}\key{from insert or replace state to vi state}{ESC}\key{from insert state to vi state for 1 command}{C-z}\section{Insert Mode}You can do editing in insert state.\metax{go back to vi state}{ESC}\metax{delete previous character}{C-h, DEL}\key{delete previous word}{C-w}\key{delete line word}{C-u}\key{indent shiftwidth forward}{C-t}\key{indent shiftwidth backward}{C-d}\key{delete line word}{C-u}\key{quote following character}{C-v}\key{emulate Meta key in emacs state}{C-$\backslash$}\key{escape to Vi state for one command}{C-z}\vskip 2mm{\bf The rest of this card explains commands in {\bf vi state}.}\section{Getting Information on Viper}Execute info command by typing \kbd{M-x info} and select menu item\kbd{viper}.  Also:\key{describe function attached to the key {\it x}}{$\backslash$ C-h k {\it x}}\section{Leaving Emacs}\metax{suspend Emacs}{:st {\rm or} :su}\metax{exit Emacs permanently}{C-xC-c}\metax{exit current file}{:wq {\rm or} :q}\shortcopyrightnotice\section{Error Recovery}\metax{abort command}{C-c (user level = 1)}\metax{abort command}{C-g (user level > 1)}\key{redraw messed up screen}{C-l}\metax{{\bf recover} after system crash}{:rec file}\metax{restore a buffer }{:e!\ {\rm or} M-x revert-buffer}\section{Counts}Most commands in vi state 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.\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}\key{{\bf insert} at point}{i}\key{{\bf append} after cursor}{a}\key{{\bf insert} before first non-white}{I}\key{{\bf append} at end of line}{A}\key{{\bf open} line below}{o}\key{{\bf open} line above}{O}\section{Buffers and Windows}\key{move cursor to {\bf next} window}{C-x o}\key{delete current window}{C-x 0}\key{delete other windows}{C-x 1}\key{split current window into two windows}{C-x 2}\key{{\bf switch} to a buffer in the current window}{C-x {\sl buffer}}\metax{{\bf switch} to a buffer in another window}{:n, :b, {\rm or} C-x 4 {\sl buf}}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -