fullybaked | davebaker

I'm a developer living in the UK and when I'm not spending time with my wife and our 2 wonderful little boys, I love hacking around with code

I'm passionate about technology, web development, gaming and fencing

14 April 2013

A week living with Vim

Now first off, I know full well that only giving Vim a week is crazy. This tool can take people years to master properly so to only give it a week of my time may seem pointless, anyway here's my thoughts after switching to Vim as my only editor.

I've long wanted to become an experienced Vim user, both to improve my workflow when using it over SSH, such as editing server configs or writing batch scripts, and to speed up my general coding. This comes from years of seeing and hearing about coders who are extraordinarily fast in Vim.

Over the years I've used most tools going for coding; IDE's, Textmate, Sublime and others, but always in the back of my head I wanted to use Vim and the major bar to entry was that it just felt so hard to get started and my productivity dropped off so much that within a day or less I was back to my normal editor.

After getting inspired to once again to try, last week at Ruby Manor, I decided come hell or high water I would stick it out with Vim. I started watching Vimcast, I ran through the vimtutor a couple of times to make sure it stuck and I installed a variety of plugins to customise Vim exactly how I liked it.

Getting past the idea of modal editing was the first block and for the first day or two I was mainly in insert mode just using it like any other text editor, but doing this looses so much of the power of Vim that it almost becomes pointless to make the switch. By day three I had grokked modal and was spending my time in normal mode, which made navigation and editing significantly faster.

I think this is the first lesson anyone needs to learn, there's a reason it's called normal mode. It's where you should spend most of the time.

Once I got the hang of the main navigation commands, w and b for jumping across words, 0 and $ for jumping to the start and end of lines, and a handful of others I really began to feel comfortable with Vim, but I was still working slower than normal.

Sadly, by the end of the week, shifting deadlines and growing workloads meant that sticking with Vim is just not a good idea for now. I've learnt an awful lot in just a week and I think that it has made the next time I try Vim a much less daunting thought, and one day maybe I will be using it to really speed up my work.

The one great thing to come out of this week though is that I learnt Sublime Text (my current main editor) has 2 packages, Vintage and VintageEx. Vintage is installed with ST2 but turned off by default, VintageEx needs installing separately. Basically these 2 plugins provide some of the vi/vim commands to ST2 including the modal editing, all of the navigation commands I was getting used to this week and many others.

Activating and installing these two plugins have actually increased my speed in ST2 significantly. It seems weird, but getting a feel for the navigation around text and working in a modal fashion seems to have carried across nicely from Vim and is really helping in ST2. Hopefully using these commands as part of my normal workflow in ST2 will make them second nature, so the next time I have a crack at Vim I'll be half way there.