Evaluating Lisp Development in Vim: Slimv vs. Vlime
#Dev

Evaluating Lisp Development in Vim: Slimv vs. Vlime

AI & ML Reporter
4 min read

A practical look at the two Vim plugins that bring interactive Lisp programming to the editor, covering installation, core features, and the trade‑offs that still make the experience feel like a workaround compared with Emacs/SLIME.

What the plugins promise

Both Slimv ("Superior Lisp Interaction Mode for Vim") and Vlime claim to give Vim users the same REPL‑driven workflow that Emacs users enjoy with SLIME. The advertised benefits are:

  • On‑the‑fly evaluation of s‑expressions and top‑level forms.
  • Integrated debugger and inspector.
  • Structured editing via Paredit, rainbow parentheses, and argument‑list hints.
  • Support for multiple Common Lisp implementations and, for Slimv, Scheme and Clojure as well.

What is actually new

Installation path differences

  • Slimv ships with a small, patched copy of the Swank server, so the only external requirement is a Lisp implementation that can load start‑swank.lisp. The plugin follows Vim‑8's native pack layout, making a simple git clone … ~/.vim/pack/plugins/start/slimv sufficient.
  • Vlime does not bundle Swank. It expects Quicklisp to fetch the server on first use, and the plugin’s source lives in a sub‑directory (vim/) that does not match the native package layout. Consequently the installer must add that sub‑directory to runtimepath manually.

Both plugins need a recent Vim (8+) but Slimv also requires a Vim compiled with Python 3 support, while Vlime works with the plain vim.basic package.

Core workflow

Feature Slimv Vlime
REPL Interactive split; you can type directly and hit <Enter> to evaluate. Split window is nomodifiable; you must send code via mappings (\ss, \i for interaction mode).
Paredit Bundled; electric return works and the ,> / ,< slurp/barf commands are available. Separate installation required; electric return is not hooked into the argument‑list display, so you lose that convenience.
Rainbow parentheses Enabled by setting let g:lisp_rainbow=1. Not built‑in; you need an external plugin such as rainbow_parentheses.vim.
Debugger / Inspector Uses SLDB; ,i inspects a variable, ,a aborts. Same backend but commands are \d for frame detail and i inside the inspector.
Tracing Simple toggle ,t; results appear in the REPL buffer. Requires loading the SWANK-TRACE-DIALOG contrib and using \TD/\TT; results are shown in a dedicated split.
Cross‑reference (xref) Prints callers in the REPL ( ,xl). Opens an xref buffer where <Enter> jumps to the definition.
Supported Lisp dialects Common Lisp, MIT/GNU Scheme, Clojure. Common Lisp only.

Practical steps that work today

  1. Slimv + SBCLsudo apt-get install vim-nox sbcl tmux git then git clone https://github.com/kovisoft/slimv.git ~/.vim/pack/plugins/start/slimv. Open a .lisp file, press ,c to start Swank, and evaluate with ,e (expression) or ,d (top‑level).
  2. Vlime + SBCL – Install Quicklisp first, then git clone https://github.com/l04m33/vlime.git ~/.vim/bundle/vlime and add set runtimepath^=~/.vim/bundle/vlime/vim to ~/.vimrc. Open a file and hit \rr to launch the server; use \ss to evaluate.
  3. Other implementations – For CLISP/ECL you must tell the plugin how to start Swank. Slimv detects the interpreter automatically; Vlime needs a small Vimscript function (see the original article) that builds the command line.
  4. Scheme / Clojure – Only Slimv supports them. With Scheme you run scheme --load …/swank-mit-scheme.scm; with Clojure you need a JAR on the path and start Swank via java -cp … clojure.main ….

Limitations that remain

  • REPL interactivity – Vlime’s read‑only REPL window forces a round‑trip through the mapping layer for every expression, which feels clunky compared with the true interactive buffer that Slimv provides.
  • Automatic Swank launch – Slimv can only auto‑start Swank when Vim is inside tmux, GNU Screen, or a graphical session. Outside those environments you must launch Swank manually, a step that is easy to forget.
  • Dependency churn – Vlime’s reliance on Quicklisp means a fresh install pulls a large set of Lisp libraries; any change in Quicklisp’s bootstrap process can break the initial start‑up.
  • Plugin‑manager friction – Vlime’s non‑standard layout prevents the use of most package managers without extra runtimepath fiddling. Slimv works out‑of‑the‑box with vim‑plug, packer, etc.
  • Feature dispersion – Many niceties (rainbow parentheses, argument‑list pop‑ups, xref jumps) are split across different windows in Vlime, requiring extra Ctrl‑w w navigation. Slimv keeps most output in the REPL buffer, which some users find less intrusive.
  • Dialect coverage – If you need Scheme or Clojure, Vlime is off the table. Slimv’s Scheme support is Linux‑only and expects version 9.x; attempts on macOS hit missing system headers.

Bottom line for a practitioner

If you want a Vim‑centric Lisp workflow that feels closest to Emacs/SLIME, Slimv is the safer bet: it bundles Swank, ships Paredit, gives you an interactive REPL, and works with three major dialects. The price is the need for a Python‑enabled Vim and a tmux/Screen session for fully automatic server start‑up.

If you are already comfortable with Quicklisp, prefer a lighter Vim binary, and are happy to live with a read‑only REPL window, Vlime can be a viable alternative, especially for pure Common Lisp projects where the extra split windows are acceptable.


References

Comments

Loading comments...