quick intro to vim-slime

posted on: July 10, 2013

Recently some co-workers have been talking about using SLIME with node.js, SLIME is an Emacs mode for Common Lisp development, me being the Vim guy went out looking for a Vim version. What I found was vim-slime by Jonathan Palardy which was originally introduced here. Vim-slime relies on the GNU screen command for the heavy lifting, I'm not too familiar with screen and stumbled through the first time, to save others the trouble I'm posting my simple usage here.

Install screen (I use a Debian based Linux distro)

sudo apt-get install screen

Install vim-slime (I use the pathogen, so this is easy)

git clone git://github.com/jpalardy/vim-slime.git ~/.vim/bundle/vim-slime

Now to use vim-slime start a screen session called slime

$ screen -S slime

split the window


make a new window withing screen


switch to the bottom screen

CTRL-a tab

switch the bottom screen to the new window


now we have a new shell, start whatever REPL you want (python, irb, use bash, etc)

$ python

in screen switch back to the top screen

CTRL-a tab

start your editor

$ vim

in vim write some code for the REPL and select. to send to REPL use


the first time you will be prompted for a screen session name and window name (since we did not name the window use 0)



now use CTRL-c CTRL-c to evaluate any selected text CTRL-c v can be used to reset the session name and window used by vim-slime.

tags: python | vi