Wednesday, November 14, 2007

Common Lisp and Vim

Don't get me wrong, there's a lot to be said for Emacs and SLIME. The fact that so many Lispers use it is hardly a coincidence — it makes for a very powerful and extensible development environment. I have used the Emacs/SLIME combination long enough to know the following:
  • It's very nice.
  • I don't like it.
  • No, I'm not trying to start a flame war.
Now, opinions change over time, and perhaps mine will too. I think the barrier to acceptance is the fact that my current setup with gVim and SBCL is good enough that I can't justify spending the time to become an efficient Emacs user. It turns out that Rob Warnock can't either, and he's a guy who really knows where his towel is.

I came across this message posted on comp.lang.lisp, and ended up writing my own version of the LOAD* function Rob talks about. It's really a very handy tool, and makes it a lot easier to work with the REPL and your editor of choice. I keep LOAD* and a few other frequently-used tools loaded in a custom core file, which I create using a file called make-core.lisp. To create and use a core file, do the following:
$ sbcl --load make-core.lisp
$ sbcl --core ./sbcl.core
Bear in mind that LOAD* is rather naive and hasn't been tested much, so if there are any suggestions for improvement I'd be glad to hear them.