Vim linked with Embeddable Common Lisp (ECL)
Jim Bailey, Eirik Nygaard, Brad Beveridge, and Larry Clapp have linked Vim (first 6.4, then 7.0) with Embeddable Common Lisp. The Slim-Vim (nee Slimpl) project
uses this as their platform to port SLIME to Vim. Jim also
added asynchronous event support to Vim, which Slim-Vim also needs.
As a sub-goal of the Slim-Vim project, we want to expand the Lisp support for Vim.
Where to get it
Darcs repositories for
Vim+ECL and other Slim-Vim-related projects.
Where to talk about it
The Slim-Vim mailing
list includes discussion of Vim+ECL.
Todo list for Vim+ECL, separate from Slim-Vim
General
- Make buffer objects CLOS objects. Currently they're "foreign objects".
- Save a pointer to the CLOS object in the Vim buffer struct.
- Document the interface, both for the user and the developer.
- Optional / requires discussion: build a stream on top of a Lisp buffer,
so you can
(format *buffer* "...") and use other stream-related
functions, like FILE-POSITION to get/set the cursor position.
Lisp<->Vim FFI -- calling Vim operators and functions from Lisp
- Add Lisp functions to call all the Vim-script functions. See the
def-vim-function macro.
- Add Lisp functions to call / duplicate all the Vim operators (normal mode
commands, command-line commands, etc).
- Optional / requires discussion: Expand the FFI to use the CLOS buffer
objects mentioned above
- Currently the FFI builds a string and then hands it to Vim to run via a
mechanism similar to
:exec "some code"
Upgrade it to call the internal C functions directly. This will speed things
up, possibly by a lot, and make the FFI compiled code "all the way down".