From: aaron@atlantis.uucp
Subject: Re: So what _is_ so good about vi?
Organization: Atlantis Communications, Edmonton, AB, Canada
X-Newsreader: TIN [version 1.1 PL8]
Date: Mon, 25 Jan 1993 16:25:28 GMT

Wayne Radinsky (radinsky@spot.Colorado.EDU) wrote:
: nudd@zikzak.apana.org.au (Nai Ying Kwok) writes:
: > Hey all, I am totally confused.  Can someone explain to me why vi is so
: > good?  Why does every unix system use it?  Does it have superior
: > features/more powerful editing etc compared to other editors?  I myself
: > find it a rather unintuitive piece of work really, and as an occassional
: > unix user only, it always takes me ages to come to terms with it everytime
: > I get back to using unix...

[Things sacrificed to the bandwidth demons]

: Fourth, vi is not totally counter-intuitive. i means insert, c means change,
: d means delete, y means yank, p means put, a means add (after the cursor), u
: means  undo,   r means replace...  sometimes  capitalizing  a  letter  means
: something similar:  a means add, A means add at the end of the line, r means
: replace a character,  R means typeover (replace many characters), o (meaning
: "open")  lets you insert text  after the current line,  while O opens a line
: above the current line.  (similarly, / means search-forward, while ?  (which
: is the same key shifted) means search backward).

: w means word,  b means back (back one word),  G means goto,  a space means a
: character.  Some, alas, are not-so-intuitive: ^ means beginning of a line, $
: means the end of a line,   doubling  the comand letter means the whole line:

: PS Anyone know why "s" is used as an equivalent for "c "?

Of course, often vi commands are intuitive in the sense that Sign Language is
intuitive--if you're shown a symbol and told what it means, then it's obvious
in retrospect.  But unless your mind works the same way as the people who came
up with the system in the first place, working forwards can be hit-or-miss.

Of course 'i' stands for insert.  And 'a' for add text(or append, as I learned
it).  But why not 't', for type?

Is it intuitive that 'r' means "replace a single letter, and stay in command
mode" while 'c' means "change specified range of text, and stay in insert
mode"?  Why not the other way around?  And 's' used as a synonym for 'c'
(because it means "substitute")?  Any of the above could be switched around
and still seem logical.

It's not really that vi commands are intuitive, but most of them at least
come with useful mnemonics.  I have yet to retain in memory any of the commands
for moving intervals of text past 'w' and 'b', though.

I use vi a lot(in fact, I'm using it right now)because...well, because it's the
best editor I've found so far.  As a disclaimer, I've never used emacs, but I
think I might prefer vi anyway.  I don't know a lot of the "high-powered"
commands--I think the most sophisticated ones I know are 'y', 'o', and 'c'.
But I rarely find even my basic knowledge all that wanting.  If I do, I kermit
the file home and edit it on my PC...

-- 
---Alfvaen(Still looking for "October's Baby")
"Clocks don't bring tomorrow--knives don't bring good news."                       ---Bruce Cockburn
Current Album--Genesis:Abacab
Current Read--Sean Russell:The Initiate Brother
Newsgroups: comp.unix.questions