Kuro5hin.org: technology and culture, from the trenches
create account | help/FAQ | contact | links | search | IRC | site news
[ Everything | Diaries | Technology | Science | Culture | Politics | Media | News | Internet | Op-Ed | Fiction | Meta | MLP ]
We need your support: buy an ad | premium membership

[P]
Tutorial on the vi editor.

By noeld in News
Wed Apr 05, 2000 at 03:59:11 PM EST
Tags: Software (all tags)
Software

Ben Y. Yoshino has written this tutorial on the vi editor.
"The VI editor is a screen-based editor used by many Unix users. The VI editor has powerful features to aid programmers, but many beginning users avoid using VI because the different features overwhelm them. This tutorial is written to help beginning users get accustomed to using the VI editor, but also contains sections relevant to regular users of VI as well. Examples are provided, and the best way to learn is to try these examples, and think of your own examples as well... There's no better way than to experience things yourself."


Sponsors

Voxel dot net
o Managed Hosting
o VoxCAST Content Delivery
o Raw Infrastructure

Login

Related Links
o tutorial
o Also by noeld


Display: Sort:
Tutorial on the vi editor. | 28 comments (28 topical, editorial, 0 hidden)
cheers - only this morning i was th... (none / 0) (#4)
by Fish on Wed Apr 05, 2000 at 07:24:26 AM EST

Fish voted 1 on this story.

cheers - only this morning i was thinking i should learn how to use vi!

I use XEmacs for most of my daily w... (none / 0) (#13)
by pwhysall on Wed Apr 05, 2000 at 07:57:43 AM EST

pwhysall voted 0 on this story.

I use XEmacs for most of my daily work, but if all I want to do is edit /etc/fstab or something, I use vi(m).

I would welcome a tutorial, especially if it's got a cheat sheet for all that pesky marking and copying stuff.
--
Peter
K5 Editors
I'm going to wager that the story keeps getting dumped because it is a steaming pile of badly formatted fool-meme.
CheeseBurgerBrown

Metacomment: okay, we're really pus... (none / 0) (#11)
by eann on Wed Apr 05, 2000 at 09:03:09 AM EST

eann voted 1 on this story.

Metacomment: okay, we're really pushing for sections here.

Metacomet: a mountain in northern Connecticut.

Our scientific power has outrun our spiritual power. We have guided missiles and misguided men. —MLK

$email =~ s/0/o/; # The K5 cabal is out to get you.


Of course to be fair K5 must now in... (none / 0) (#10)
by stimuli on Wed Apr 05, 2000 at 09:31:41 AM EST

stimuli voted 1 on this story.

Of course to be fair K5 must now include a tutorial on Emacs :)
-- Jeffrey Straszheim

Oooh. Too bad he didn't say anythin... (none / 0) (#7)
by Skippy on Wed Apr 05, 2000 at 09:53:52 AM EST

Skippy voted 0 on this story.

Oooh. Too bad he didn't say anything positive about Vi. We could have had a flamewar :-)
# I am now finished talking out my ass about things that I am not qualified to discuss. #

I use vi but am quite a beginner my... (none / 0) (#15)
by Pike on Wed Apr 05, 2000 at 10:19:49 AM EST

Pike voted 1 on this story.

I use vi but am quite a beginner myself. It helped when I ordered an unfolding reference card from LinuxMall along with a Linux bumper sticker and a few other things :-)

-JD

I think everyone should be fluent i... (none / 0) (#9)
by fluffy grue on Wed Apr 05, 2000 at 11:07:27 AM EST

fluffy grue voted 0 on this story.

I think everyone should be fluent in multiple editors (I don't get into emacs vs. vi flamewars since I use them both), and so a tutorial on vi is welcome, and I'm sure there's many larval UNIX junkies here who need to learn how to use it. However, K5 isn't an RTFM-WFM-TFM-TFMS-HAFTI (reat the manual/what manual/that manual/that manual sucks/here's a tutorial instead) type of a site. I'd hate to say it, but this belongs more on Slashdot. I'm not patently opposed to it being here, though, so I think I'll set a precedent (AFAIK) by actually attaching a (meaningful?) comment to a 0 vote. :)
--
"Is not a quine" is not a quine.
I have a master's degree in science!

[ Hug Your Trikuare ]

(off topic) you just made my day! (none / 0) (#25)
by rongen on Thu Apr 06, 2000 at 04:20:50 PM EST

RTFM-WFM-TFM-TFMS-HAFTI (reat the manual/what manual/that manual/that manual sucks/here's a tutorial instead)

Thanks! You just made my day! Why isn't this someone's ~/.signature file yet? :)
read/write http://www.prosebush.com
[ Parent ]

Go Emacs. ... (none / 0) (#3)
by hattig on Wed Apr 05, 2000 at 11:42:18 AM EST

hattig voted 1 on this story.

Go Emacs.

PS: Has anyone got a tutorial on all of the Emacs commands? :-)

PPS: The best text editor I have used is GoldED on the Amiga, followed by a host of other Amiga text editors, then Protext on the Amstrad CPC. Tasword on the CPC was pretty good as well. KEdit is also a pretty good KDE editor with syntax highlighting that doesn't have all the cruft of Emacs.

Re: Go Emacs.... (none / 0) (#19)
by asad on Wed Apr 05, 2000 at 04:51:56 PM EST

I don't think there is any suck think as a tutorial for "all" of the commands that exist in emacs. Oreilley has an emacs book that's much better IMO than going through the online tutorial. Beside that I don't know of any other good books for just emacs, certainly any intro to Unix book will have a section on emacs but that will be just the tip of the iceberg.

[ Parent ]
No No... not vi...no...argh..quick ... (none / 0) (#6)
by Emacs on Wed Apr 05, 2000 at 12:15:56 PM EST

Emacs voted 1 on this story.

No No... not vi...no...argh..quick run away run away...evil modes evil modes evil modes... begin manatra "Must use emacs must use emacs must use emacs" :)

Charity (none / 0) (#18)
by nascent on Wed Apr 05, 2000 at 04:31:54 PM EST

What a great gesture of charity, a person named "Emacs" voting 1 on this story... [grin]
nascent
http://www.intap.net/~j/
[ Parent ]
vi overwhelm ? huh, try reading the... (none / 0) (#1)
by asad on Wed Apr 05, 2000 at 12:36:12 PM EST

asad voted 1 on this story.

vi overwhelm ? huh, try reading the emacs help files.

It is a nice intro to VI. I enjoyed... (none / 0) (#12)
by pulsar on Wed Apr 05, 2000 at 12:50:23 PM EST

pulsar voted 1 on this story.

It is a nice intro to VI. I enjoyed it anyway...

I actually have a coworker who insi... (none / 0) (#14)
by nascent on Wed Apr 05, 2000 at 02:52:11 PM EST

nascent voted 1 on this story.

I actually have a coworker who insists pico is the way to go.

Emacs is cool, but vi gets the job done. I'm not sure I want my text editor to be able to play Dreamcast titles, yaknowwhatImean? =)
nascent
http://www.intap.net/~j/

Re: I actually have a coworker who insi... (none / 0) (#21)
by fluffy grue on Wed Apr 05, 2000 at 05:14:30 PM EST

I used to like Pico...

... but then I turned three.

>:)

Seriously, Pico's great for UNIX newbies and people who don't have the patience to use vi or Emacs. Actually, I programmed an entire software 3D engine using it several years ago, though since then I've discovered that Emacs (well, XEmacs) is a MUCH better programming editor, since it's got the transparent RCS stuff, syntax hilighting, automatic formatting, a pretty good gdb frontend, and other stuff which I can no longer live without. Not to mention actually having search-and-replace, sane and relatively-meaningful keybindings, better usage of screen real estate, and customizable semantics for just about everything.

Personally, I use vi for quick editing jobs, and XEmacs for actual coding, or plain Emacs when XEmacs isn't available. (Contrary to popular assumption, XEmacs works just fine as a terminal-based app, by the way, and is IMO better than Emacs' attempt at being an X-based app.)

I'm one of the first people to admit that Emacs has way too much stuff in it, but you don't HAVE to install all of it, and even if it's installed, you don't have to use it. And anyway, it's fun to have dunnet, doctor and spook available.
--
"Is not a quine" is not a quine.
I have a master's degree in science!

[ Hug Your Trikuare ]
[ Parent ]

Nice tutorial, but not really newsw... (3.00 / 1) (#2)
by ramses0 on Wed Apr 05, 2000 at 03:41:34 PM EST

ramses0 voted 0 on this story.

Nice tutorial, but not really newsworthy, imho. Thanks for the link, though.
[ rate all comments , for great justice | sell.com ]

I've been using vi for six months, ... (none / 0) (#8)
by bobsquatch on Wed Apr 05, 2000 at 03:57:55 PM EST

bobsquatch voted 1 on this story.

I've been using vi for six months, and I still learned new things from this introduction. ObWhine: Why didn't anybody tell me about the ~ command?

The article also has the clearest explanation of save-buffers I've yet seen.

Anyone know the URL for "VIGOR"?... (none / 0) (#5)
by Strange Charmed One on Wed Apr 05, 2000 at 03:59:11 PM EST

Strange Charmed One voted 1 on this story.

Anyone know the URL for "VIGOR"?
--
Feel the urge to put excessively cute little quotes into your .sig?

JUST SAY NO!

If you or one of your friends is frequently plagued by this tendency, Help IS available- Ask me how.

Re: Anyone know the URL for "VIGOR"?... (none / 0) (#16)
by bobsquatch on Wed Apr 05, 2000 at 04:02:02 PM EST

Here ya go: Parent ]
Re: Anyone know the URL for "VIGOR"?... (none / 0) (#17)
by bobsquatch on Wed Apr 05, 2000 at 04:03:36 PM EST

Okay, next time I'll close my quotes. Promise.

Vigor: http://www.red-bean.com/~joelh/vigor/

[ Parent ]

Emacs tutorial and black holes (none / 0) (#20)
by henrik on Wed Apr 05, 2000 at 04:59:52 PM EST

I noticed several people were asking for an emacs tutorial - i feel it's my duty to save the world thus i have to disclose a wellkept secret by that commie bastard called RMS and his gang :)

I'm afraid that if you'd printed out the complete emacs tutorial it'd exceed the Chandrasekar limit and collapse in a black hole - so you wouldn't be able to read it anyways. And it'd have the unfortunate sideeffect of sucking the earth in :)

Ahem, Sorry.. Reminds me of my old days when i thought flaming was fun and anyone not using the same stuff i did were idiots. Maybe it's true that you grow wise with age? Hmm... Nahh. Ain't nothing like a good flamefeast :)

-henrik

Akademiska Intresseklubben antecknar!

Re: Emacs tutorial and black holes (none / 0) (#24)
by Emacs on Thu Apr 06, 2000 at 11:01:15 AM EST

That's actaully very funny. But I've found that something is usually funny if
it is based on partial truth. In that regard I agree with you that the
documemtation put together by FSF is long, ponderous, and generally sucks the
life out of you. But hey, that's my opinion. 

My experience with emacs has been to learn a little at a time to meets my needs
and over the years I've grown to like the program quite a bit. It's sort of
like learning a foreign language, you must take it a small bit at a time.

Now on to vi... what a horrible God awfull piece of crap. Modes???? modes...
for the love of pete, that has to be the most *wrong* way to design a text
editor..uh wait.. this key sequence only works if I'm in this mode.. oh
crap..what mode am I in..argh..not to mention the whole kljh thing...if I want
to move my cursor with those keys I'll fire up a game of nethack... which is
much more satisfying than vi  :) 

(Sorry if my flaming  skills have eroded but I'm sadly out of practice)


[ Parent ]
Now I'm confused. (none / 0) (#22)
by Inoshiro on Thu Apr 06, 2000 at 12:00:36 AM EST

You all keep talking about this six editor, and some of you are talking about a bathroom cleaner...



--
[ イノシロ ]
Re: Tutorial on the vi editor. (2.00 / 1) (#23)
by Paul Dunne on Thu Apr 06, 2000 at 04:29:38 AM EST

Nice to see that as Linux becomes more and more popular, the tried and true old Unix standards still get some attention. vi is a great editor. People complain that it's hard to learn -- and indeed I can remember it driving me mad when I first tried to use it -- but that's only a problem when you're learning it. Once you know how it works, once all those obscure commands are at your fingertips, you simply zoom along -- assuming you can touch-type that is (and if you can't, isn't it time you learned?). Another complaint about vi is that it is modal: this is A Bad Thing, apparently. But modality isn't bad. What was bad about the old vi was that it didn't tell you on-screen what mode it was in; but that's been fixed in most modern clones -- nvi for example has a mode indicator in the bottom right-hand corner. With this, modality ceases to be a problem, in my view.

Check out my vi page for a concise introduction to vi, and some useful resources.

Also, Tom Christiansen wrote a great rant about vi-keys and modality et al a while back, but I'm damned if I can find the url. "Zen Klavier" or something, it was called.
http://dunne.home.dhs.org/

Re: Tutorial on the vi editor. (none / 0) (#27)
by Paul Dunne on Sat Apr 08, 2000 at 05:37:43 AM EST

Found the Christiansen piece -- this is a must-read, I think.
http://dunne.home.dhs.org/
[ Parent ]
advanced tutorial here (none / 0) (#26)
by caliban on Fri Apr 07, 2000 at 08:27:35 AM EST

This is a nice, consise appetizer tutorial from Inoshiro. And for the main course, can I recommend this Advanced VI tutorial ?

Re: advanced tutorial here (none / 0) (#28)
by Inoshiro on Wed Apr 19, 2000 at 05:37:15 PM EST

Ben Y. Yoshino != Inoshiro :-)

--
[ イノシロ ]
[ Parent ]
Tutorial on the vi editor. | 28 comments (28 topical, 0 editorial, 0 hidden)
Display: Sort:

kuro5hin.org

[XML]
All trademarks and copyrights on this page are owned by their respective companies. The Rest 2000 - Present Kuro5hin.org Inc.
See our legalese page for copyright policies. Please also read our Privacy Policy.
Kuro5hin.org is powered by Free Software, including Apache, Perl, and Linux, The Scoop Engine that runs this site is freely available, under the terms of the GPL.
Need some help? Email help@kuro5hin.org.
My heart's the long stairs.

Powered by Scoop create account | help/FAQ | mission | links | search | IRC | YOU choose the stories!