My Setup Part 2: Vim and Coding

Working on my diploma thesis, like seen in the last post, I’m currently writing a lot. Especially since I’m writing lot of different things like configs, code, as well as the thesis itself I got used to really relying on a small amount of tools I try to master instead of using different tools for each task. I will try to outline this, as well as the hardware in use.

The main tool in my workflow currently is Vim. Even though it is a very old editor, in my opinion it probably is at least one of the most powerful, especially when it comes to customizing it. I use it to edit pretty much everything, and since syntax highlighting for a lot of stuff is build in I don’t need to rely on a lot of outside themes, modes, and plugins but there are some essential ones. First of all there is snipMate, which brings the awesome power of snippets, known to Mac users from TextMate, to Vim. It’s just so much easier to Code if you just have to type def TAB to get a whole new method setup when editing ruby, instead of writing it out yourself.. and Thats just the beginning defining your own snippets is easy, and the included ones are powerful as well.

Other very nice plugins are surround, to quickly change tags in HTML or LaTeX, as well as endwise to make sure you don’t forget those brackets at the end in C or the end in Ruby. To manage plugins, modes, as well as themes I use autoload provided by pathogen which enables automatic loading of every plugin you put in a special folder. For everybody interested all my configs are available at Bitbucket, because there is so much more about Vim configuration I’m not going to describe it all here. Also check out vimcast I pretty much get to know a new great feature every time an episode is out.

On the Terminal side of things I got used to use screen to manage a whole bunch of ssh sessions, as well as to get an IRB running every time I open a Terminal, which is extremely handy since most of the code I write is ruby, and explorative programming makes a lot of things a lot easier. Of course I use Vim as an interactive editor for IRB which makes editing those code snippets I try out a breeze, and wirble to give me autocompletion in IRB.

I guess it’s kind of obvious that I’m a big Mac/Unix fan so to round it up I use a first generation Macbook Pro Unibody as my main machine, running VMWare Fusion to administer those XenServers under XP, as well as to give myself a Linux environment when needed. Currently the Macbook is equipped with a 500GB HDD as well as 4GB of RAM to keep those VMs running smoothly. Until today I was using a 500GB FW800 Drive for Backup, which sadly died today and will be replaced with something RAID1 and about 1TB shortly.

Thats it for this Post, I will be continue this series hopefully soon, and maybe include some things about my home Windows 7 Nettop Box as well.

Stay tuned, also for more XenServer Stuff which is on it’s way as soon as seamless migration is working as I want it to between those mentioned locations. Until then I’ll be hacking away happily using the old and trusty Vim ;).

My Setup Part 1: Web use basics

Recently I’ve been reading up on a Series called the setup where a bunch of really interesting people describe how and especially what they use for their computing needs. I got a whole bunch of new and useful tools out of it and also got in a habit to really think about what I’m using, why, and how. Since I can’t keep this all in my head I decided to make al little series out of it, and to start with I’m going to write about all the tools I use daily on and with the Web.

Thinking about it got me to the realization that I don’t need a mail client anymore, but using GMail on the web works even better with my workflow, especially due to the great search features, since I’m not a big fan of folders. Combine this with a notifier to keep track of new emails as they come in and it will stack up to pretty much any Desktop Mail client, especially after enabling shortcuts, so that archiving email is just a ‘e’ away.

With the use of webmail comes the need for a fast and stable browser, since Firefox is becoming more and more the opposite of fast and stable lately I switched to Chrome. Of course since I’m on a Mac Safari would have been the obvious choice, but Safari is just way to slow when handling multiple tabs, which especially if you are using a bunch on online tools are essential. Chrome now really is the basis of all my web use, and since the extensions are there it replaces more and more of my daily desktop tools with online equivalents, like Chromed Bird  for Twitter. Even though I tried to replace NetNewsWire as well with Google Reader, to me Reader is just not there especially when using a lot of feeds because of missing options like Snippets, Open in Background, Open in new Browser Window, even though all this is possible it’s really rough around the edges.

So to me EMail an Browsing is my basic web use, there are a lot of tools I use on the web, and with the web especially when it comes to sync, and I will write about those in a later post. Also to come is the probably biggest part of my daily computer usage which is Terminal, MacVim, and IRB to which I posted the configs to Bitbucket, but will also describe how to make everything work together to beat every IDE and make Eclipse hide weeping in the corner.

The art of unix tool configs

While unix , in my case MacOSX, is the source of many great tools, most of them only get really great if they are configured correctly. For example looking at a “out of the box” Vim, it seems like an almost unusable editor, but configured right its probably one of the best, well it is the best for me at least.

While Ruby, especially Rails, preaches what is called “sane defaults”, which means that the default configuration is what most people should need, this is not true for most of the command line Unix tools, I’m sad to say. Or maybe it’s just me I don’t know. Since reconfiguring all the tools like I need them every time I’m at a new machine is a real hassle, so a long time ago I setup a svn repository with all of my configs so I can simple pull them down whenever I need them. Since svn is getting a little old fashioned, and also I think there is much to learn about configuration from reading others, I decided to just push everything to Bitbucket. I also wrote a really simple bash script to setup the configs needed simply by issuing

./ vim

to setup vim. Or use hg, screen, xemacs, bash to set them up.

I got to say so my vim configuration is rather large and is also spread over two directories, so maybe take a look there first, and check out the comments in the files since I at least try to keep them documented throughout their building process.