Saturday, May 4, 2013

Re: External callback

On 15:50 Sat 04 May , Gautier DI FOLCO wrote:
> Hi all,
>
> I their a way to launch "triggers" outside of ViM which can launch callback
> into ViM.
> Here my problem:
> I have a file that I am editing, I save my modifications (:w), outside of
> ViM I have guard (a ruby script which executes arbitrary program when files
> change) which executes my tests and generates a gcov file, then I want to
> automatically interpret this file via a function in ViM.
> I'm looking for a way to launch this function.
>
> For your help,
> Thanks by advance.
>
> --
> --
> You received this message from the "vim_use" 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
>
> ---
> You received this message because you are subscribed to the Google Groups "vim_use" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
Hi,

yes there is a way. You can use --remote-expr (see :h --remote-expr) or
--remote-send. Checkout also :help server-functions. The vim that you
use has to be run with --servername switch (actually this only matters
for the terminal vim). Not that you also need to send the vim
servername to your ruby script (:help v:servername).

Best regards,
Marcin

--
--
You received this message from the "vim_use" 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

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments: