6/24/2015 - 12:30 AM

Switch To Vim For Good

Non Optional

  1. Watch the Derek Wyatt videos in order (at least the “Novice” ones for now):
  2. Read “The Problem with Vim”, just to warn you:
  3. Read the first part of this Stack Overflow answer:
  4. Read “How to Switch to Vim” by David Bryant Copeland (entirely):
  5. Read “Coming Home with Vim” by Steve Losh (entirely):

My Advices

  • Start with an empty .vimrc, no plugins, no Vim distribution (like Janus). Only add what you understand, do not add too much things at once. Read other people .vimrc files. Vim is about “building”, or configuring, your own editor.
  • Do NOT stay in edit mode! The “normal” mode is called like that for a reason: you should stay in that mode most of the time. Switch to insert mode, insert something, then go back to normal mode.
  • Put your .vimrc on a repository hosting service (Gitlab, Bitbucket, GitHub…) so you can easily use it from everywhere and share it with others.
  • Create your own commands everytime you see yourself doing the same thing again and again, especially when entering in command line mode (by pressing [:]). Start by mapping :w to something faster to type. For me it’s [,s], because [,] is my <Leader> key, and [s] is always under my opposite hand.
  • Vim is a game which is incredibly rewarding after the first learning phases. You will learn to speak to your editor using a language. Every time you will learn a new noun, you will be able to use it with any verb or adjective that you already know. That is why with the time, every small thing you learn will be more and more powerful.
  • Try to learn new tricks from time to time, and remember to practice them so your brain can assimilate them and use them without even thinking about it.
  • Forget about your arrow keys. If you use them, your brain will never develop any good moving habit. Try to not use hjkl too much. kkkkkllllllllll is not faster than using a mouse: if you repeat the same key more than 3 times, there should be a way to move faster. Find it and use it.
  • If you more or less plan to buy a new keyboard, do it. This keyboard is now your Vim keyboard, and that could help you to create a mental switch.
  • You won’t be as productive as with your previous editor until one or two weeks, depending on what you do. Commit. Don’t look back. Your brain will hate it, but don’t listen to him, he will quickly find a way to be productive again.

Other Things

PS: Another approach that seem to work for some people is to take the opposite way: slowly learning Vim by using it as a “normal editor” to start. It didn’t work for me, but maybe it could work for you: