The Shœstring Foundation Weblog
   


About
The Shœstring Foundation Weblog, Miscellaneous Byproducts

Matthias Bauer
bauerm (at) shoestringfoundation · org
reop pubkey


Subscribe to a syndicated feed of my weblog, brought to you by the wonders of RSS.


Blosxom Logo

       
Fri, 03 May 2013

Endoscreen Cut&Paster


emacs has the fabulous SLIME mode which turns emacs into a LISPmachine, with interactive inspection and whatnot. It talks over TCP to a LISP REPL wrapped in SWANK, executing a huge palette of commands to debug and trace code, as well as the more-or-less trivial evaluation of code snippet from emacs buffers.

As a very weak approximation in vim there's jpalardy's vim-slime which uses screen to paste stuff from vim into a screen window presumably running a REPL. The implementation is totally vim specific.

If the action is just to paste stuff into another window using screen's own -X option then it should be doable with a shellscript. So here are swan and slim.

swan
starts the Chicken Scheme REPL and injects the window's identifier into screen's environment.
slim
pastes its stdin into the REPL window.
Combined with good-old vi's map keybinding command this is just as powerful as vim-slime but more flexible.

My .exrc now contains the line

:map C !%slim^M
which pastes text between matching parens into the REPL.

Update

slim now uses screen's register s so that the copy/paste register remains untouched.

[/projects] permanent link

Tatooing the laptop


The friendly folks at the fablab helped me to get Puffy on the Thinkpad.

[/projects] permanent link