On 7 February 2010 05:06, Sean DeNigris wrote:
> Is there an easy way to use mvim --remote... to execute commands in a
> running instance of MacVim?
>
> This is what I've figured out so far from experimenting/docs
> * I can use --remote-send to type in the command
> * I can call a function that executes commands
>
> What I want to do is call a ruby method.
>
> What I am doing now is to add a function to my .vimrc like:
> function DoCommand(cmd)
> exe a:cmd
> endfunction
>
> So the usage would be like:
>
> If I have a ruby method:
> def delete_line(num)
> cb = VIM::Buffer.current
> cb.delete(1)
> end
>
> I could call it from the command line with:
> mvim --remote-expr "DoCommand('ruby delete_line(1)')" --servername
> VIM
>
> This works, but I was wondering if there was a way to do it directly
> from the command line (in a running instance of MacVim).
>
> Thanks!
Hi (again) Sean,
Sorry for taking so long to reply to your posts. I think what you are
looking for is the "remote functions", see ":h remote.txt|/FUNCTIONS".
If that's not it, then I suggest you ask on the vim_use mailing list.
Björn
--
You received this message from the "vim_mac" maillist.
For more information, visit http://www.vim.org/maillist.php