On Feb 7, 11:36 am, Sean DeNigris <[email protected]> wrote:
>
> I'm using clientserver to control vim remotely, and the only two entry-
> points are sending keys (I could send the command via simulated
> typing), or eval-ing an expression. I do not have a way to run exec.
>
> What I want to do is:
> eval("some string that executes a command")
>
> The only thing I've come up with is calling a function that calls exec
> e.g.
> eval("DoCommand('echo 5')")
>
> function DoCommand(cmd)
> exec a:cmd
> endfunction
>
Vim will execute the expression you send it with --remote-expr, there
is no need to use eval() on it. In your example, just do:
vim --remote-expr "DoCommand('echo 5')"
Or, by feeding keys:
vim --remote-send ":echo 5<CR>"
--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php