This post will be extremely valuable to about 3 people in the world.
I finally found a simple solution for programming with a Scheme REPL in Vim. However, this is useful for REPLs, LISPs, and any “UNIX-interactive” program.
- install exec_with_piped somewhere. (For further reading see mod_pipe)
- in a terminal, run this:
./exec_with_piped /path/to/YOURPIPE "YOURREPL"
i.e. ./exec_with_piped ~/.SCMPIPE "gsc -:d-"
(note that your REPL needs to expect STDIN/STDOUT rather than interact with the console via it’s own readline, gambit’s -:d- sets this.) - put/map this macro in your .vimrc:
nmap F)mT%mt%l:'t,'Tw! /path/to/YOURPIPE
Now, fire up some scheme, and place the cursor after the closing parenthesis of the SEXP you wish to send. Hit F2 and start scheming.
Post a Comment