Charles E Campbell Jr wrote:
Bram Moolenaar wrote:
Suresh Govindachar wrote:
Is it possible to add an autocommand-event for "Clipboard Changed"?
Not really. This is not something that happens inside Vim. Polling for
changes in the system is not really something I would like to add to Vim.
Bram -- would you be willing to give out a bit of code that will send a
remote message to vim?
Some function, perhaps SendCmd2Vim("string"). That way it'll be simple
for folks to make their
own external programs to send a command to vim via the already available
remote vim stuff.
Presumably the code snippet wouldn't be a Part of Vim itself; maybe
something for vim.sf.net?
Just an idea...
Chip Campbell
:call remote_send({server}, {string}[, {idvar}])
:let x = remote_expr({server}, {string}[, {idvar}])
etc.
For other programs: there are two protocols used: Windows and X11. You may
want to dig into the Vim source to see how it does it. The server code (or the
X11 server code?) is in src/if_xcmdsrv.c. The client code may be in eval.c or
something -- look for Vim functions with names starting "remote_" (or C
functions with names starting "f_remote_"). In the source I have here
(7.0.114) there is an #ifdef FEAT_CLIENTSERVER at eval_c line 13051.
Best regards,
Tony.