VimClojure — a filetype plugin for Vim
Description
VimClojure consists of a set of plugin for Vim to enhance the editing of Clojure files. It provides syntax highlighting and indenting.
It was merged with the former Gorilla project and now provides also interactive features like…
- omni completion
- macro expansion
- code evaluation
- docstring lookup
- javadoc lookup
Here a screenshot of omni completion in Action:

Feel free to mail me any feedback: mb@kotka.de.
There is a screencast available, which explains, how to setup VimClojure. Please note: The screencast might become outdated, so README in the distribution is always authoratitve for installation instructions.
Download
Current Version: http://www.vim.org/scripts/script.php?script_id=2501
Development Version: http://bitbucket.org/kotarak/vimclojure
FAQ
The following examples assume that you are running a Linux box with the
user named user, that your home directory is /home/user and that you
installed clojure, clojure-contrib and vimclojure in the /home/user/clojure
directory.
Installation
Q: How do I install vimclojure?
A: Create a text file called local.properties where you specify the location of the clojure.jar and clojure-contrib.jar as well as the location of your .vim directory. Here is an example how the file might look like under Linux.
clojure.jar = ../clojure/clojure.jar
clojure-contrib.jar = ../clojure-contrib/clojure-contrib.jar
nailgun-client = ng
vimdir = /home/user/.vim
Then compile the vimclojure.jar with ant and then ant install. Setup your CLASSPATH as described in the README.txt (It must contain the vimclojure.jar!) and start the ng-server. You can use the included ng-server script or launch the server manually
java -classpath /home/user/clojure/clojure/clojure.jar:/home/user/clojure/clojure-contrib/clojure-contrib.jar:/home/user/clojure/vimclojure/vimclojure.jar:src com.martiansoftware.nailgun.NGServer 127.0.0.1
Point VimClojure to the place where you compiled it and tell it, that you want to use the interactive features. In your .vimrc:
let vimclojure#NailgunClient = "/home/user/clojure/vimclojure/ng"
let clj_want_gorilla = 1
More detailed information is in the README.txt and a visual walkthrough is shown in the screencast.
Q: What does that „java.lang.ClassNotFoundException: clojure.contrib.pprint.PrettyWriter (pprint.clj:23)“ mean?
A: You have to AOT compile clojure-contrib, since VimClojure uses Tom Faulhaber's pretty printer which needs some classes generated via gen-class. To compile clojure-contrib execute the following command in the directory where you installed the contrib sources.
ant -Dclojure.jar=../clojure/clojure.jar