Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Editors 101 - The VI Menace.

0 views
Skip to first unread message

Per Abrahamsen

unread,
Sep 30, 1993, 4:54:50 PM9/30/93
to

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 <censored> 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:

- 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. Todays 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.

Jonathan Monsarrat

unread,
Oct 7, 1993, 10:03:41 PM10/7/93
to
Hello, brothers and sisters of the One True Editor!

> Some <censored> program started vi for me. I typed a few
> characters before I figured out what happened. Now everything is
> fubar. What do I do?

If you're using UNIX, chances are that you can set your environment
variables so that this never happens to you. For example:

setenv VISUAL emacs
setenv EDITOR emacs

The inner circle sometimes uses the incantation:

setenv EDITOR "emacs -q -geometry =80x60+200+20"
setenv VISUAL "emacs -nw -q"

-Jon
%! Jon Monsarrat j...@cs.brown.edu moderator, comp.sources.postscript %!
0 0 moveto 15 setlinewidth(qlllll-??LHHL??llH?hH7t,7olCAHH@)1 setlinejoin{dup
10 mul rotate 80 lt{50 0 rlineto}{50 0 rmoveto}ifelse}forall stroke showpage

Peter Mutsaers

unread,
Oct 9, 1993, 2:35:30 AM10/9/93
to
>> On 8 Oct 93 02:03:41, j...@cs.brown.edu (Jonathan Monsarrat) said:

JM> Hello, brothers and sisters of the One True Editor!

[...]

JM> setenv VISUAL emacs
JM> setenv EDITOR emacs

It is very nice that you show the way the the One True Editor, but
alas you do not use examples for the One True Shell, bash. Even worse,
the blasphemous csh is used. What a pity.
--
_______________________________________________________________
Peter Mutsaers, Bunnik (Ut), the Netherlands.

Edward Hartnett

unread,
Oct 10, 1993, 6:29:09 PM10/10/93
to

[...]

Brothers! Brothers! Let's not let the dark cloud of divisive
sectarianism come between us and the One True Editor. If brother jgm
enters Our Editor through csh, does he not then leave the path of
darkness and redirection problems and step on to the parenthises-lined
elisp path of the One True Editor?
--
Edward Hartnett e...@twod.gsfc.nasa.gov
(301) 286-2396 fax: (301) 286-1754

Krishna Sethuraman

unread,
Oct 11, 1993, 2:47:17 PM10/11/93
to

Does bash allow for programmable completion, like tcsh? I think
setting up programmable completion via tcsh has prevented me from developing an
RSI, which is something many of my coworkers are currently succumbing to.

Too bad tcsh isn't GNU. I'd be tempted to call it the one true shell :0)

Krishna Sethuraman
kri...@Sgi.com

Linus Tolke Y

unread,
Oct 12, 1993, 5:41:43 PM10/12/93
to
In article <KRISHNA.93...@shamu.csd.sgi.com> kri...@shamu.csd.sgi.com (Krishna Sethuraman) writes:
>Does bash allow for programmable completion, like tcsh? I think

Nope. I think this will be implemented the second it can be done in a
clean and clear way.

Personally I use:
complete emacs 'c/-/(u q f l geometry display)/' 'n/-u/u/' 'n/-f/(rmail gnus lyskom)/'

and my absolute favorite, yes I am proud of this one:
complete make 'c/-/(f k j p n)/' 'n/-f/f/' 'n/*/`(grep -s : makefile || grep -s : Makefile) | sed \\,^\[#%],d\;s,:.\*,,`/'
but I don't use it that much. I usually do the M-x compile RET instead.
--
/Linus
***** Wherever I exec my `which emacs`, is my $HOME. *****
Linus Tolke SM7OUU, li...@lysator.liu.se
Student at the member of SK5EU LiTHSA
Link|ping institute of technology, LiTH LiTH S{ndare Amat|rer (Ham-club)

Jym Dyer

unread,
Oct 12, 1993, 9:36:15 PM10/12/93
to
JM> setenv VISUAL emacs
JM> setenv EDITOR emacs
> . . . alas you do not use examples for the One True Shell,

> bash. Even worse, the blasphemous csh is used.

=o= But "setenv" is worth having, even if it is used by
blasphemous csh. I have this in my .bashrc file:

function setenv ()
{
eval $1='$2'
export $1
}

<_Jym_>

James J. Szinger

unread,
Oct 13, 1993, 11:42:02 AM10/13/93
to

Here's the contents of my .exrc file:

quit

--Jim
--
James J. Szinger j...@fuji.eng.yale.edu

He was born with a gift of laughter The horn, the horn, the lusty horn
and a sense that the world was mad. Is not a thing to laugh to scorn.

Peter Mutsaers

unread,
Oct 13, 1993, 5:04:49 PM10/13/93
to
>> On Mon, 11 Oct 1993 18:47:17 GMT, kri...@shamu.csd.sgi.com
>> (Krishna Sethuraman) said:

KS> Does bash allow for programmable completion, like tcsh? I think
KS> setting up programmable completion via tcsh has prevented me
KS> from developing an RSI, which is something many of my coworkers
KS> are currently succumbing to.

KS> Too bad tcsh isn't GNU. I'd be tempted to call it the one true
KS> shell :0)

Yes, this programmable completion is a nice feature. Bash should get
it too. Too bad tcsh is a csh derivative, thus disqualified.

rodrigo vanegas

unread,
Oct 14, 1993, 3:49:25 PM10/14/93
to
In article <MUTS.93Oc...@compi.hobby.nl>, mu...@compi.hobby.nl (Peter Mutsaers) writes:

> Yes, this programmable completion is a nice feature. Bash should get
> it too. Too bad tcsh is a csh derivative, thus disqualified.

Well, there is always zsh. zsh is a bourne-style shell with
everything tcsh has (including a more powerful programmable
completion) but done right. It is not GPL (sigh...) but it is
restriction free. For more info, get your copy at
cs.ucsd.edu:pub/zsh.


rodrigo vanegas
r...@cs.brown.edu

ObEmacs
-------
"What do you mean `Does emacs have a TECO mode?'?? Do you
honor your ancestors??"
-heard at a recent talk on programming languages

0 new messages