vimclojure /

The default branch has multiple heads

Filename Size Date modified Message
client
gradle
lib
server
vim
77 B
Ignore doc tags file
912 B
Added tag v2.3.6 for changeset 8a4568c55a5e
1.1 KB
Bump copyright years
4.0 KB
Cleanup and clarify documentation
4.4 KB
Bump version to v2.3.7-SNAPSHOT
97 B
Add first stab at gradle plugin

VimClojure – a Clojure environment for Vim

VimClojure is one of the most sophisticated editing environments for Clojure. It provides syntax highlighting, indenting and command completion.

VimClojure is not intended to be an easy to use Clojure IDE, but a plugin to make life easier for people already familiar with Vim. So you should be familiar with Vim and/or Java. Eg. VimClojure won't help you in any way to set up a correct classpath! This is the responsibility of the build system of the given project. So before using the dynamic server make yourself comfortable with Clojure, the JVM and Vim.

Requirements

Please make sure that the following options are set in your .vimrc:

syntax on
filetype plugin indent on

Otherwise the filetype is not activated, and hence VimClojure doesn't work.

The following assumes a standard installation. If you have installed Vim (or are installing VimClojure) in a non-standard way, I trust that you know what you are doing.

Online Documentation

Please refer to the online documentation in the doc folder for further information on how to use VimClojure, its features and its caveats. To rebuild the help tags for the online documentation issue the following command in Vim instance.

" On Unix:
:helptags ~/.vim/doc
" On Windows:
:helptags ~/vimfiles/doc

Here be Dragons

If requested VimClojure also provides a SLIME like interface to dynamically work with Clojure code. For this to work the included Nailgun server must be running. Remote may be forwarded via ssh.

Features of the interactive interface are:

  • dynamic documentation lookup
  • dynamic javadoc lookup (in an external browser)
  • Repl running in a Vim buffer
  • smart omni completion
  • easy evaluation of code in a buffer

However: This is not a requirement! VimClojure works perfectly in offline mode. That is: just unpack the distribution zip in your .vim directory and you are good to go! In fact I discourage newbies to use the server until being more comfortable with Clojure and/or the JVM.

Configuration

To activate the interactive interface define the vimclojure#WantNailgun variable in your .vimrc: let vimclojure#WantNailgun = 1

Building the Nailgun interface

You have to download and install the client program once. Unless there is a note in the release notes it will be compatible with future releases. The client can be downloaded from: http://kotka.de/projects/vimclojure/vimclojure-nailgun-client-<version>.zip.

After unzipping the archive, simply type make in the subdirectory from the zip archive. This will compile the nailgun client. For Windows the client is already pre-compiled as ng.exe.

Configure the location of the nailgun client in your .vimrc:

let vimclojure#NailgunClient = "/path/to/your/ng"

It will default to just ng which should work if the client is on your PATH.

Note: You might need to check the Makefile for special lib requirements to compile the nailgun client, eg. on OpenSolaris.

It is not required to build the server side of the Nailgun interface and I strongly discourage to do so. The server is provided as jar file from Clojars. Just add the artifact to your development dependencies.

  • For Gradle (with Clojuresque):

    dependencies { development 'vimclojure:server:<version>' }

  • For Leiningen:

    (defproject … :dev-dependencies [… [vimclojure/server "<version>"] …])

  • For Ivy:

    <dependency org="vimclojure" name="server" rev="<version>"/>

  • For Maven:

    <dependency>
      <groupId>vimclojure</groupId>
      <artifactId>server</artifactId>
      <version><version></version>
    </dependency>
    

For manual download: http://clojars.org/repo/vimclojure/server/<version>/server-<version>.jar

There are also launcher scripts included in the vimclojure/bin subdirectory based on Stephen C. Gilardi's clj-env-dir launcher. See information on how to use them in the corresponding files.

-- Meikel Branmdeyer mb@kotka.de Erlensee, 2010

Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.