How I Became A Vim Addict
The text-editor is undeniably the most important piece of software in every developer’s toolset and should therefore be picked with special diligence. It is the place where we spent most of our time and it is the tool we should be most comfortable and enjoy to work with.
It was a rather long way until I ended up with what is now my setup since a few years and I’m quite sure will last for a lot more. This is not a guide but the story of how I got there.
The Windows Days
I started developing under Windows and tried a vast variety of different Text-Editors and IDEs. I am not sure how many different editors I have used but I remember Phase5, UltraEdit and Eclipse, just to name a few. Eclipse was my main editor for a very long time - at least for 2 or 3 years.
Before I switched to Mac, I tried a few Linux distros like Suse, Gentoo and Fedora. But since Linux lacked (and still does) my favorite games, decent image editing and music production software, I could never completely switch. So I often had to switch between Linux and Windows, yet I was trying to do as much as I could under Linux and used Windows practically only for Photoshop, Fruity Loops/Reason and playing games.
So I had already some minor experience with the command line when I switched to Mac.
The Switch to Mac OS X
At the age of 18 came the switch to Mac OS X. It was an iMac 21” and I loved it from the start. It was fast, it was beautiful and it was an entire new experience of using a computer.
Though Eclipse was also available for Mac I wanted to give other editors a try, just to see if I liked them better. When I googled for “Text editor OS X”, TextMate was all over the place - and still is. So I gave it a try.
I was so used to using an IDE that I missed a lot of Eclipse’s features - but at the same time I loved the minimalistic UI. Seeing nothing but the code was a refreshing experience after those years of a bloated interface. And this weighed out the features I missed from Eclipse. So I worked with TextMate for a couple of years and I became a real fan of it.
VIM: first attempt
An article, that I unfortunately can’t find, said that developers should pick their tools with care and learn them thoroughly in stead of changing them all too often. The author said he was using vim for over a decade for all his work and more.
I liked that idea and felt inspired, but since I had already some (minor) experiences with vim, I was sceptical that someone claimed to be using it as his only text-editor and I didn’t think that anyone be efficient this way at all.
Admittedly I did nothing spectacular in vim so far. Mostly editing config files on various VPS through SSH and I thought it was just something like
nano or Notepad with some weird modes and mappings that I did not understand.
Out of curiosity I did the
vimtutor, read about working with vim, watched some Screencast and tried to use it as my main editor for a few months, though always switching back to TextMate when time was short and work had to be done really quick.
But sadly it didn’t click between us.
Especially as Ruby on Rails was on the rise and TextMate was the most popular text-editor amongst its developers, I stopped using vim at all after a while and was quite satisfied with TextMate. Its community was active, supplied a lot of plugins and I could easily write my own. Besides, a lot of shortcuts had already moved into muscle-brain.
But I always missed a few features from vim. Especially split panes and the command mode - which I liked way more than TextMates shortcuts that tended to be quite difficult to execute on german keyboards.
VIM: second attempt
When the frequency of updates for TextMate decreased drastically and people started to call it dead. Alternatives like Coda had emerged by then and started to become really attractive.
But I was tired of all that Editor switching and wanted to settle down.
So I tried vim again.
But why did I give vim another chance?
I always had a terminal running by then and only one keystroke away using Visor and I thought it would be great if I could accomplish most of my work in the terminal.
Maybe it was just a case of Baader-Meinhof phenomenon but from then on I saw introductions and guides to vim everywhere and the community around vim seemed to be alive.
I also met a guy at a Barcamp who had a lot of love for vim and he told me he was using it for way more than a decade and still finds ways to be more productive. He showed me a couple of things and I was psyched.
So I started again and tried it the hard way. I deleted TextMate and configured vim from scratch to my own needs from the start to get a deeper insight. I ended up tweaking my
.vimrc a lot, read through other people’s configurations, updated mine and found out about so many ways how to use vim.
It was fascinating to see that many people use the same editor in very different ways. So different, that one couldn’t think that it was possible with the single same editor. Some use MacVim and primarily NERDTree for file navigation, some focus on buffers, others on windows and again others on panes and some always do fuzzy search to get a file. And these are only a few options for how to open and view at files.
When I had trouble to do certain things, I tried to figure out what possibilities vim has and pick the one that I liked the most instead of finding a single way and trying to stick with it, which is what I used to do during my first attempt.
Of course this involved hours of reading and learning and I know people that would argue that the time invested in reading, learning and tweaking doesn’t make up for the time that is saved. But that’s a naive miscalculation which assumes I’d be working when I’m not tweaking or learning.
I think for a tool that I use for at least 6 hours per day it is worth the effort if I become more productive and using it becomes more fun. It definitely pays off.
It clicked, again and again.
When reading the coming home to vim by steve losh, watching smash into vim part one and two and probably all vimcasts that were made until then, I got more and more impressed by and hooked to vim. Everytime I thought “Wow, this is awesome!” and often enough I thought that most modern Text-Editors lack an embarrassing lot of innovative features which vim had introduced years ago.
Vim still has this aura of being more powerful than I could ever conceive to me. Whenever I read through the help files, I almost always find new things or remember things I forgot about. Not only things that are just nice - also things that turn out to be very powerful.
By the way: vim is just an improvement of
vi, which is incredibly powerful itself. And though being older than 20 years the community around vim is far from being dead. It is still being maintained and new plugins are still being written and #vim on freenode is easily filled up with around 800 people.
I don’t think that this will change drastically any time soon. And I know that a lot of other vim users think the same way and love to stick with it for the same reasons I do. So I can be quite sure that I won’t change my primary Text-Editor for at least a few more years and that It will be updated to work with whatever OS awaits us in the future.
In case you want to dive into vim, and get a decent overview, I highly recommend you to read Steve Losh’s “coming home to vim” and finish the
vimtutor (just type vimtutor into your terminal). Also the Screencast by peepcode is a great resource to get started.
I plan to write an introduction soon, in which I will also elaborate on how I use vim and what plugins I use.
Sunday, 14. October 2012.