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?