Slimv is a SWANK client for Vim, similarly to SLIME for Emacs. SWANK is a TCP server for Emacs, which runs a Common Lisp, Clojure or Scheme REPL and provides a socket interface for evaluating, compiling, debugging, profiling lisp code. The SWANK server is embedded in Slimv, but you can also use your own SWANK installation.

Slimv opens the lisp REPL (Read-Eval-Print Loop) inside a Vim buffer. Lisp commands may be entered and executed in the REPL buffer, just as in a regular REPL.

Slimv supports SLIME's debugger, inspector, profiler, cross reference, arglist, indentation, symbol name completion functions. The script also has a Common Lisp Hyperspec lookup feature and it is able to lookup symbols in the Clojure API, as well as in JavaDoc.

Slimv comes with Paredit Mode, which is similar to the functionality of paredit.el in Emacs. Paredit Mode tries to maintain the balanced state of matched characters (parenthesis marks, square and curly braces, double quotes). Matched characters are inserted and removed in pairs, also when working with a block of text (well, mostly). Slimv also implements many paredit.el s-expression handling functions, like Split/Join/Wrap/Splice/Raise. Slurpage and Barfage known from Emacs is also possible but in a different fashion: you don't move the list element in or out of the list, rather you move the opening or closing parenthesis over the element or sub-list.

Slimv works on Windows, Linux and Mac OS X (via Terminal.app), Cygwin is supported. The script requires the following programs installed on your system:
* Vim with Python feature enabled
* Python (must be the same Python version that was Vim compiled against)
* Lisp (any Common Lisp with SLIME support) or Clojure or MIT Scheme (Linux only)

Vim's Python version can be identified with the :ver command, look for the -DDYNAMIC_PYTHON_DLL=\"pythonXX\" string (if you have it). Another way of determining Vim's Python version:

:python import sys; print(sys.version)

Slimv tries to autodetect your Lisp/Clojure/Slime installation directories. If it fails to determine the correct directories, then you need to enter the command to start the SWANK server into your vimrc file.

Added support for the R language via swank-R (by Philipp Marek).
Test form for SlimvEvalTestExp() may wrap the selected s-expression.
Added Shift+Tab mapping for cycling backwards in the completion popup menu.
User defined REPL buffer name may contain some special characters.
Pass port number to the swank server in SWANK_PORT environent variable on Linux (by Glen Gibb and Federico Churca-Torrusio).
Autodetect wx86cl64.exe (Clozure CL) on 64 bit Windows.
Added applescript support for starting swank through iTerm (by Seth Price).
Add Racket support for delimiter '[]' and '{}' (by Jimmy Lu).
Bugfixes: If the user started a normal mode command prefixed with a count, then the count was cleared by the REPL refresh timer.
CursorHold trigger ignore mappings to prevent collisions with other plugins.
Preselect function name before starting swank server in the Disassemble command.
Do not append '>' at the prompt if it already ends with it.
Package name not found when 'noignorecase' was set.
Paredit ,< and ,> when 'whichwrap' contains 'h' and 'l'.
Keep multi-line SLDB abort messages commented all throughout (by Federico Churca-Torrusio).
Prevent call to frame-call on AllegroCL (by Robert Kerr).
Tag lookup (Ctrl+]) added garbage to symbol name.
Parsing arrays (and other prefixed forms) returned from the swank server.
Prevent accidental multiple registration of slimv autocommands.
Disable autocommands for the REPL update, make sure 'updatetime' is not too low.

Added autodetection for 'ccl'. Delete empty lines when re-gathering Electric Returns. Inspector: put multiple items in one line (like in Slime), highlight selectable parts and actions, hide item id-s, display "path" of inspected object. Don't extend s-expression with prefix when macroexpanding. Don't evaluate or compile the REPL buffer. Added device to the path when loading pretty printer patches for SBCL (thanks to Andrew Lyon). Added option g:slimv_repl_simple_eval and Electric Return for REPL buffer. Print arglist when pressing Space after closing parens or double quotes, also when pressing Enter. Added "Clear REPL" entry to the REPL menu (mapped to <Leader>-). Paredit: special handling of cw, cb, ciw, caw supporting repeat ('.'). Do not describe empty symbol. Prefer selecting symbol to the left when cursor is on whitespace. Added "." character to iskeyword for Lisp. Removed "." when selecting symbol for completion for Clojure. Increased fuzzy completion limit. Bugfixes: Find package/namespace when current form is in a fold. PareditToggle ckecks if buffer was registered for Paredit. Electric Return re-gathering at end of line with no virtualedit. Extra character at the end of selection using 'v('. Garbage upon pressing ')' or Enter in completion popup. Paredit 'x' at end of line when 'whichwrap' includes h,l. Arglist sometimes not displayed. Paredit Wrap when line ends in a multibyte character (thanks to Sung Pae).

Keep cursor position on expanding [--more--] in the Inspector. Added [--all---] to Inspector for fetching all parts. Don't explicitly check for pythonXX.dll, rely on has('python'). Require 'swank-repl' for slime version above 2011-12-04 in case contribs are disabled. Identify VimClojure REPL prompt position for paredit (thanks to David Greenberg). Paredit: added <leader><Up> for Splice-killing-backward, <leader><Down> for Splice-killing-forward, <leader>I for Raise. Paredit: added 'Electric Return' feature and new option g:paredit_electric_return. Increased the distance to search for the defun start to 200 lines. Bugfixes: Positioning the cursor at the end of REPL prompt in insert mode. Handle restart/frame number above 999 (thanks to Philipp Marek). Form selection when cursor is next to the opening paren. Indentation of multi-line strings. Indentation of lines with multi-byte characters. Cursor movement while indenting.

Use correct SLDB level when invoking restart. Autodetect tmux session on Linux (thanks to Brett Kosinski). Enable syntax only once to avoid reload of syntax plugins. Added option g:slimv_browser_cmd_suffix. Skip syntax and indent file for disabled filetypes. Check the presence of X on Linux. Indentation fixes: keywords, gap after '(', defsystem, defmacro, symbol-macrolet. Use winsaveview()/winrestview() for remembering current view when moving around (e.g. searching for package). Find package for arglist and completion. Ignore mapleader when it's <Space>. Print SLDB error description also into the REPL buffer. Evaluate keyword if using Eval-Defun outside of s-expression. Disable unsupported swank features for Scheme. Bugfixes: Paredit 'cw' at the end of line. Omit REPL prompt from Eval-Defun and Eval-Expression. Printing of '\n' and other escaped characters. Paredit delete and put corrupted the "0 register.

Added highlighting of square and curly brackets for Clojure. Added options to disable Slimv for specific filetypes: g:slimv_disable_clojure, g:slimv_disable_lisp, g:slimv_disable_scheme. Added option g:slimv_indent_keylists (thanks to Andrew Smirnoff). Added "set hidden" for safe switching of modified buffers. Added Help to Inspect and Threads buffers. Evaluate register contents if Eval-Region prefixed by ["x]. Store form in register if Eval-Defun or Eval-Exp prefixed by ["x]. Increased timeout for :create-repl. Stay in REPL buffer if Macroexpand performed in REPL. Search for either (in-ns) or (ns) for Clojure, remove quote character from namespace name. Added SlimvEvalTestDefun() and SlimvEvalTestExp() for immediate testing of the form(s) being evaluated. Bugfixes: Various indentation issues (function name is a subform, let, let*, do, defpackage, defsystem, and [] for Clojure). Eval-Range problem in visual mode. SLDB parsing problem with newlines in description of restarts. REPL autoscroll incidentally stopping (thanks to Andrew Lyon). Added some index out of range checks (thanks to Philipp Marek).

Start Swank server in virtual terminal when running in GNU screen on Linux (thanks to Oleg Terenchuk). Reuse a window for slimv also when there are three or more windows open. Don't go to end of REPL buffer if user moved the cursor away from EOF. Use xdg-open for default browser in Linux. Removed option g:slimv_python. Added option g:slimv_repl_max_len for limiting the number of lines in the REPL buffer. Added option g:slimv_preferred to choose preferred lisp implementation. Query additional parts of big inspected object upon pressing Enter on [--more--]. Thread List is displayed and handled in a separate Threads buffer. Bugfixes: Window navigation problems between source/REPL/SLDB/etc. Error messages when Swank server window is closed. Return control to vim after starting browser defined by g:slimv_browser_cmd. Fixed indentation of arguments before &body argument. Autocomplete for dotted package/namespace names. Indentation of aif.

Improved frame number identification in SLDB buffer. Moved frame source location above frame locals in SLDB. Fold frame source location if more than 2 lines. Inspect-In-Frame: preselect symbol under cursor only in variable lines, open Inspector in the other window. Improved XRef file location parsing. Use current paragraph when no range set for Eval-Region and Compile-Region. Added option g:slimv_sldb_wrap, do not set wrap for source buffers. Added Set-Breakpoint command mapped to <leader>B (thanks to Philipp Marek), changed Profile-By-Substring mapping to <leader>P. Set Lisp keyword characters also in SLDB buffer. Bugfixes: Error messages at Connect-Server. Error message for frame source location without filename. XRef output sometimes cut.

Added top/bottom/left/right directions to g:slimv_repl_split, added :Lisp (and an equivalent :Eval) command with completion, added g:slimv_leader and g:paredit_leader options, added g:slimv_echolines to echo only the first few lines of the form being evaluated, added fuzzy completion and option g:slimv_simple_compl (by Philipp Marek), indent macros with &body argument by two spaces when connected to swank (thanks to Philipp Marek and Andreas Fredriksson), special indentation for flet, labels and macrolet, default for Set-Package is current package (thanks to Philipp Marek), bugfixes: REPL output ordering problems, problem with inserting Space into visual block, blinking when g:slimv_repl_syntax is on, entering incomplete form in REPL command line, close form when inside comment, string, or with mixed ([.

Added action handling to Inspector, fixed Inspector output, bugfixes: read-string mode was stuck, buffer corruption with two source windows (thanks to Philipp Marek), eliminate multiple CursorHold autocommands (thanks to Philipp Marek), completion with special characters in symbol name (thanks to Philipp Marek), sometimes cursor went to the start of line in insert mode, syntax error in Untrace All (thanks to Philipp Marek), removed ' prefix from symbol selection (except for Inspect), keep cursor position in Describe and Compile-Region.

Added Cygwin compatibility using the Windows Python (thanks to Jerome Baum), display client error message when eval was not successful, form is passed to client via stdin instead of temp file, bugfixes: automatic reconnection when server closed and reopened, delete and yank also via named registers in paredit.vim, handle double quotes in Compile-Defun and Compile-Region.

Added autodetection for /usr/local/bin/clojure on Linux, added special characters to Lisp keyword selection (iskeyword), run Vim's original ftplugin/lisp.vim for Clojure filetype, bugfixes: PareditWrap error when g:paredit_shortmaps=1 (thanks to Jon Thacker), buffer selection problems in case of three of more buffers (thanks to Philipp Marek), conflicting keybindings for SlimvGenerateTags, unmap error messages when g:paredit_mode=0.