My vim configuration on Github

Ever since I started using Vim as my preferred text editor I have been keeping my configuration under source control. At first I kept my config for all the various applications + some useful scripts in one Git repository. But after I had given a (very) short presentation at work, I started to think about splitting of my vim-configuration into a separate repository. I have already learned a lot of useful tricks and settings about vim by studying other peoples vimrc-files, so I feel like it's only fair to also put mine out in the wild.

So first I did a little Git magic to split of my vim subdirectory into a separate Git repository, without losing any of the history. The answer on how to do this can be found on StackOverflow: Detach subdirectory into separate Git repository.

Then I created a repository on Github and pushed my entire vim configuration. Feel free to explore it and use pieces from it. (Or use it in it's entirety, but I don't think that would really be useful)

Some 'cool' features I use in my vimrc:

Pathogen

A few weeks ago I started using the Pathogen-script for vim. This script makes it possible to keep every vim-plugin in it's own directory. To use Pathogen you need to call at least one of it's functions so it can do it's job. I choose to keep this initialization in a separate file from my vimrc-file. That is why my vimrc starts with the following line:

Redefining functions in Javascript

A few days ago I wanted to know how easy it is to redefine a function in Javascript which is already defined. I know that doing something similar in Ruby is rather easy and I had the feeling that it would be possible in Javascript as well.

After some googling and testing I came up with the following test document (which is perfectly valid HTML5 btw!):

Budts.be: version 3 is here

Today I'm happy to launch the new version of my weblog. (Oh and also the rest of the website, although some content still needs to be updated.) This is version 3 of the weblog, not counting my very first weblog at blogger.com. Although it's only been 1.5 year since I switched from Nucleus CMS to Wordpress, I once again switched over to another CMS: Drupal. Not because I was unhappy with Wordpress (it's a really nice system), but Drupal gives me a lot more flexibility. Flexibility which I needed to implement some new ideas I had for this version of the weblog and my website in general.

I have always maintained a few different sites, running on a plethora of applications. I had my photo website (fotos.budts.be), which ran on ZenPhoto; I had lightyear.be with the activity stream, running on Gregarius with some self-hacked ruby code to write the final stream; Then I had my cv-site (budts.be/jeroen), which was mainly just static html with some PHP-hackery; Joining the club was also gluefish.net, which was built with some other static html and PHP-code; and finally I had this weblog on Wordpress. Clearly a mess :)

So now all these sites are integrated in one Drupal site. The cool thing about this is that all my content is now available on the website as real content, or 'nodes' to use the correct Drupal-speak. That's right, blogposts are nodes, normal pages are nodes, photos are nodes, tweets are nodes, delicious-bookmarks are nodes*, project pages are nodes, (allmost) everything is a node. This has the advantage that I can tag nearly everything on the website with the same set of tags so you and I can easily read all of the content about something. And it also allows easy searching.

Dell Latitude E6510, screen and touchpad

When we got our new laptops at work (Dell Latitude E6510) we had some various problems while installing our preferred Linux distros on it.

The first problem which we all had was trying to get the screen to work. I could get it to work by booting with the following kernel params xforcevesa nomodeset (I also removed the default quiet splash). Now I just run with only nomodeset, which works without problems for me, but without 3D. Jan has compiled a patched kernel for Ubuntu with 3D support but with less colors.

Then the second problem: scrolling with the touchpad didn't work. To fix this I ran the following commands:

Reisverslag Guatemala 2010

Nadat we vorig jaar een kijkje hadden genomen in India en Nepal wilden we nu wel eens meer richting Amerika trekken. Ook wilden we eens een groepreis proberen. We hadden in India gemerkt dat we toch wel tijd verloren aan het zoeken naar de juiste plekken en we toch niet overal zo direct onze draai vonden.

We hadden al van verschillende mensen vele positieve dingen gehoord over Djoser en zij bieden sinds dit jaar een 17-daagse rondreis door Guatemala aan. Ons eerste plan was Mexico, maar als we het aanbod bekeken leek Guatemala ons aantrekkelijker omdat het zowel echte Maya-cultuur heeft, maar ook jungle en mooie natuur, zodat het, zo hoopten we, een gevarrieerde reis zou worden. En dat werd het ook!

Hieronder het verslag van onze reis naar Guatemala (en een klein stukje Honduras), die we deden in oktober 2010. Onze groep bestond uit 5 Belgen en 5 Nederlanders (waarvan eigenlijk 1 iemand van Spanje kwam) als je de reisbegeleidster meerekende. Het verslag is geen doorlopend verhaal, eerder een aangepaste versie van de verschillende mailtjes die we naar huis verstuurden (geschreven door Tine) met enkele van onze foto'tjes bij (gekiekt door Jeroen). Zowel de tekst als de foto's in deze blog-post staan onder de Creative Commons Attribution 2.0 Belgium License.

15-16 oktober: Ola Guatemala!

Na 27 slopende uren zijn we gisteren aangekomen in het wondermooie Antigua. Om geen 'dat hoort erbij'-speech uit te lokken, besparen we jullie van onze klaagzang over ontelbare paspoortcontroles, onnoemelijke 'customs and migration'-forms en het feit dat Continental Airlines echt wel een pak zuigt. Om eerlijk te zijn had ik deze nabijtraumatiserende ervaring liever ingewisseld voor een 27-uur durend tandartsbezoek. Zonder verdoving! Soit, het zicht van baggage die onbeschadigd van de band rolde en de chauffeur die een ruim busje had, maakte veel goed!

Vandaag prachtige dag. In de voormiddag Antigua bezocht, een zalige koloniale stad. Erg mooi met al die kleurtjes op de muren van de huizen, de kinderkopjes, de muzikantjes op de straat, de oude gebouwen... en dit allemaal in de schaduw van verschillende vulkanen. In de namiddag besloten we een 'korte' wandeling op een actieve vulkaan in de buurt te doen. Achteraf bleek het eerder een uitputtingsslag maar het was een superervaring. De vulkaan barst geregeld uit en de hele omgeving is bedekt met lava. De wandeling was inderdaad kort maar door de hellingen en het genadeloze pad met grote stenen en glibberig grind maakte dit een heftige tocht. Maar het uitzicht was fenomenaal! En het was erg indrukwekkend om lava te zien stromen in de tunnels onder het pad.

Upgraded to Ubuntu 10.10 (Maverick)

Today we saw the release of Ubuntu 10.10, codenamed Maverick Meerkat. Because I had some time today I immediately decided to upgrade my laptop. As usual the upgrade succeeded without too much trouble. Clicking a few buttons, letting the computer work for about an hour, reboot, and you are pretty much done.

Except for the few small things which break during upgrade. Out of experience from upgrading previous versions I know there are always a few small things you will have to fix. So here are the steps I did after the upgrade:

VIM: working with "light-projects"

While VIM certainly isn't an IDE, there are a lot of plugins in existence to make it more IDE-like. Although I have been working a lot inside IDE's the past few years, I don't really need all those fancy IDE features (and the bloat that comes with it). That's one of the many things I like so much about Vim, I can just add the features I need to the editor. So while there are certainly at least a few plugins to work with projects inside Vim, I came up with my own system for working with "projects" (call them "light-projects" if you wish). One small note: For the moment this method suits my needs, but since I'm only using Vim for about two months as my main editor, this might change obviously.

Basically, my solutions is based on an autocommand for every 'project' and the command-t plugin. Oh, and sessions as well. The autocommand detects when a file is read (or created) inside the project-directory. In this case, it will source the correct 'vimrc-project-file' and setup everything specific for the project. So as an example, suppose we have a project in ~/Projects/foobar/. In my .vimrc I add the following line (to be more correct, for most of the projects I would add the line in my host-specific vimrc-file, as I mostly use one specific computer to work on a specific project):

Using your Bash and Vim config on multiple computers

Not long after I switched to Linux I started modifying my .bashrc file. In a .bashrc file you can set options for Bash, add aliases, configure your Bash prompt etc. When I decided to start using Vim as my main editor a few weeks ago, I also started tinkering with the .vimrc file. The .vimrc file is, similar to the .bashrc file, the place-to-be to configure Vim.

Obviously I wanted to share all these config-files between my work machine and my personal computer. That is why I set up a Git repository on my Dreamhost webspace. With most of your important config-files in a Git repository you can easily share your config between multiple computers and you get a history of your modifications as a free bonus.

Because I want to keep it clear which files are in the Git repo and which files are not, I just created a directory in my homedirectory called 'scripts' (so at ~/scripts/). Everything in that directory is in Git, everything outside the directory is not. But because the Bash and Vim RC-files are outside the ~/scripts/ directory you will have to do some additional step to make those programs use the RC-files from the scripts-directory. For Bash, you can simply source your own Bash-file from your .bashrc by adding the following lines to the end:

Learning Vim

When I started working on my first PHP project at Inuits I had to decide which editor or IDE to use. Obviously while I was still working in the .NET-world I used Visual Studio, just as almost everybody else. However I also used jEdit at home for PHP, Ruby etc. I always felt that learning a general purpose editor, and learning it very well, is more interesting than learning an IDE for one specific platform (VS.NET in this case).

One of my new colleagues recommended me to use NetBeans for PHP development, so I had a look at it. While I'm sure it has a lot to offer, it just didn't feel like the tool I wanted to use. Obviously I had also installed jEdit. While I have always loved jEdit, somehow I wasn't convinced anymore. I also had a look at gEdit, which certainly has potential if you install some extra plugins and configure it, but compared to other editors and IDE's it seems to be rather limited. So then there was still that other editor. The editor which has fascinated me since at least 5 years. The editor which I have been using from time to time to make small edits on config files. The one editor which has a history which dates back to 1976. Yes, indeed, I'm talking about vi and it's modern incarnation vim (Vi IMproved).

Married and a new job!

As you might have read on my Twitter, I got married two weeks ago. My wife - it still feels strange to say :) - is the most wonderful girl on this planet, and far beyond.

Our marriage really was a day which i will remember for the rest of my life. Everything was perfect. Obviously a few small things went wrong, like arriving at the church without the bridal bouquet (doh!), but we really enjoyed the day!

For those interested, our wedding dance was Beste Banaan by Kommil Foo. Our DJ was DJ Patrice, who really did a wonderful job! A DJ who gets nearly everybody on the dancefloor knows his art! Even people which I never expected on the dancefloor suddenly were shaking their butts off. The people from De Vleeshoeve served us one of the best BBQs I have ever tasted. Also the icecream from Gelati Van Houcke was really tasty. And thanks to some friends, our reception also was great (thx guys!!)!