I’ve been trying to get this working for quite some time, I finally have a semi-working function to fold Clojure methods automatically.
First, here’s a picture of what you can expect to see when using this (click for larger version):
And here’s the code (stick this in your .vimrc):
That’s it, easy as pie, enjoy the folding for Clojure files.
There are a few bugs with this because I’ve never actually written a Vim plugin, so I kind of hacked my way through this until I got it working. I welcome any feedback from someone with vimscript development experience (I’m looking at you Brian Carper ;))