Mercurial > emacs
view etc/refcards/viperCard.tex @ 96044:c1ef445563bb
2008-06-17 Carsten Dominik <dominik@science.uva.nl>
* org-colview.el (org-columns-next-allowed-value): Bug fix.
* org-colview-xemacs.el (org-columns-next-allowed-value): Bug fix.
* org-agenda.el (org-agenda-get-closed): Get the end time into the
agenda prefix as well.
* org-publish.el (org-publish-org-index): Make a properly indented
list.
* org.el (org-calendar-agenda-action-key): New option.
(org-get-cursor-date): New function.
(org-mark-entry-for-agenda-action): New command.
(org-overriding-default-time): New variable.
(org-read-date): Respect `org-overriding-default-time'.
* org-remember.el (org-remember-apply-template): Respect the
ovverriding default time.
* org-agenda.el (org-agenda-action-marker): New variable.
(org-agenda-action): New command.
(org-agenda-do-action): New function.
2008-06-17 Carsten Dominik <dominik@science.uva.nl>
* org.el (org-schedule, org-deadline): Protect scheduled and
deadline tasks against changes that accidently remove the
repeater. Also show a message with the new date when done.
2008-06-17 Carsten Dominik <dominik@science.uva.nl>
* org.el (org-beginning-of-line): Cater for the case when there
are tags but no headline text.
(org-align-tags-here): Convert to tabs only when indent-tabs-mode
it set.
2008-06-17 Carsten Dominik <dominik@science.uva.nl>
* org-mhe.el (org-mhe-get-message-folder-from-index): Make sure
the return value is nil instead of "nil" when there is no match.
* org-exp.el (org-insert-centered): Use fill-column instead of
80.
(org-export-as-ascii): Use string-width to measure the width of
the heading.
* org.el (org-diary-to-ical-string): No longer kill buffer
FROMBUF, this is now done by the caller.
* org-exp.el (org-print-icalendar-entries): Move the call to
`org-diary-to-ical-string' out of the loop, and kill the buffer
afterwords.
* org-remember.el (org-remember-visit-immediately): Position
cursor after moving to the note.
(org-remember-apply-template): Use a text property to record the
cursor position.
(org-remember-handler): Align tags after pasting the note.
2008-06-17 Carsten Dominik <dominik@science.uva.nl>
* org-bbdb.el (org-bbdb-follow-anniversary-link): New function.
* org-agenda.el (org-agenda-open-link): If there is an
org-bbdb-name property in the current line, jump to that bbdb
entry.
* org-bbdb.el (org-bbdb-anniversaries): Add the bbdb-name as a
text property, so that the agenda knows where this entry comes
from.
* org-agenda.el (org-agenda-clock-in): Fixed bug in the
interaction between clocking-in from the agenda, and automatic
task state switching.
* org-macs.el (org-with-point-at): Bug fix in macro defintion.
* org.el (org-beginning-of-line, org-end-of-line): Make sure the
zmacs-region stays after this command in XEmacs.
2008-06-17 Carsten Dominik <dominik@science.uva.nl>
* org.el (org-scan-tags): Allow new values for ACTION parameter.
* org-remember.el (org-remember-templates): Fix bug in
customization type definition.
* org.el (org-map-entries): New function.
2008-06-17 Carsten Dominik <dominik@science.uva.nl>
* org-agenda.el (org-agenda-skip-comment-trees): New option.
(org-agenda-skip): Respect `org-agenda-skip-comment-trees'.
2008-06-17 Carsten Dominik <dominik@science.uva.nl>
* org-remember.el (org-jump-to-target-location): New variable.
(org-remember-apply-template): Set
`org-remember-apply-template' if requested by template.
(org-remember-handler): Start an idle timer to jump to
remember location.
* org-exp.el (org-get-current-options): Add the FILETAGS setting.
* org.el (org-set-regexps-and-options): Fix bug with parsing of
file tags.
(org-get-tags-at): Add the content of `org-file-tags'.
* org-exp.el (org-export-handle-comments): Fix bug with several
comment lines after each other.
(org-number-to-roman, org-number-to-counter): New functions.
(org-export-section-number-format): New option.
2008-06-17 Carsten Dominik <dominik@science.uva.nl>
* org-exp.el (org-export-protect-examples): Catch the case of a
missing end_example line.
* org.el (org-set-regexps-and-options): Set `org-file-properties' and
`org-file-tags' to nil.
* org-colview.el (org-columns-next-allowed-value): Handle next
argument NTH to directly select a value.
* org-colview-xemacs.el (org-columns-next-allowed-value): Handle next
argument NTH to directly select a value.
2008-06-17 Carsten Dominik <dominik@science.uva.nl>
* org-agenda.el (org-agenda-scheduled-leaders): Fix docstring.
2008-06-17 Carsten Dominik <dominik@science.uva.nl>
* org.el (org-columns-ellipses): New option.
2008-06-17 Carsten Dominik <dominik@science.uva.nl>
* org-colview.el (org-columns-add-ellipses): New function.
(org-columns-compact-links): New function.
(org-columns-cleanup-item): Call `org-columns-compact-links'.
(org-columns-display-here): Call `org-agenda-columns-cleanup-item'
when in agenda.
(org-columns-edit-value): Fixed bug with editing values from
agenda column view.
(org-columns-redo): Also redo the agenda itself.
2008-06-17 Carsten Dominik <dominik@science.uva.nl>
* org-agenda.el (org-agenda-columns-remove-prefix-from-item): New
option.
* org-colview.el (org-agenda-columns-cleanup-item): New function.
* org-exp.el (org-export-ascii-preprocess): Renamed from
`org-export-ascii-clean-string'.
(org-export-kill-licensed-text)
(org-export-define-heading-targets)
(org-export-handle-invisible-targets)
(org-export-target-internal-links)
(org-export-remove-or-extract-drawers)
(org-export-remove-archived-trees)
(org-export-protect-quoted-subtrees)
(org-export-protect-verbatim, org-export-protect-examples)
(org-export-select-backend-specific-text)
(org-export-mark-blockquote-and-verse)
(org-export-remove-comment-blocks-and-subtrees)
(org-export-handle-comments, org-export-mark-radio-links)
(org-export-remove-special-table-lines)
(org-export-normalize-links)
(org-export-concatenate-multiline-links)
(org-export-concatenate-multiline-emphasis): New functions,
obtained from spliiting the export preprocessor.
* org-table.el (org-table-recalculate): Improve error message if
the row number is invalid.
2008-06-17 Carsten Dominik <dominik@science.uva.nl>
* org-archive.el (org-archive-save-context-info): Fix bugs in
customization setup and docstring.
* org-exp.el (org-export-html-style): Changed the size of in the
<pre> element to 90%.
2008-06-17 Carsten Dominik <dominik@science.uva.nl>
* org.el (org-find-src-example-start): Function removed.
(org-edit-src-find-region-and-lang): New function.
2008-06-17 Carsten Dominik <dominik@science.uva.nl>
* org.el (org-edit-src-exit): New function.
(org-exit-edit-mode): New minor mode.
* org-exp.el (org-export-preprocess-string): Fix bug with removing
comment-like lines from protected examples.
* org.el (org-edit-src-example, org-find-src-example-start)
(org-protect-source-example, org-edit-special): New functions.
2008-06-17 Carsten Dominik <dominik@science.uva.nl>
* org-publish.el (org-publish-project-alist): Fix typo in
docstring.
(org-publish-project-alist): Handle :index-title property.
2008-06-17 Carsten Dominik <dominik@science.uva.nl>
* org-export-latex.el (org-export-as-latex): Make sure region
bounds are correct. Parse subtree properties relating to export.
* org-exp.el (org-export-add-options-to-plist): New function.
(org-infile-export-plist): Use `org-export-add-options-to-plist'.
2008-06-17 Carsten Dominik <dominik@science.uva.nl>
* org.el (org-default-properties): Add EXPORT_FILE_NAME and
EXPORT_TITLE.
* org-exp.el (org-export-get-title-from-subtree)
(org-export-as-ascii, org-export-as-html): Make sure the original
region-beginning and region-end are used, even after moving
point.
(org-export-get-title-from-subtree): Also try the EXPORT_TITLE
property.
* org-remember.el (org-remember-last-stored-marker): New variable.
(org-remember-goto-last-stored): Use `org-goto-marker-or-bmk'.
(org-remember-handler): Also use marker to remember
last-stored position.
* org.el (org-goto-marker-or-bmk): New function.
2008-06-17 Carsten Dominik <dominik@science.uva.nl>
* org.el (org-file-properties): Renamed from `org-local-properties'.
(org-scan-tags): Take file tags into account.
(org-tags-match-list-sublevels): Default changed to t.
* org-exp.el (org-export-as-html): Close paragraph after a
footnote.
* org.el (org-update-parent-todo-statistics): New function.
* org-exp.el (org-icalendar-store-UID): New option.
(org-icalendar-force-UID): Option removed.
(org-print-icalendar-entries): IMplement UIDs.
2008-06-17 Carsten Dominik <dominik@science.uva.nl>
* org-mhe.el (org-mhe-follow-link): Fix bug in mhe searches.
2008-06-17 Carsten Dominik <dominik@science.uva.nl>
* org-faces.el (org-column): Document how this face is being used
and why sometimes the background faces shine through.
* org-mhe.el (org-mhe-follow-link): Improve handling of searches.
* org-publish.el (org-publish-attachment): Create publishing
directory if it does not yet exist.
* org-table.el (org-calc-default-modes): Change default number
format to (float 8).
* org.el (org-olpath-completing-read): New function.
(org-time-clocksum-format): New option.
(org-minutes-to-hh:mm-string): Use `org-time-clocksum-format'.
* org-clock.el (org-clock-display, org-clock-out)
(org-update-mode-line): Use `org-time-clocksum-format'.
* org-colview-xemacs.el (org-columns-number-to-string): Use
`org-time-clocksum-format'.
* org-colview.el (org-columns-number-to-string): Use
`org-time-clocksum-format'.
2008-06-17 Carsten Dominik <dominik@science.uva.nl>
* org-id.el: New file, move from contrib to core.
* org-exp.el (org-icalendar-force-UID): New option.
2008-06-17 Carsten Dominik <dominik@science.uva.nl>
* org-exp.el (org-print-icalendar-entries): Make sure DTEND is
shifted by one day if theere is a date range without an end
time.
* org.el (org-try-structure-completion): New function.
2008-06-17 Carsten Dominik <dominik@science.uva.nl>
* org.el (org-set-font-lock-defaults): Improve fontification of
description lists.
(org-insert-item): Handle description lists.
(org-adaptive-fill-function): Improve auto indentation in
description lists.
* org-exp.el (org-export-as-html, org-export-preprocess-string):
Implement VERSE environment.
(org-export-preprocess-string): Implement the COMMENT
environment.
* org-export-latex.el (org-export-latex-preprocess): Implement
VERSE environment.
2008-06-17 Carsten Dominik <dominik@science.uva.nl>
* org-jsinfo.el (org-infojs-opts-table): Add entry for FIXED_TOC
option.
2008-06-17 Carsten Dominik <dominik@science.uva.nl>
* org-table.el (orgtbl-to-tsv, orgtbl-to-csv): New functions.
* org.el (org-quote-csv-field): New functions.
* org-table.el (org-table-export-default-format): Remove :splice
from default format, we get the same effect by not specifying
:tstart and :tend.
(org-table-export): Improve setup, distinguish better between
interactive and non-interactive use, allow specifying the format
on the fly, better protection against wrong file names.
(orgtbl-to-generic): Fix documentation. Do not require :tstart
and :tend when :splice is omitted.
2008-06-17 Carsten Dominik <dominik@science.uva.nl>
* org-clock.el (org-clock-select-task): Make sure the selection
letters are 1-9 and A-Z, no special characters.
2008-06-17 Carsten Dominik <dominik@science.uva.nl>
* org-exp.el (org-export-htmlize): New group.
(org-export-htmlize-output-type)
(org-export-htmlize-css-font-prefix): New options.
(org-export-htmlize-region-for-paste): New function.
(org-export-htmlize-generate-css): New command.
2008-06-17 Carsten Dominik <dominik@science.uva.nl>
* org.el (org-set-visibility-according-to-property): New function.
(org-ctrl-c-ctrl-c): Do not restart org-mode, just get the options
and compute the regular expressions, and update font-lock.
(org-property-re): Allow a dash in property names.
* org-archive.el (org-extract-archive-file): Insert the file name
without the path into the format, to allow the location format to
contain a subdirectory.
* org-agenda.el (org-agenda-post-command-hook): If point is at end
of buffer, and the `org-agenda-type' property undefined, use the
value from the character before.
* org.el (org-add-planning-info): Don't let indentation for
would-be timestamp become extra whitespace at the end of headline.
2008-06-17 Carsten Dominik <dominik@science.uva.nl>
* org.el (org-remove-double-quotes, org-file-contents): New
functions.
* org-exp.el (org-infile-export-plist): Also parse the
contents of #+SETUPFILE files, recursively.
* org.el (org-set-regexps-and-options): Also parse the
contents of #+SETUPFILE files, recursively.
* org-exp.el (org-export-handle-include-files): New function.
(org-export-preprocess-string): Call
`org-export-handle-include-files'.
* org.el (org-delete-property-globally)
(org-delete-property, org-set-property): Ignore case during
completion.
(org-set-property): Use `org-completing-read' instead of
`completing-read'.
* org.el (org-complete-expand-structure-template): New,
experimental function.
(org-structure-template-alist): New, experimental option.
(org-complete): Call `org-complete-expand-structure-template'.
2008-06-17 Bastien Guerry <bzg@altern.org>
* org-export-latex.el (org-export-latex-preprocess): Added
support for blockquotes.
2008-06-17 Carsten Dominik <dominik@science.uva.nl>
* org.el (org-read-date-analyze): Catch the case where only a
weekday is given.
2008-06-17 Carsten Dominik <dominik@science.uva.nl>
* org.el (org-set-font-lock-defaults): Make the description
tag bold.
* org-exp.el (org-export-as-html, org-close-li): Implement
description lists.
2008-06-17 Jason Riedy <jason@acm.org>
* org-table.el (*orgtbl-default-fmt*): New variable.
(orgtbl-format-line): Use the value of *orgtbl-default-fmt*
when there is no other fmt available.
(orgtbl-to-generic): Allow an explicitly nil :tstart or
:tend to suppress the appropriate string.
(orgtbl-to-orgtbl): New function for translating to another orgtbl
table.
2008-06-17 Carsten Dominik <dominik@science.uva.nl>
* org.el (org-read-date-analyze): "." as an alias for "+0" in
read date.
* org-clock.el (org-clock-save-markers-for-cut-and-paste):
New function.
* org-agenda.el (org-agenda-save-markers-for-cut-and-paste):
New function.
2008-06-17 Carsten Dominik <dominik@science.uva.nl>
* org-clock.el (org-clock-find-position): Don't include notes
into clock drawer.
* org-archive.el (org-archive-subtree): No longer remove an
extra line after cutting the subtree. `org-cut-subtree' already
takes care of this.
* org-remember.el (org-remember-handler): Only kill the target
buffer if it does not contain the running clock.
* org.el (org-markers-to-move): New variable.
(org-save-markers-in-region, org-check-and-save-marker)
(org-reinstall-markers-in-region): New function.
(org-move-subtree-down, org-copy-subtree): Remember relative
marker positions before cutting.
(org-move-subtree-down, org-paste-subtree): Restore relative
marker positions after pasting.
* org-remember.el (org-remember-clock-out-on-exit): New option.
(org-remember-finalize): Clock out only if the setting in
`org-remember-clock-out-on-exit' requires it.
(org-remember-handler): Do the cleanup in the buffer, to make sure
that the clock marker remains in tact.
2008-06-17 Carsten Dominik <dominik@science.uva.nl>
* org-clock.el (org-clock-goto): Widen buffer if necessary.
(org-clock-in): Make sure that also tasks outside the narrowed
region will be clocked in correctly.
(org-clock-insert-selection-line): Widen the buffer so that we can
find the correct task heading.
* org.el (org-base-buffer): New function.
* org-exp.el (org-icalendar-cleanup-string): Make sure ',"
and ";" are escaped.
(org-print-icalendar-entries): Also apply
`org-icalendar-cleanup-string' to the headline, not only to the
summary property.
2008-06-17 Carsten Dominik <dominik@science.uva.nl>
* org-exp.el (org-export-preprocess-hook): New hook.
(org-export-preprocess-string): Call
`org-export-preprocess-hook'.
* org.el (org-font-lock-hook): New variable.
(org-font-lock-hook): New function.
(org-set-font-lock-defaults): Call `org-font-lock-hook'.
2008-06-17 Carsten Dominik <dominik@science.uva.nl>
* org.texi: Modify license to no longer include back- and front
cover matters.
(Using the mapping API): New section.
(Agenda column view): New section.
(Moving subtrees): Document archiving to the archive
sibling.
(Agenda commands): Document columns view in the agenda.
(Using the property API): Document the API for
multi-valued properties.
author | Carsten Dominik <dominik@science.uva.nl> |
---|---|
date | Tue, 17 Jun 2008 15:22:00 +0000 |
parents | 9f4d6f3769da |
children | c90853557b90 |
line wrap: on
line source
% ViperCard -- The Reference Card for Viper under GNU Emacs 21 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. \columnsperpage=2 % PDF output layout. 0 for A4, 1 for letter (US), a `l' is added for % a landscape layout. \input pdflayout.sty \pdflayout=(1) % Nothing else needs to be changed. % Copyright (C) 1995, 1996, 1997, 2001, 2002, 2003, 2004, 2005, 2006, % 2007, 2008 Free Software Foundation, Inc. % This file is part of GNU Emacs. % GNU Emacs is free software: you can redistribute it and/or modify % it under the terms of the GNU General Public License as published by % the Free Software Foundation, either version 3 of the License, or % (at your option) any later version. % GNU Emacs is distributed in the hope that it will be useful, % but WITHOUT ANY WARRANTY; without even the implied warranty of % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the % GNU General Public License for more details. % You should have received a copy of the GNU General Public License % along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. % 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{2008} \def\version{August 2006 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 of this card provided the copyright notice and this permission notice are preserved on all copies. For copies of the GNU Emacs manual, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 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 21 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 similar to 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 a prefix to the commands. In most cases, if a count is given, the command is executed that many times. E.g., \kbd{5 d d} deletes 5 lines. \section{Registers} There are 26 registers (\kbd{a} to \kbd{z}) that can store texts and marks. You can append a text at the end of a register (say \kbd{x}) by specifying the register name in capital letter (say \kbd{X}). There are also 9 read only registers (\kbd{1} to \kbd{9}) that store up 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}} \key{{\bf kill} a buffer}{:q! {\rm or} C-x k} \key{list existing {\bf buffers}}{:args {\rm or} C-x b} \section{Files} \metax{{\bf visit} file in the current window}{v {\sl file} {\rm or} :e {\sl file}} \key{{\bf visit} file in another window}{V {\sl file}} \key{{\bf visit} file in another frame}{C-v {\sl file}} \key{{\bf save} buffer to the associated file}{:w {\rm or} C-xC-s} \metax{{\bf write} buffer to a specified file}{:w {\sl file} {\rm or} C-xC-w} \metax{{\bf insert} a specified file at point}{:r {\sl file} {\rm or} C-xi} \key{{\bf get} information on the current {\bf file}}{C-c g {\rm or} :f} \key{run the {\bf directory} editor}{:e RET {\rm or} C-xd} %\shortcopyrightnotice \section{Viewing the Buffer} \key{scroll to next screen}{C-f} \key{scroll to previous screen}{C-b} \key{scroll {\bf down} half screen}{C-d} \key{scroll {\bf up} half screen}{C-u} \key{scroll down one line}{C-e} \key{scroll up one line}{C-y} \key{put current line on the {\bf home} line}{z H {\rm or} z RET} \key{put current line on the {\bf middle} line}{z M {\rm or} z .} \key{put current line on the {\bf last} line}{z L {\rm or} z -} \section{Marking and Returning} \key{{\bf mark} point in register {\it x}}{m {\it x}} \key{set mark at buffer beginning}{m <} \key{set mark at buffer end}{m >} \key{set mark at point}{m .} \key{jump to mark}{m ,} \key{exchange point and mark}{` `} \key{... and skip to first non-white on line}{' '} \key{go to mark {\it x}}{` {\it x}} \key{... and skip to first non-white on line}{' {\it x}} \key{view contents of marker {\it x}}{[ {\it x}} \key{view contents of register {\it x}}{] {\it x}} \section{Macros} Emacs style macros: \key{start remembering keyboard macro}{C-x (} \key{finish remembering keyboard macro}{C-x )} \key{call last keyboard macro}{*} \key{start remembering keyboard macro}{@ \#} \key{finish macro and put into register {\it x}}{@ {\it x}} \key{execute macro stored in register {\it x}}{@ {\it x}} \key{repeat last @{\it x} command}{@ @} \key{Pull last macro into register {\it x}}{@ ! {\it x}} Vi-style macros (keys to be hit in quick succession): \key{define Vi-style macro for Vi state}{:map} \key{define Vi-style macro for Insert state}{:map!} \key{toggle case-sensitive search}{//} \key{toggle regular expression search}{///} \key{toggle `\%' to ignore parentheses inside comments}{\%\%\%} \section{Motion Commands} \key{go backward one character}{h {\rm or} C-h} \key{go forward one character}{l} \metax{next line keeping the column}{j {\rm or} LF {\rm or} C-n} \key{previous line keeping the column}{k} \metax{next line at first non-white}{+ {\rm or} RET {\rm or} C-p} \key{previous line at first non-white}{-} \key{beginning of line}{0} \key{first non-white on line}{^} \key{end of line}{\$} \key{go to {\it n}-th column on line}{{\it n} |} \key{go to {\it n}-th line}{{\it n} G} \key{go to last line}{G} \key{find matching parenthesis for \kbd{()}, \kbd{\{\}} and \kbd{[]}}{\%} \key{go to {\bf home} window line}{H} \key{go to {\bf middle} window line}{M} \key{go to {\bf last} window line}{L} \subsection{Words, Sentences, Paragraphs, Headings} \key{forward {\bf word}}{w {\rm or} W} \key{{\bf backward} word}{b {\rm or} B} \key{{\bf end} of word}{e {\rm or} E} In the case of capital letter commands, a word is delimited by a non-white character. \key{forward sentence}{)} \key{backward sentence}{(} \key{forward paragraph}{\}} \key{backward paragraph}{\{} \key{forward heading}{]]} \key{backward heading}{[[} \key{end of heading}{[]} \subsection{Find Characters on the Line} \key{{\bf find} {\it c} forward on line}{f {\it c}} \key{{\bf find} {\it c} backward on line}{F {\it c}} \key{up {\bf to} {\it c} forward on line}{t {\it c}} \key{up {\bf to} {\it c} backward on line}{T {\it c}} \key{repeat previous \kbd{f}, \kbd{F}, \kbd{t} or \kbd{T}}{;} \key{... in the opposite direction}{,} %\newcolumn %\title{Viper Quick Reference Card} \section{Searching and Replacing} \key{search forward for {\sl pat}}{/ {\sl pat}} \key{search backward with previous {\sl pat}}{?\ RET} \key{search forward with previous {\sl pat}}{/ RET} \key{search backward for {\sl pat}}{?\ {\sl pat}} \key{repeat previous search}{n} \key{... in the opposite direction}{N} \key{{\bf query} replace}{Q} \key{{\bf replace} a character by another character {\it c}}{r {\it c}} \key{{\bf overwrite} {\it n} lines}{{\it n} R} \metax{{\bf buffer} search (if enabled)}{g {\it move command}} \section{Modifying Commands} Most commands that operate on text regions accept the motion commands, to describe regions. They also accept the Emacs region specifications {\bf r} and {\bf R}. {\bf r} describes the region between {\it point} and {\it mark}, and {\bf R} describes whole lines in that region. Motion commands are classified into {\it point commands} and {\it line commands}. In the case of line commands, whole lines will be affected by the command. The point commands are as follows: \hskip 5ex \kbd{h l 0 ^ \$ w W b B e E ( ) / ?\ ` f F t T \% ; ,} The line commands are as follows: \hskip 5ex \kbd{j k + - H M L \{ \} G '} These region specifiers will be referred to as {\it m} below. \subsection{Delete/Yank/Change Commands} \paralign to \hsize{#\tabskip=10pt plus 1 fil&#\tabskip=0pt&#\tabskip=0pt&#\cr \fourcol{}{{\bf delete}}{{\bf yank}}{{\bf change}} \fourcol{region determined by {\it m}}{d {\it m}}{y {\it m}}{c {\it m}} \fourcol{... into register {\it x}}{" {\it x\/} d {\it m}}{" {\it x\/} y {\it m}}{" {\it x\/} c {\it m}} \fourcol{a line}{d d}{Y {\rm or} y y}{c c} \fourcol{current {\bf region}}{d r}{y r}{c r} \fourcol{expanded {\bf region}}{d R}{y R}{c R} \fourcol{to end of line}{D}{y \$}{c \$} \fourcol{a character after point}{x}{y l}{c l} \fourcol{a character before point}{DEL}{y h}{c h} } \vskip 2ex \key{Overwrite {\it n} lines}{{\it n} R} \subsection{Put Back Commands} Deleted/yanked/changed text can be put back by the following commands. \key{{\bf Put} back at point/above line}{P} \key{... from register {\it x}}{" {\it x\/} P} \key{{\bf put} back after point/below line}{p} \key{... from register {\it x}}{" {\it x\/} p} \subsection{Repeating and Undoing Modifications} \key{{\bf undo} last change}{u {\rm or} :und} \key{repeat last change}{.\ {\rm (dot)}} Undo is undoable by \kbd{u} and repeatable by \kbd{.}. For example, \kbd{u...} will undo 4 previous changes. A \kbd{.} after \kbd{5dd} is equivalent to \kbd{5dd}, while \kbd{3.} after \kbd{5dd} is equivalent to \kbd{3dd}. \section{Miscellaneous Commands} \endindentedkeys \paralign to \hsize{#\tabskip=5pt plus 1 fil&#\tabskip=0pt&#\tabskip=0pt&#\tabskip=0pt&#\cr \fivecol{}{{\bf shift left}}{{\bf shift right}}{{\bf filter shell command}}{{\bf indent}} \fivecol{region}{< {\it m}}{> {\it m}}{!\ {\it m\/} {\sl shell-com}}{= {\it m}} \fivecol{line}{< <}{> >}{!\ !\ {\sl shell-com}}{= =} } \key{{\bf join} lines}{J} \key{toggle case (takes count)}{\~{}} \key{view register {\it x}}{] {\it x}} \key{view marker {\it x}}{] {\it x}} \key{lowercase region}{\# c {\it m}} \key{uppercase region}{\# C {\it m}} \key{execute last keyboard macro on each line in the region}{\# g {\it m}} \key{insert specified string for each line in the region}{\# q {\it m}} \key{check spelling of the words in the region}{\# s {\it m}} \key{repeat previous ex substitution}{\&} \key{change to previous file}{C-^} \key{Viper Meta key}{_} \section{Customization} By default, search is case sensitive. You can change this by including the following line in your \kbd{\~{}/.vip} file. \hskip 5ex \kbd{(setq viper-case-fold-search t)} The following is a subset of the variety of options available for customizing Viper. See the Viper manual for details on these and other options. \beginindentedkeys \paralign to \hsize{#\tabskip=10pt plus 1 fil&#\tabskip=0pt&#\cr \twocol{{\bf variable}}{{\bf default value}} \twocol{viper-search-wrap-around}{t} \twocol{viper-case-fold-search}{nil} \twocol{viper-re-search}{t} \twocol{viper-re-replace}{t} \twocol{viper-re-query-replace}{t} \twocol{viper-auto-indent}{nil} \twocol{viper-shift-width}{8} \twocol{viper-tags-file-name}{"TAGS"} \twocol{viper-no-multiple-ESC}{t} \twocol{viper-ex-style-motion}{t} \twocol{viper-always}{t} \twocol{viper-custom-file-name}{"\~{}/.vip"} \twocol{ex-find-file-shell}{"csh"} \twocol{ex-cycle-other-window}{t} \twocol{ex-cycle-through-non-buffers}{t} \twocol{blink-matching-paren}{t} \twocol{buffer-read-only}{{\it buffer dependent}} } To bind keys in Vi command state, put lines like these in your \kbd{\~{}/.vip} file: \beginexample (define-key viper-vi-global-user-map "\\C-v" 'scroll-down) (define-key viper-vi-global-user-map "\\C-cm" 'smail) \endexample \newcolumn \title{Ex Commands in Viper} In vi state, an Ex command is entered by typing: \hskip 5ex \kbd{:\ {\sl ex-command} RET} \section{Ex Addresses} \paralign to \hsize{#\tabskip=5pt plus 1 fil&#\tabskip=2pt&#\tabskip=5pt plus 1 fil&#\cr \twocolkey{current line}{.}{next line with {\sl pat}}{/ {\sl pat} /} \twocolkey{line {\it n}}{{\it n}}{previous line with {\sl pat}}{?\ {\sl pat} ?} \twocolkey{last line}{\$}{{\it n\/} line before {\it a}}{{\it a} - {\it n}} \twocolkey{next line}{+}{{\it a\/} through {\it b}}{{\it a\/} , {\it b}} \twocolkey{previous line}{-}{line marked with {\it x}}{' {\it x}} \twocolkey{entire buffer}{\%}{previous context}{' '} } Addresses can be specified in front of a command. For example, \hskip 5ex \kbd{:.,.+10m\$} moves 11 lines below current line to the end of buffer. \section{Ex Commands} Avoid Ex text manipulation commands except substitute. There are better VI equivalents for all of them. Also note that all Ex commands expand \% to current file name. To include a \% in the command, escape it with a $\backslash$. Similarly, \# is replaced by previous file. For Viper, this is the first file in the {\sl :args} listing for that buffer. This defaults to the previous file in the VI sense if you have one window. Ex commands can be made to have history. See the manual for details. \subsection{Ex Text Commands} \endindentedkeys \key{mark lines matching {\sl pat} and execute {\sl cmds} on these lines}{:g /{\sl pat}/ {\sl cmds}} \key{mark lines {\it not\/} matching {\sl pat} and execute {\sl cmds} on these lines}{:v /{\sl pat}/ {\sl cmds}} \key{{\bf move} specified lines after {\sl addr}}{:m {\sl addr}} \key{{\bf copy} specified lines after {\sl addr}}{:co\rm\ (or \kbd{:t})\ \sl addr} \key{{\bf delete} specified lines [into register {\it x\/}]}{:d {\rm [{\it x\/}]}} \key{{\bf yank} specified lines [into register {\it x\/}]}{:y {\rm [{\it x\/}]}} \key{{\bf put} back text [from register {\it x\/}]}{:pu {\rm [{\it x\/}]}} \key{{\bf substitute} {\sl repl} for first string on line matching {\sl pat}}{:s /{\sl pat}/{\sl repl}/} \key{repeat last substitution}{:\&} \key{repeat previous substitute with previous search pattern as {\sl pat}}{:\~{}} \subsection{Ex File and Shell Commands} \key{{\bf edit} file}{:e {\sl file}} \key{reedit messed up current file}{:e!} \key{edit previous file}{:e\#} \key{{\bf read} in a file}{:r {\sl file}} \key{{\bf read} in the output of a shell command}{:r {\sl !command}} \key{write out specified lines into {\sl file}}{:w {\sl file}} \key{save all modified buffers, ask confirmation}{:W {\sl file}} \key{save all modified buffers, no confirmation}{:WW {\sl file}} \key{write out specified lines at the end of {\sl file}}{:w>> {\sl file}} \key{{\bf write} to the input of a shell command}{:w {\sl !command}} \key{write out and then quit}{:wq {\sl file}} \key{run a sub{\bf shell} in a window}{:sh} \key{execute shell command {\sl command}}{:!\ {\sl command}} \key{execute previous shell command with {\it args} appended}{:!! {\sl args}} \subsection{Ex Miscellaneous Commands} \key{define a macro {\it x} that expands to {\sl cmd}}{:map {\it x} {\sl cmd}} \key{remove macro expansion associated with {\it x}}{:unma {\it x}} \key{define a macro {\it x} that expands to {\sl cmd} in insert state}{:map!\ {\it x} {\sl cmd}} \key{remove macro expansion associated with {\it x} in insert state}{:unma!\ {\it x}} \key{print line number}{:.=} \key{print last line number}{:=} \key{print {\bf version} number of Viper}{:ve} \key{shift specified lines to the right}{:>} \key{shift specified lines to the left}{:<} \key{{\bf join} lines}{:j} \key{mark specified line to register {\it x}}{:k {\it x}} \key{{\bf set} a variable's value}{:se} \key{find first definition of {\bf tag} {\sl tag}}{:ta {\sl tag}} \key{Current directory}{:pwd} \copyrightnotice \bye % Local variables: % compile-command: "pdftex viperCard" % End: % arch-tag: e287b45c-4c5e-4bf9-ae28-ead4cd9f68e3