Since this thread made the Ruby Weekly News wrap-up, I feel obliged to
follow-up… :^)
Can you talk to an open pair of pipes from Vim? I didn’t think you
could keep a live connection to another process in Vim in this way,
hence my convoluted socket-based architecture.No, named pipes (a/k/a fifo). To run a debugger command (perhaps
step):
Ahh, those named pipes. ;^) So I did a little more digging, plugging
a few holes in my own knowledge of nitty-gritty I/O in the process. Best
I can see, named pipes would limit the solution to Unix-esque platforms.
‘mkfifo’ under my Cygwin installation returns a “Function not implemented”
error – I take this to mean that it’s simply not supported in Windows.
The catch is that you can’t do “normal” file operations in VimL. You
can read a whole file, of course, and you can write or read to pipes
or files.
I did find a Gvim gdb interface on vim.sourceforge.net; it builds the
fifo rd/wr operations into a C lib which is called from Vim. Again,
I would like to keep the solution entirely in Ruby/VimL source. See
http://vim.sourceforge.net/scripts/script.php?script_id=168.
- jeff