[slimpl] vim asynchronous interrupt facility

Christoph Scheurer slimpl at thch.info
Thu Jan 26 07:14:25 CST 2006


Hello,

I just joined the list since I saw your posting on the vim mailing list and
looked at http://wiki.alu.org/Perl_interface_to_SLIME . I am not sure whether
this is exactly what you are looking for but I have been using a modified
version of vim 5.4g that seems to do what you want.

First of all, I am not the author of these modifications to vim and I do not
maintain them, but I was hoping for some time that somebody would pick up
these ideas to include them into mainstream vim or at least an actively
maintained patch set.

You can download the source code from:
    http://www.timof.qipc.org/ml2vim.html

It was written as a frontend interface to Mathematica (R) using MathLink (R)
and an interface program called ml2vim which runs the mathematica kernel and
communicates with the vim frontend solely by exchanging text messages. The
patches to vim contain a "child" facility which allows vim to run child
processes that can asynchronously insert text into the vim buffer. These
concepts are outlined in some README and vim help files inlcuded in the source
distribution. Here the introductory paragraph:


    1. Basic ideas                                                  *childs*


        ------------                                ------------
        |            |                    stdin  0  |            |
        |            | ---------------------------> |            |
        |            |                              |    child   |
        |   Vim      |                    stdout 1  |   process  |
        |            | <--------------------------- |            |
        |            |                              |            |
        |            |                    stderr 2  |            |
        |            | <--------------------------- |            |
        |            |                              |            |
        |            |                    async  3  |            |
        |            | <--------------------------- |            |
        ------------                                ------------

    Child processes can be forked and will be connected to Vim by 4 pipes.

    The child's stderr is permanently listened on and all incoming messages
    will be displayed (this does not yet work very well at this time: the
    messages are not always positioned correctly, and you will not always
    have time to read them before the screen gets and the message vanishes).

    There is another special channel which will be listened on once you
    specify a handler for the incoming data (see |read_async| below).

    Note that pending keyboard input will always take priority over input
    from child processes, and input from child processes will only be read
    in Vim's command mode with no Visual active. This is to keep the editor
    operational and minimize interference with user actions; also, you can
    interrupt reading from child processes immediately by entering Vim's
    command line.



I think a facility like this and the "slimpl" you are working on would be great
also for other frontend purposes. I could think of Maple (R) with OpenMaple (R)
binding or maxima, just to name other Computer Algebra Systems where vim would
make a much better "worksheet"-frontend.

Regards,

Christoph

-- 
Christoph Scheurer                                  GnuPG key Id: 0x6128C6B6


More information about the slimpl mailing list