On 2006-01-16, Brad Beveridge <[EMAIL PROTECTED]> wrote:
> I asked about async interrupt on the vim-dev list & got the
> following response "Hi Brad
>
> You could use Vim's netbeans interface
> :help netbeans

I read the netbeans helpfile, but didn't see what I wanted.  (Which is
not to say that I didn't see anything useful.  :)  I mean: I didn't
see any way to interrupt Vim and make it call a function to read the
Swank socket to process asynchronous events.)  But perhaps you'll see
something I didn't see.

Or perhaps we'll just have to bite the bullet and make all of Vim's
communication with Swank synchronous, or make the user press jkjkjk
while they wait for an asynchronous event to complete[1].  I wouldn't
like that, but I'd like it more than not having any communication with
Swank at all.  :)

Thanks for your work on that!

-- Larry


[1]  What I mean here is that we'd map j and k kind of like this:

  function! ProcessSwankEvents( key )
    perl process_swank_events();
    exec "normal" old_{a:key}
  endfunction

  nmap j :call ProcessSwankEvents( 'j' )<cr>
  nmap k :call ProcessSwankEvents( 'k' )<cr>

So pressing j or k would process events from swank and then move the
cursor down or up, as appropriate.

(In real life we'd do the remapping in a function, and do it for all
alphanumeric characters in insert mode, and (at least) all cursor
movement characters in normal mode, and we'd also check if j had been
mapped to something else already (:help maparg), and run that instead
of running just j.)


_______________________________________________
Gardeners mailing list
[email protected]
http://www.lispniks.com/mailman/listinfo/gardeners

Reply via email to