The home of Mikael Jansson, hacker, hobby chef & adrenaline junkie based in Sweden. More…

Mikael Jansson.be » Hacking

Milestone 1.0

ecl

1 / 2

lisp mode

0 / 2

pipe

0 / 1

Add support for SWANK and implement the client-side in Vim.

Some of the possible options for communication in the list below, with more details given at http://www.freehackers.org/VimIntegration:

  • external library, through :libcall and polling.
  • emulate |clientserver| (blocking server, asynch. client) in SWANK server-side

vim/src/if_xcmdsrv.c:

   int serverRegisterName (Display *dpy, char_u *name);
   void serverChangeRegisteredWindow (Display *dpy, Window newwin);
   int serverSendToVim (Display *dpy, char_u *name, char_u *cmd, char_u **result, Window *server, int asExpr, int localLoop, int silent);
   char_u *serverGetVimNames (Display *dpy);
   Window serverStrToWin (char_u *str);
   int serverSendReply (char_u *name, char_u *str);
   int serverReadReply (Display *dpy, Window win, char_u **str, int localLoop);
   int serverPeekReply (Display *dpy, Window win, char_u **str);
   void serverEventProc (Display *dpy, XEvent *eventPtr);

From vim_dev: <http://groups.google.com/group/vim_dev/msg/b102aa6724494a76>

Can you explain me the place in the vim code where the main loop is implemented? Should I look at some of the above projects or other ones?

There are two ways. Netbeans hooks itself into the GUI input. See src/netbeans.c. The other way is adding something to the select() call. This is in RealWaitForChar() in os_unix.c. Search for FEAT_MOUSE_GPM to see an example.

Note: See TracRoadmap for help on using the roadmap.
'