How to install VimClojure (6 April 2010) 1. Clone the repository from BitBucket: hg clone http://bitbucket.org/kotarak/vimclojure/ 2. Create a local.properties file in the vimclojure directory containing: clojure.jar = /path/to/your/clojure.jar clojure-contrib.jar = /path/to/your/clojure-contrib.jar nailgun-client = ng vimdir = /home/you/.vim 3. From the vimclojure directory, run sh bin/kickoff.sh (this will download Gradle - you can skip this step if you already have it) 4. Compile and install everything: export GRADLE_HOME=cache/gradle-0.8 (or whatever version you have downloaded) $GRADLE_HOME/bin/gradle (compiles) $GRADLE_HOME/bin/gradle install (installs) 4a. If you don't have an `ng' executable in the vimclojure directory, do a make 4b. If the directories were not copied into your .vim folder, you should cp -r autoload doc ftdetect ftplugin indent syntax ~/.vim/ 5. Put these lines in your ~/.vimrc: " Clojure filetype plugin indent on syntax on let vimclojure#NailgunClient = "/path/to/your/vimclojure/ng" let vimclojure#WantNailgun = 1 let vimclojure#HighlightBuiltins = 1 imap ClojureReplUpHistory imap ClojureReplDownHistory 6. Somewhere in a convenient place, create a vim-clojure script: #!/bin/bash if [ $# != 1 ] ; then echo "Usage: $0 source-root" exit 1 fi JAVA=java LIBS=/path/to/your/clojure.jar:/path/to/your/clojure-contrib.jar:/path/to/your/vimclojure/build/libs/vimclojure-2.2.0-SNAPSHOT.jar:$1 $JAVA -cp $LIBS com.martiansoftware.nailgun.NGServer 127.0.0.1 7. Test (a) Start "vim-clojure . &" (b) Start "vim some-source.clj" (d) Press ESC, \sr (a new REPL should appear) (e) Press ESC : helptags ~/.vim/doc (this step is only needed once) (f) Press ESC : help clojure (... and study the features) (g) After quitting, kill vim-clojure (e.g. by "fg" and then C-c)