How to learn vim on a high level?
Solution 1
Step 0: learn to touch type. Seriously - if your fingers don't know where the keys are then vim is going to be a pain. And even if you reject vim, touch typing will improve your programming (ask Steve Yegge) by making the mind to monitor link friction free. There is a lot of software that can help you improve your typing.
Step 1: Use the keyboard preferences to swap Caps Lock and Escape - seriously, how often do you use Caps Lock? Using vim you will be using Escape all the time, and having it available on the home row makes a huge difference. With the standard Ubuntu desktop, go through the menus: System -> Preferences -> Keyboard -> Layouts tab. Then hit the "Layout Options" button, click on the triangle next to "Caps Lock key behaviour" and select "Swap ESC and CapsLock". (Note how to do this has changed - see this for how to do this in 14.04.
Step 2: use vimtutor to get you started. It is in gvim (under the help menu I think) or you can just type 'vimtutor' at the command line. It will take 30-45 minutes of your time and then your fingers will know the basics of vi/vim and you should be able to edit files without wanting to hurl your keyboard out of the window.
Step 3: use vim everywhere. See this
question from StackOverflow
for tips and links for using vim and vi key bindings at the command
line, from your web browser, for composing emails, in your IDE ... You
need to use vim to embed the key bindings in your muscle memory.
Step 4: learn more about vim. You will only have scratched the surface with vimtutor. You can
- watch screencasts at vimcasts or those by Derek Wyatt;
- watch this video or read this article (both about the "Seven habits of effective text editing";
- read about some of the many tips and tricks on StackOverflow;
- browse vimtips.
Learn a litle often would be my advice - there is so much out there that sticking to bite-size chunks will be the best way to make the knowledge stick.
Step 5: Profit :)
Solution 2
"vimtutor" form package "vim" is probably the best place to start.
Solution 3
Two things:
Learn touch-typing. There's really no other way. Then bind ESC to ";;" so you never have to leave your home row:
inoremap ;; <esc>
Search github for other people's
.vimrc
s
And a third: VimCasts
Solution 4
http://www.linuxconfig.org/Vim_Tutorial
That is a pretty good tutorial. It has videos and such.
Solution 5
Related videos on Youtube
Comments
-
ADEpt about 1 year
I know that vim (like emacs) is very powerful editor for programmers, as long as you know how to use it, its shortcuts, and so on. What steps can I take and what tutorials can I read to become an advanced vim user?
-
tutuca over 13 yearscan't up vote this enough :)
-
ADEpt over 13 yearsThank you very mush for the best answer! Fortunately, I'm already touch typist. :) So, I will follow next steps ...
-
Marius Gedminas over 13 yearsAnd it has two complete manuals in it: user's manual and reference manual. You don't need anything more than vimtutor and :help to become a Vim expert.
-
m0sa over 13 yearsYea, as a vim fan I have to say that vim's a bit more than a hammer. It can provide helpful uses for anyone from sysadmin, db admin, programmer (of any language) and even just plain no frills text editor. It's installed by default on every system for a reason and I don't know that there's much of a case for "well do you really need to know it at all" Beyond that, the user posted this explicitly for finding ways/help to advancing their vim knowledge and experience.
-
Matthew about 13 yearsStep 2 is so important. Changed vim from a being a pain to my favorite editor.
-
ddeimeke about 13 yearsI want to push Step 3, you can even use (g)vim on Windows or Mac or ... (see vim.org/download.php) Only using one editor will make you more familiar with it.
-
ddeimeke about 13 yearsI totally agree with you!
-
Admin about 13 yearsMake caps lock an extra control (or swap them). Vim has plenty of uses of ctrl, more than I use escape (I imap kj to escape anyway), but that handy, easier control key is useful in every other program I use, too.
-
Audrius Gailius over 12 yearsI have to disagree with 0. Being able to type faster than you can think is not a good idea.
-
Jason over 5 yearsI use capslock all the time (long Java constants, old Fortran, angry blog comment ;-) etc.). I prefer the
jj
method of escaping insert mode.