views:

162

answers:

3

I've learned the basic/intermediate levels of VIM (it's too vast to list). I often find that I slip back to my old ways and start using the mouse, holding down keys to get somewhere, and doing other stupid things that could be sped up.

Would it be worth spending time to learn ed to break the habits learned from years in a point and click interface? Does using ed cultivate the right type of thinking that will transfer to VIM?

+3  A: 

I learned Vim and became proficient simply by using Vim itself--a lot. I think the key is practice, practice, practice.

If you want to train yourself to avoid the mouse, unplugging it or putting out of reach might help. Learning a whole different program might be overkill, and the knowledge may not translate directly.

Will
+9  A: 

You need a change in habits which is much deeper than simply dropping the mouse. You need to understand that if you really want to learn Vim you have to do it "the hard way": read and memorize text-objects (:help text-objects) operations and movements and try using arrows/hjkl as little as possible.

At first you will be a lot slower, but don't fall back to normal movement. If you need to select a paragraph, use vap, if you need to change the text inside a pair of double quotes use ci" and so on. When these things will come out of your fingers naturally, you'll realize how worth it was the time spent to get used to them.

kemp
thanks a lot for the tips . Look like I must try to practice vim moves time to time instead of old moves ;)
nXqd
+2  A: 

Read this post by Bram Moolenaar on the subject of efficient text-editing.

One of the points is that it takes conscious effort to force yourself into the habit of using Vim efficiently.

So yeah, hide the mouse while you're in Vim. And when you catch yourself doing things "the wrong way", stop and do them again correctly. It won't be long before you've learned the proper habits. And has has been suggested: Text Objects. Learn them. Get in the habit of using these and you're 1/2way to being a Vim pro. Using them is addictive; it won't take long.

I think in addition to consciously avoiding the mouse, it also helps to consciously try to force yourself to keep your fingers on home row.

numbers1311407