Monthly Archives: June 2005

Big Shot Rob!

Robert Horry was UNBELIEVABLE last night!. In a good game punctuated by the freakish inconsistancy of Tim Duncan’s free throw shooting and Tony Parker’s inability to take care of the ball for San Antonio, Robert Horry added the final exclamation point with yet another clutch three (5 of 6 for the night!) to steal game 5. Not to mention that he did it after tweaking his left shoulder on a monstrous weak hand dunk over Rip Hamilton just a few minutes before. Good thing he shoots his threes right handed.

Getting Back To VIM

I spent some time increasing my vim (vi improved) knowledge today since Ubuntu doesn’t come with a gui-based editor (like KDE’s kate) installed by default (and like weblogging software I’m always curious to try something different). I first used the venerable vi editor something like 14 years ago in an introductory Computer Science class, but I didn’t really appreciate its arrow key independance at the time. Now I wish all text editors gave you a way to move around quickly without taking your fingers off the home row. It definitely bugs me when I have to shift my right hand down to the arrow keys on my Powerbook.

Vim has some pretty nice built-in functionality, but you have to work a little bit to expose it and it definitely requires effort to get the hang of it (for a nice basic tutorial try vimtutor from the command line). On MacOS X and Ubuntu it’s basically configured in vi compatibility mode out of the box with most of the cool things like syntax highlighting turned off. It took me a while to figure out the easiest way to activate things, but it ended up being fairly simple: mv /usr/share/vim/vim62/vimrc_example.vim ~/.vimrc will copy a basic vim configuration file into your home folder that will activate vim’s cool improvements the next time you launch it.

Of course once I had syntax highlighting, auto indenting and other cool things working in vim, I immediately became irritated by the default tab spacing. Eight spaces per tab is simply too much text real estate for me, three or four is a lot more reasonable and pleasing to my eye. I turned to vim’s ample built-in help and eventually came upon a solution I was happy with, but it took me much longer than I would have preferred. Many programmers prefer their tabs to actually be written as a certain number of spaces so that code formatting remains constant across editing environments and vim has a couple different tab space settings to support this. For simplicity’s sake I prefer my tabs to be tabs and my spaces to be spaces and after quite a bit of searching I determined that required adding three more lines to the end of my .vimrc file:

set shiftwidth=3
set tabstop=3
set noexpandtab

Much nicer. With mytab issues conquered, I’m still trying to find a vim syntax coloring setup that I’m completely happy with, but I’ll save that for a later post. Stay tuned.

Ubuntu-ized iMac

I decided to put Ubuntu PPC through its paces today at work on a first generation rev. B iMac with 288MB ram and a 266Mhz G3 processor. Unsurprisingly it runs quite well and comes with a lot of useful apps installed out of the box. I was impressed with Gnome’s built in terminal server client; connecting to a variety of campus terminal servers was quite painless and very responsive. In some ways I find myself liking Gnome more than KDE, but I can’t really give a definitive reason why at this point.