An easy, quick vi tutorial...
Fairlight
fairlite at fairlite.com
Wed Oct 24 12:53:44 PDT 2007
On Wed, Oct 24, 2007 at 03:23:05PM -0400, Jay Ashworth may or may not have
proven themselves an utter git by pronouncing:
> On Wed, Oct 24, 2007 at 12:08:56PM -0400, Walter Vaughan wrote:
> > I don't use the "o" command since it's "i" or "a" and the Return key, but I use
> > the "j" or join command a lot.
But "j" is down a line. "J" is join.
Trust me, accidentally hitting capslock while in vi is guaranteed to screw
things up royally, and heaven help you if you're doing heads-down data
entry rather than heads-up when this happens. The vim version is a bit
more foregiving with undo, but standard vi has more limitations on how much
you can undo. At least that's been my experience. I thought the original
didn't have a redo, either, where vim does.
A lot of people seem to bash vim for not being the original, but it has
some nice enhancements.
> But it's not: o works *no matter where you are on the line*. I use it
> almost exclusively.
I use it ~50% exclusively, but also make use of "O" for the other half (the
capital version) both in email and coding. Just depends which way you
wanna go.
It's funny... I used to use emacs exclusively at university. I -love-
emacs, and all my shells use emacs-style bindings by default. But I ended
up working on so many SCO systems where emacs wasn't available that I
learned vi. It's not that I no longer like emacs, but that I really didn't
want to be flipping between editors, so I switched to vi since it's pretty
much guaranteed to be there in some form. But our joke (amongst emacs
fans) used to be that vi had two modes: insert mode, and beep mode. :)
Funny thing about John's original comment about not being able to do much
configuration of linux without vi. You'd be surprised how many try. Be it
the vendor-supplied setup tools, or something horrid like webmin.
Alternately, if they -must- edit, many go for pico, which is far simpler,
but which tends to -break- config files with long lines that wrap. You
have no idea how many hosts.allow, smb.conf and other files of the like
I've had to fix over the years, simply because someone was using the wrong
editor for the job because they didn't want to learn and use vi. Hopefully
this tutorial will mitigate that for some folks.
mark->
More information about the Filepro-list
mailing list