I've been meaning to start blogging for a long time and now I have finally gotten around to it. The real inspiration that finally got me going was my recent move into the command line. My what? Well let me explain...

Around November 2013 my employer decided it was no longer OK for devs to work on their own laptops and that everyone would benefit if we all use the same company PCs and the lovely Dreamweaver IDE installed on them. Ah no thanks. I'm all for change but not the kind that involves swapping my comfortable MacBook Air, set up just to my linking, for a clunky PC with the unfamiliar Windows 7. In my view it was one of those brilliant decisions equal only to the relatively recent choice for the team to go with Subversion instead of Git. Oh well the decision had been made so I needed to make the most of it.

I had always been interested in trying Vim although I knew almost nothing about it. I thought I should be able to access it on my desktop right? Wrong, command not recognized. Maybe on our dev server that I SSH into. Success. And so my journey began.

Vim 7.3

I googled Vim tutorials and quickly found Vim tutor. Its a great way to start and the basics of Vim aren't at all hard. A little bit of practice and the basic keys stick. The really steep learning curve is what comes next. All the extra keys/commands and understanding buffers and how to use them. The sheer number of commands and the fact that there is often multiple ways of doing the same thing can be a little daunting. It also meant it was harder to seek out the commands that would initially help me rather than those that would distract me. Four months in and I now know enough to use Vim effectively while still discovering new and powerful commands every day. Despite coordination not being my strongest point and keyboard speed always being a slight issue for me I really enjoy working primarily from the keyboard. Understanding buffers is a different matter. I still don't really get it. I know using a tab per file is not the Vim way so I hope to rectify that habit soon.

As Jack Franklin points out in this article the number of command line tools for development are increasing all the time. Grunt/Gulp, Node, Yeoman, testing, transferring files etc mean spending a bit of time in the command line or using an ever growing list of apps specific to each task. Its great to be able to do all of this in the one place. Take SVN for example. My old work flow was awful. I would use Tortise SVN to create a working copy on my desktop and then transfer that to my dev server. To commit changes I then had copy the files back from the dev server to my desktop so I could use Tortise to commit/merge/update. On top of being a drawn out process the file transfers were really slow. Command line SVN is sooo much quicker. The files only ever have to go to my dev server and within a week I had memorised the few commands I needed.

Last week I moved my dotfiles from my devbox into a GitHub repo and cloned them onto my MacBook at home. I now have a consistent setup on two vastly different machines which is awesome. I don't have to compromise on either machine and I can quickly sync any changes between the two. I can also quickly replicate this setup on a new machine if need be and don't fear what would happen if my dev box virtual machine had to be wiped. Consistency without compromise == awesome.

Moving to Vim on my MacBook was a real turning point for me. I cant really see my self ever needing Sublime Text again (even though I'm a huge fan) and find it highly unlikely I will take the time to get familiar with Atom. I was excited about Atom and getting my beta invite but since then I've only opened it a couple of times. Its funny because I think Atom will be fantastic and I would be surprised if it doesn't become the dominant IDE in the future, but I cant see it being better than the infinitely extensible and powerful combo of Vim and other command line tools.

I have been developing since the late 90s and only now do I feel like my productivity is really starting to take off. Its funny that it has come out of a tool that was around before I even started writing code. I really wish the first page of Creating Web Pages For Dummies had urged me to go and learn Vim. I can hardly imagine what it would be like to use Vim with 15+ years of muscle memory to back me up.

This post is only an explanation of how my journey began. I intend to blog about the smaller details I have found a long the way and will continue to find in the future. I have been collecting notes on all the dotfile tweaks, Vim plugins, server installs, putty settings, and other small details. I will use these plus new discoveries I make as the basis for this blog. You could probably find all these answers on Stack Overflow (as I originally did in many cases) but sometimes knowing the question is far harder than finding the answer.

Finally blogging, finally harnessing the power of the command line.

Related

comments powered by Disqus