Stewart Johnson wrote:
Thanks Tony. I looked at that, but it doesn't support generic TCP
sockets, nor does it support HTTP writing. I need to be able send and
receive information with a remote service, and netrw only does half
the job.
Does the client-server stuff in vim use TCP sockets? Is that API
available to scripts?
Thanks,
Stewart
If you aren't on a server, HTTP is mostly for reading, typically to get
a Web page and displaying it in your browser. Netrw supports reading and
writing over various other protocols. I know HTTP has been abused for
other purposes, but IMHO other protocols are better suited to read-write
operations: myself for instance, I maintain my online Web site by ftp.
AFAIK, the only Vim scripts in the standard distribution which handle
network operations are the scripts which provide the netrw
functionality. You may look at how they're written:
:view $VIMRUNTIME/plugin/netrwPlugin.vim
:view $VIMRUNTIME/autoload/netrw.vim
and if that code inspires you to write Vim scripts for additional
network functionalities, you're free to do so. Or if you have concrete
suggestions about how to make these scripts even better than they
already are, Dr. Charles "Chip" Campbell, the maintainer, is the man you
should contact, either personally or via the vim-dev list.
You may also search the Vim repository of tips and scripts written by
users, including a more recent version of Dr. Chip's netrw plugin, at
http://vim.sourceforge.net/search.php
Best regards,
Tony.