fvl.vim : Send Lisp code to an interpreter running in a Vim window
| script karma
Downloaded by 1418
Comments, bugs, improvements
|Fred's Vim Lisp
This plugin allows you to run a Lisp interpreter in a Vim window and send Lisp expressions to it. You can send selected lines, a [count] number of lines, or a range of lines.
fvl.vim defines a handful of commands:
LispOpen opens the lisp window and starts the lisp interpreter
LispClose close the lisp window and terminate lisp. This happens automatically when the lisp buffer is closed.
LispRefresh try and read from lisp when your in a pinch.
LispDo like perldo. Evaluate a lisp expression. You MUST escape quotes.
LispCount evaluate [count] lines.
LispRange evaluate a range of lines.
In practice, all you need to remember is LispDo and possibly LispRange.
I've added the following mapping to my .vimrc file:
map <C-L> :LispRange
That map allows you to hit <C-L> to send a single line to the lisp interpreter, or select a few lines and send them all together.
NOTE: There is already another script that does similar things to fvl.vim, vimscript #221 (VIlisp.vim). What's the difference? Mostly, fvl.vim requires only one file (the plugin file) to work and is a bit easier to setup (imho).
vim (compiled with +perl and +windows)
perl Expect module (# cpan Expect)
gcl, clisp, or some other lisp interpreter
Edit the perl variables at the top of the script file to your liking. Important ones to look at are $LispInterp and $LispPrompt. $LispInterp is the name of the interpreter you'd like to use. $LispPrompt should contain a regurlar expression that matches the prompt that your interpreter issues ("^.*>" will probably work).
Copy the fvl.vim to your vim plugin directory
Add a mapping or two to LispRange and/or LispCount.
You should be all set.
fvl.vim will probably work with any program that runs on a read/evaluate loop if the $LispPrompt variable is set correctly.
Rating scripts is only available on the
script versions (upload new version)
Click on the package to download.
ip used for rating: 18.104.22.168