A Vim Clojure Toolchain

For those of us who like Lisp, Emacs is naturally compelling. But I always gravitate back to Vim. Therefore, whenever I see a Clojure/Vim article I find it very interesting — how do people get that immediate REPL feel? How do you get parens balancing properly?!

Today I found My Clojure Toolchain: Vim by @venantius, and noticed the author also use Fireplace, which is the best Clojure REPL I know. The post goes into lots of detail about other Vim scripts that can help with Clojure development, from code traversal to linting.

Paredit.vim is another absolutely critical plugin to have for the Vim Clojure developer’s toolbox … Its true value lies in its support for what Emacs users refer to as “Slurpage” and “Barfage” — the ability to, with a keystroke or two, move existing arguments into or out of a given form.

He goes on to explain that Paredit actually places parenthesis based on Lisp syntax instead of a naive word matching approach.

The article’s concluding remarks mention why the author actually uses Vim:

One of the things I like about Vim is that it doesn’t attempt to constrain me. If I want a new feature, I can add it — in a pretty wide range of languages — and I can rely on the editor’s rich plugin ecosystem to provide painless ways to bind that functionality into the program.

He’s written some of his own plugins which are worth checking out:

  • vim-cljfmt — A Vim plugin for cljfmt, the Clojure formatting tool
  • vim-eastwood — A Vim plugin for Clojure’s Eastwood linter
Like what you read? Give Alex R. Young a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.