vimclojuresaid he got it running with no problems on his OS X box with the default
vim7.2.2 install, but so many other people have had problems with it that he recommends using MacVim instead. I don't enjoy MacVim as much as regular old command-line
vim, so I set about getting it working on my box.
It seemed at first like a lot of effort, but in fact it was easy. First, download
vimclojure. Next install some files, and edit your machine's main
vimrcshould look something like this:
Actually, that's not quite right. The line that says
filetype plugin onshould say
filetype plugin indent on. Anyway, you can get all this from the
vimclojuredocumentation - the one piece that's missing is the final line:
au BufRead,BufNewFile *.clj set filetype=clojure
That's the line that tells
*.cljfiles are Clojure files.
I got interested to solve this problem after skimming Matt Sears' Clojure links roundup. Check it out for more Clojure info. There are syntax highlighters for other editors as well. One last bonus tidbit, setting
tabstop=2allows you to use spaces instead of tabs, just like in TextMate.