I've constantly heard good things about vim, and now I'm intrigued. The only thing that's putting me off is it's irregular keyboard controls. Does anyone know of any good beginners tutorials for vim?
-
I think you'll find, with a bit of experience, that the keyboard controls are wonderful, especially on laptops. You can navigate and edit your entire document without leaving home row and using a mouse.– J. PolferAug 14, 2009 at 20:29
-
If Vim's controls are hard, try Emacs; they'll fry your brain.– josemotaJul 17, 2011 at 21:12
-
use ":behave mswin" if you feel like its too foriegn, or, put that in your ~/.vimrc to make it do it that way, you can always put it back using ":behave xterm" if you change your mind. Furthermore, I find everyone should have at least a few mappings of their own to fine tune things, since not everyone learened to type exactly the same way, especially for those who use Dvorák keyboards or other odd layouts (me, at one point, using a modified numpad for editing numeric only documents)– osirisgothraAug 2, 2014 at 16:17
9 Answers
Vim comes with its own tutorial, for a start. Just run this in a terminal:
vimtutor
The good thing about vimtutor
is that it allows you to read about how the editor works while actually using it.
Beyond that, you can take a look at the links here: Vi Lovers page
The nice thing about that page is that it briefly discusses the various links it provides, so you get a sense of which are better or worse and why.
I would add that the best way to get comfortable with Vim is to use it exclusively for a bit. If you end up hating it, fine. Use something else then. However, the only way to train your fingers and brain is to use it. My fingers now do Escape :wq
out of habit, even when I'm in a gui email client at work (instead of Mutt).
-
2The vim tutor is horrible; at least it's horrible at convincing you that vim is actually useful and usable by sane people.– hasenAug 11, 2009 at 21:09
-
4@hasen: as they say in the Marines, that sounds like a personal problem. Aug 11, 2009 at 23:37
-
- Why, oh WHY, do those #?@! nutheads use vi?. Start here; get motivated and see some excellent examples.
- Graphical Cheat Sheet: Keep this under your pillow. I downloaded the image files to my desktop.
- IRC Based Vim Tutorial. Chat log of an interactive one-on-one vim tutorial by examples.
-
-
-
1The Cheat Sheet Tutorial is how I learned vi. Seriously. I printed out the cheat sheets, put them in front of my keyboard, forced myself to type "gvim" when editing my files, and referred to them as I wanted to do various things. I spent about two weeks per cheat sheet, and got the hang of it. Aug 14, 2009 at 20:28
-
I found the instructional videos by Derek Wyatt on Vimeo to be very useful. He has uploaded 27 videos, starting with basic editing and describing more advanced features later on.
"A Byte of Vim" is a book which aims to help you to learn how to use the Vim editor, even if all you know is how to use the computer keyboard.
Check this VIM game, its plain awesome: http://vim-adventures.com/
It's the "Zelda meets text editing" game. Beat the game to master VIM. I finished 2 levels, 3rd under development it seems.
Also check this. Its good: http://www.openvim.com/tutorial.html
I'd start off with the manual page (man vim), but I can see why you wouldn't want to read through the entire thing.
As such, this came up in a quick google search. It covers some of the more important points, although there are probably more in-depth tutorials.
-
2Reading the manual page for Vim is nearly zero help for a beginner, since it primarily talks about opening Vim on the command line. Vim's own internal Help is very good, but even that is not a sane way to learn the editor initially. In this case, doing beats reading. Read a short tutorial and edit with it, or use the
vimtutor
program to do both at once. Aug 1, 2009 at 13:19
In your terminal:
$ vim
Then in your opened vim buffer:
:set syntax=on
:help
When you get familiar with the touch type, you need some customizations to beautify it, like a beautiful color scheme, and an elegant font. Feel free to download my setup at GitHub.