Web 2.0 and Semantic Web for Bioinformatics

in software, there is always a learning opportunity

Posted in GeekFu by agbiotec on February 16, 2009

In this post, I’d like to talk a bit about the potential of the Vim (Vi Improved) editor, as far as using it for writing code… Huh? What does this have to do with the tittle of this post, anyone is wondering who is reading this line right now…

Before I write what is needed to justify the tittle above, let me quickly point you to what you can do with the Vim editor: you can see that structure of your code (methods, variables etc) and you can indent your code automatically (works with many languages, but think Ruby/Python)… then you can do many more, but with these two examples you get the idea. Have a look at the 2526 vim extensions here, and to pre-occupy you, there’s even an extension for querying databases and one for writing wordpress posts !

Coming back to to the tittle, imagine being a guy who is stuck with refactoring messy and boring Java code (me). So you get up every morning, sit in front of your computer and trying to find that bug, peeing through lines and lines of code, while scrolling down the bar on your editor… is this boring ? Yes. How do you spice it up ? Well, I used to switch every 5 minutes or so to the Firefox window with Twitter, and read the new updates from the people I follow, both to blink and clear my eyes and also to get my mind off from running in a loop when thinking on a certain bug… now, when I need a tiny break like that, I do a bit of Vim Fu every time. These little bits add up to a belt with a darker color eventually, moving me up the Fu hierarchy. So in software, there is always a learning opportunity, you just have have to discover it. When you are stuck with a boring project, similar to when you have a blatantly-tasting food, look for some spice to add to it…

PS 1 Another Vim goodie I should not forget to mention, is that you just move around your text without using the arrow keys, this without taking your fingers of the alphanumeric part of the keyboard… plus you can erase whole words / paragraphs / sections with a few key combinations…Try Vim and enjoy your time in front of the computer !

P.S. A nice, free online Vim book can be found here.

Tagged with:

Leave a Reply