Loading ...
Sorry, an error occurred while loading the content.

Aw: Re: Re: Extracting client/server functionality from MacVim

Expand Messages
  • Meikel Brandmeyer
    Hi, ... I m sorry for my poor explanation. So another try on clarification: It is exactly about the remote* calls build into Vim. However the remote calls work
    Message 1 of 7 , May 24, 2011
    • 0 Attachment
      Hi,

      Am Dienstag, 24. Mai 2011 12:32:34 UTC+2 schrieb björn:

      Uhm.  So vim-remote has nothing to do with the remote* calls that are
      built into Vim?  That is extremely confusing.

      I'm sorry for my poor explanation. So another try on clarification: It is exactly about the remote* calls build into Vim. However the remote calls work only with Vim on both ends of the communication. So I can send expressions back and forth between two Vims with the remote_expr call for example. But I want one side to be a non-Vim application, so that I don't have to shell out to external programs. I think Matsumoto-san's answer is exactly on the spot.

      What *currently* works:

      Vim = (shell out to client program) => Clojure server => (response read by client) = Vim

      This has the problem that a) it is quite heavy (fork process), and hence may be slow (at least on Windows it's noticeable) and b) Vim is blocked until the client/server communication is done synchronuously.

      What *currently could* work:

      Vim = (shell out to client program) => Clojure server = shell out: vim --remote-expr => Vim

      This would remove the blocking, but still requires shell-out. Now even on both sides (with different client programs, one custom and one vim).

      What *does not work at the moment, but basically could* is:

      Vim = remote_expr() => Clojure server = remote_expr() => Vim

      This is currently not possible, but is the only way how to communicate without shell-out with other processes. (Note, that I don't want to use Perl or Python bindings)

      Since I can't setup a socket in Vim for network communication, I'd like to hijack Vim's remote* client/server protocol. But this does currently only work with two vims.

      Vim1 = remote_expr() => Vim2 = remote_expr() => Vim1

      But Vim2 != Clojure server. :] And here the vim-remote library comes in: it allows to exchange Vim2 with eg. a clojure or python process. However it doesn't support MacVim, yet.

      The relevant code is inside gui_macvim.m and MMBackend.m. Try taking a look at that and see if you can mimic it.

      I think that is the best help I can provide.  Good luck!

      That is ok. If everything I need is in gui_macvim.m and MMBackend.m, then that's already a good information. If I have a starting point, I can reverse engineer myself through the code. It is important, that I don't have to patch Vim for this to work.

      Thank you.

      Sincerely
      Meikel
       

      --
      You received this message from the "vim_mac" maillist.
      Do not top-post! Type your reply below the text you are replying to.
      For more information, visit http://www.vim.org/maillist.php
    Your message has been successfully submitted and would be delivered to recipients shortly.