Re: Lisp in a Box
From: Fred Gilham (gilham_at_snapdragon.csl.sri.com)
Date: 04/28/04
- Next message: David Steuber: "Re: Lisp in a Box"
- Previous message: Ari Johnson: "Re: Lisp in a Box"
- In reply to: Matthew Danish: "Re: Lisp in a Box"
- Next in thread: David Steuber: "Re: Lisp in a Box"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 27 Apr 2004 21:18:26 -0700
Matthew Danish <mdanish@andrew.cmu.edu> writes:
> I have never seen a cheat*** for vi (though I don't doubt their
> existence). I have seen approximately several thousand for Emacs,
> though, check Google.
Here's the most useful cheat*** for the 6 editor I ever found:
----------------------------------------
Editors 101 - The vi Menace
In another article I discussed moving the cursor forward in vi, a very
advanced topic that is *not* required to pass this course. To pass
``Editors 101'' you only need to be able to answer the following
question:
Some program started vi for me. I typed a few characters before I
figured out what happened. Now everything is fubar. What do I
do?
The answer is:
* Check the settings of your EDITOR and VISUAL environment
variables.
* Delete the program from your hard disk (required by ISO 9001).
* Find and shoot the programmer (optional).
* Type ``ESC : q ! RET''.
The last sequence is the command for leaving vi. That is all you will
need to know about vi, ever. You might find the command somewhat
unintuitive, but actually it is not. All vi commands have nice
mnemonics. The mnemonic for leaving vi is:
<ESC>ape this
<COLON> thing, // The colon-thing is a nickname for vi.
<Q>uit and do
<NOT> // C slang for `!'. Here used in the meaning
// `never'.
<RET>urn.
That was all for this lecture. Today's exercises will consist of
entering and leaving vi mode in emacs. Do not try this with the real
thing. A video demonstration will be available later for interested
students.
May you never need the knowledge you have just gained.
PS: If you are forced by company policy to use vi for editing, the
ESC : ! emacs % command can make life bearable while writing
applications for a new job.
Per Abrahamsen <abraham@dina.kvl.dk>
-- Fred Gilham gilham@csl.sri.com The amazing thing is, back when I was a C++ programmer, I thought that [Design Patterns] was SUCH a great book. And I guess it was, in a way: it made it possible to use C++ and get something done. In the long run, of course, that may have been a disservice... - Alain Picard
- Next message: David Steuber: "Re: Lisp in a Box"
- Previous message: Ari Johnson: "Re: Lisp in a Box"
- In reply to: Matthew Danish: "Re: Lisp in a Box"
- Next in thread: David Steuber: "Re: Lisp in a Box"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]