Operator Error

adventures in software development and continuous learning

Doing Life on Home Row

I’ve always had a fascination with Vim. For the unfamiliar, Vim is a text editor that disowns the mouse and challenges the user to put those 8th grade typing classes to good use. That’s right folks, you are now doing life on home row!

Home Row

My fascination with Vim started back in college during my experimentation days. You know what I’m talking about. The long, carefree nights, trying anything put on the table, and always looking for the next, better distribution.

Wait. Distribution? I’m talking about experimenting with Linux! What did you think I was talking about?

Oops. Now that we’ve cleared that up, lets move on…

At this time, it was impossible for me to avoid command line editing, so it was necessary to learn the absolute, minimum basics of Vim to get by. This meant learning how to insert a change, save the file, and quit. However, I always did things the wrong way, like using the arrows keys for navigation. I know many of you just shuddered at the thought of inefficient cursor movement, but you have to understand where I (and most likely you) come from.

In the beginning, Vim felt completely foreign to me and understandably so. All my life, I’ve used a computer with a mouse. From accidentally deleting Notepad on Windows 3.1 (Oops!) to playing Quake 3 on Windows ME, a mouse has always been firmly in my grip. Thus, when I began my foray into the world of ones and zeros, I naturally gravitated towards text editors designed to be used with a keyboard and a mouse. Forgive me father, for I have sinned.

Notepad on Windows 3.1

Even through all this, I never felt the desire to use Vim as my full time text editor. The challenge and associated fears of relearning a skill (editing text) that you’ve done one way for years can be a bit daunting. Moving from Notepad++ to TextMate isn’t a big deal, because your proficiency can translate easily between “modeless” text editors. However, this all gets thrown out the window once you step in the Vim world. Don’t be afraid children, it’s well worth it.

I felt that if I really wanted to learn Vim, I would have to go all in. This meant only using Vim both at home and at work. However, the latter would be a challenge for several reasons.

I work in a development environment that is difficult to change. To paint a picture, the majority of my development at work happens on a Windows box that is on an air gapped network. To top it off, I do not have administrative rights and it is against the rules for me to put or install any unauthorized software on my machine. So this means that I am basically stuck with whatever software is installed on my machine when it was given to me. Furthermore, the default and recommended text editor for my software team was Edit Plus. While these security restrictions are unavoidable when working for a DoD contractor, it can be extremely frustrating.

All hope was not lost. A few weeks ago, I finally decided it was time to jump into the deep end with Vim after being blown away by the devastating power of Vim demonstrated at Destroy All Software. With a little charm, patience, and just plain old asking nicely, I was able to get my system administrator to install Vim & gVim on my machine. Guess it pays being on the good side of your IT folks?

Now that the stage was finally set, it was time for me to actually get my hands dirty and learn Vim!

In my quest to understand the Vim way, I searched far and wide on the vast plains of the internet. Below are some of the most useful resources that I utilized:

  • Vim Tutorial Videos – From novice to advanced, Derek Wyatt has produced a fantastic set of videos to learn Vim. This is my recommended starting point. Watching all the novice videos really helped me dive into Vim and get a strong, fundamental understand of the basics.
  • Vimtutor – Vim ships with its own tutorial called Vimtutor. Vimtutor is essentially just a text file that opens in Vim and instructs you on Vim basics. However, it is useful because it forces you to use Vim to complete the tutorial and enables you to apply the knowledge from Derek’s videos. It is a solid and easy way to start getting hands on experience, which is key to learning Vim. I recommend this as a second step and takes roughly an hour to complete.

For further learning of Vim and it’s advanced features, I use the following resources on a daily basis:

  • Vim Wiki – The name is pretty self explanatory, so stop wasting time and start reading!
  • Stack Overflow – If you don’t know what Stack Overflow is, then you’ve been living under a rock. Its crowd sourced, question and answering done right. A ton of Vim questions have already been answered, so make sure you search first!
  • My Vim Config – I used Derek Wyatt’s Vim Config as a starting baseline and customized it to my likings. Not going to lie, its pretty sexy.

Recommended:

Comments