Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Being a common tool for *nix System Administrators, I'm looking for recommendations for vi/vim tutorials. After seeing this 'how do I do [this] in vim' question in Stack Overflow, I realize that I have yet to find a helpful-to-beginners tutorial which teaches not only the basic commands, but also ties in the logical mindset of vim (no snickering, emacs users). I have seen plenty of cheat-sheets (with varying levels of helpfulness), but they never tie in how to modify commands.

An example is that I know that to delete a line you use dd, but to delete a set number of lines use (three in this example), use d3d.

Another is that if you want a new line (to push the current line down) use a capital O, but to insert a line after this line, use lowercase o. (I think of it as the smaller, meeker version is more polite, while the big one shoves other lines out of it's way.)

Tying those together, to copy a line, use yy, and p where you want to paste. If you want to copy multiple lines (say 7), do y7y. Capital P to shove the current line down, or lowercase p to paste after the current line.

What are some 'tying it all together' tutorials?

share|improve this question
    
I'm surprised that this is being marked off-topic. Especially as vim is available on almost every platform (aside from Cisco, perhaps) which SysAds may be needed. Would it be better served on another site or as a wiki? –  gWaldo Oct 12 '11 at 13:39
1  
(or are the close votes coming from emacs lovers?) –  gWaldo Oct 12 '11 at 13:41
    
I'm surprised that someone with 4k rep would consider it on topic in serverfault. –  Iain Oct 12 '11 at 13:45
add comment

migrated from serverfault.com Oct 12 '11 at 17:53

This question came from our site for professional system and network administrators.

8 Answers

up vote 6 down vote accepted

I am working on an interactive tutorial for basic commands. You can find it at: http://www.openvim.com There is already a sandbox page that has a context sensitive menu, so that if you press '5' you can see what possibilities you have after that, e.g. 5w.

There will be new concept, a teaching box, later on, which deals with the wholesome experience of Vim; i.e. opening of files, splitting windows, etc.

Most of the basic functionality is there already. Currently I'm adding visual and visual block modes.

And hopefully I have energy to add some Vim based games.

share|improve this answer
    
That sounds awesome, but you're not the first persons to mention it, but I personally would be thrilled about that! Thanks for working on that! –  gWaldo Oct 12 '11 at 13:16
    
@gWaldo You're welcome! I am happy to hear people find it useful :) –  egaga Oct 12 '11 at 13:27
add comment

Run vimtutor. It's a great tutorial that will give you just the right amount of knowledge necessary to get started with vim.

share|improve this answer
add comment

You can also try the command 'vimtutor' for a tutorial. I came across this recently which seems neat: Interactive VIM tutorial

share|improve this answer
add comment

Typing ":help" in vi(m) will open up quite a world of information for you. Also, you may want to check out this tutorial: http://yannesposito.com/Scratch/en/blog/Learn-Vim-Progressively/

share|improve this answer
    
That does look like an excellent tutorial. Thanks! –  gWaldo Oct 12 '11 at 13:38
add comment

If you prefer dead tree materials, O'Reilly is hard to beat.

share|improve this answer
    
Ha! I forgot about that! –  gWaldo Oct 12 '11 at 14:15
add comment

Derek Wyatt has a series of tutorial videos that I've found quite helpful. They cover basic stuff through fairly advanced, and are in short manageable portions.

share|improve this answer
add comment

It probably depends on what kind of learner you are but I don't think OpenVim is more useful than simply running $ vimtutor : it's longer, less exhaustive and too gimmicky. Plus it's a very poor and limited Vim emulation. Use the real vim instead.

From your question I gather that you already know the basics, anyway. Openvim is very basic so you won't learn many things from it.

The next step after vimtutor is to exercise on real text and real code with real vim.

That's when you'll notice by yourself that everything is tied together: using vim is speaking a language with a rich vocabulary and a very simple set of grammar rules (with their exceptions).

share|improve this answer
add comment

to be honest, i'd advise learning the commands when you find you need them. Everyone works in different ways, and you shouldnt really allow a tutorial to give you one mind set.

I say edit how you want, and look into commands with a view to making that way easier. For example, i do a fair bit of python coding, so to me code folding and indentation is key, for others searching is more important so they focus on those commands.

share|improve this answer
    
That is what I have been doing, but I'm looking for the 'tie it all together' bit. –  gWaldo Oct 17 '11 at 21:50
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.