Getting Clojure Highlighting With Vim On Windows

Toralf Wittner wrote a good syntax file for Clojure but I had a hell of a time getting it to work on Windows, mostly because I’m not very smart and/or I didn’t bother to read the documentation for Vim. So sue me. Regardless, if you want to use Vim to edit Clojure scripts on Windows, save the file at the link above into your vimfiles/syntax folder and call it clojure.vim. The filename isn’t important but it makes it easy to see what syntax files are what. I’m currently just loading the file manually when I code in Clojure using :set ft=clojure and boom, you’ve got nice syntax highlighting.

You could probably set this up to automatically recognize .clj filetypes and turn syntax highlighting on for those but I’m going to stick with this small victory first. At least I learned SOMETHING today.