A "tutorial" taken from an IRC log.
NOTE: This was hastily and sleepily ported from the original one, so expect errors, I will clean it up later.
The reason this tutorial was created: basically I was tired of explaining vim usage on irc, and found myself doing it repeatedly, at the same time, I was too lazy to sit down and write my own "real" vim tutorial (I ignored the fact that I spent 10x the time explain stuff to people on line than it would have taking me to write a tutorial). So after one conversation explaining a large chunk of vim usage, I pulled it out of the logs, and published it (cropped and modified of course) here.
This assumes you have vim installed and ready to go!
To go thru this tutorial please open up a STANDARD xterm and with the command "xterm -fg white -bg black -fn fixed" and then run "export TERM=ansi; vim". If you get stuck, my name is "robertmeta" (I play Socrates) and can be found on irc.freenode.net in #vim (among other chans). If you happen to use windows, you will want to run this tutorial using plain old gvim (not Easy Gvim or ReadOnly Gvim), just about the entire tutorial should work for ya :). The only reason I don't recommend gvim for linux for this tutorial is because #1) Not everyone has it. #2) It can tempt people to use vim incorrectly during the tutorial, better to just use good old console vim.
The Start (starting vim, general info)
- Socrates: ewww, it is not vim
- Socrates: therefore it is bad bad bad
- Glaucon: ehh
- Glaucon: vim
- Glaucon: no
- Socrates: you know nothing
- Socrates: :)
- Glaucon: never liked vim
- Socrates: why not?
- Socrates: it is so fast for editing
- Glaucon: well, it is better than emacs to me
- Glaucon: I agree its good
- Socrates: did you use it properly? or as a half assed text editor (ie: not using modes)
- Glaucon: just not my style
- Glaucon: well, I admit it never got too into it
- Glaucon: so, i didn't use the other modes
- Socrates: ahh, that is the core reason you probably don't like it.
- Glaucon: what other modes are there?
- Socrates: ahh
- Socrates: you didn't even explore a little :)
- Socrates: want a quick little intro ?
- Glaucon: sure
- Socrates: type "vim" at console
- Socrates: and tell me what version you got?
- Socrates: :q to exit
- Socrates: once you see the version
- Glaucon: hold on
- Glaucon: hmmm
- Glaucon: how do I get the version?
- Glaucon: in vim
- Socrates: it should show when you go in
- Socrates: right in front :)
- Glaucon: got a little splash screen
- Glaucon: version 5.8.3
- Glaucon: ok
- Socrates: that is fine, but you should get 6.0 at some point
- Socrates: go into vim
- Socrates: first thing to know
- Glaucon: ok, in it
- Socrates: is there are "3" modes
- Socrates: you are in "normal" mode now
- Glaucon: right
- Socrates: hit the i key to enter "insert mode"
- Socrates: and type some junk, just to work with
- Glaucon: yea, this much i've covered
- Glaucon: ok
- Socrates: then hit esc to get back to "normal mode"
- Socrates: just type
- Socrates: k when I can continue in the chan
- Glaucon: k
Real Basics (Well, mostly)
- Socrates: one of the mantras in vim is "stay as close to the home row as possible"...
- Glaucon: home row?
- Socrates: asdfghjkl; -- your "home row" keys
- Glaucon: ahh
- Socrates: where you place your hands
- Socrates: now, you arlready know you can move around in "insert" or "normal" mode with arrows