More Muc Than You Can Handle

Valuable Links - Vim

Today I’ve decided to start something new. I tend to send my friends and colleagues links about all sorts of things. Usually when they are pertinent to a problem they are having, or to supplement a conversation I’ve had with them. My usual process to reproduce these links ends up being a search in: Twitter, Pocket, History, and my Bookmarks.

Also, when I share my links I tend to write a few sentences about them. It adds a personal touch and a bit of context, so that’s why I’m exploring this channel for displaying them. As opposed to using a bookmarking website.

I would say I’m a moderate Vim user. I have a simple .vimrc with few plugins. Learning to be competent at vim has made my computing experience so much better. Here are a few websites that have helped me out:

  • Vim Primer - I can’t think of a more thorough primer. Even after knowing vim for a while I learned a lot from this article. Not only that, it helped reinforce the things I knew already to better explain them.
  • Vim After 11 Years - A good story on someone’s journey learning vim for the last 11 years.
  • Vim Golf - Try and do the editing exercises in the minimum number of keystrokes.
  • Destroy All Software - Watching Gary Bernhardt is a great way to learn vim. His excellent screencasts have 3 episodes focused on Vim: File Navigation in Vim, Some Vim Tips, and The vimrc.

My Own Tips

  • Disable the arrow keys. They just encourage bad habits. For me, I had to use the h, j, l, and l out of necessity. I travel a lot, and writing code on an airplane is difficult if you have to move your hand to the arrow keys. The key is not to do this too early otherwise you’ll be frustrated like Yehuda Katz.
  • Don’t use a premade vim configuration. Things like Janus make it easy for vim to behave more like TextMate or Sublime (both great editors), but if that’s what you want, why not just use them? Instead, strive to keep your .vimrc your own and rely on plugins to get the benefits of the excellent work that’s been done by other people. Clif Reeder articulates when to leave Janus quite well. Ben Orenstein supports this tip too.
  • Keep it simple! The more you stray from default, the more dependant you are on your own configuration. Use plugins in order to extend functionality. If you can’t explain every line of your own .vimrc then either figure it out, or remove it.
  • As you grow more comfortable, start using vim everywhere. If you use gmail, turn on the keyboard shortcuts (some of them are vim like). If you’re using Chrome, install Vimium. It allows you to navigate the browser as if it’s vim. There’s even VsVim for Visual Studio users!

Admittedly, I still have a lot to learn. I’m by no means an expert.

Disclaimer - I’m a “learn it the hard way” type of person. So that may explain my thoughts on the subject.

Hope you enjoyed the first of what could be many “valuable links” posts.

Addendum