Vileserv - Provides file-load server capability for Vile.
:perl use Vileserv :startserv :stopserv
Vileserv runs a server that listens for requests to load files into an already running instance of Vile. The vileget utility can be used to make such requests from a shell command line. Vileserv requires that Vile be compiled with the built-in PERL interpreter.
Vileserv will likely only work with Vile under Unix.
Vileserv does not provide nearly the level of feeping creaturism as Emacs' gnuserv, but it's a start.
[Note: Vileserv may already be automagically installed for you as part of your Vile or XVile installation.]
Install Vileserv.pm somewhere in the @INC path. Depending on your Vile installation, /usr/local/share/vile/perl might be a good place.
To start Vileserv when you start Vile, simply add the following to your .vilerc file:
; Import and start Vileserv (adds :startserv and :stopserv commands) perl "use Vileserv"
Several variables settings can be used to modify Vileserv's default behaviors. For best results, any of these variables that you choose to use should be set in your .vilerc file before Vileserv is imported and started.
Vileserv looks for a perl binary in /usr/bin/perl and /usr/local/bin/perl respectively. You can override this in your .vilerc file using the %vileserv-perl-path variable:
setv %vileserv-perl-path /opt/local/bin/perl
The default socket file used is $HOME/.vilesock. This can be overridden by setting the environment variable VILESOCK. You can also set it explicitly in your .vilerc file by using the variable %vileserv-socket-path. However, using the environment variable is recommended, since overriding it will stop the vileget program from starting a new Vile with a new socket path on demand.
The Vileserv protocol (if you can call it a protocol) allows arbitrary Vile commands to be executed. This functionality is disabled by default, but can enabled by adding the following to your .vilerc file:
setv %vileserv-accept-commands true
In order to support <B>vileget>'s -w option, Vileserv will use Vile's $write-hook variable. (Use perldoc vileget for details about the -w option.) Vileserv refrains from using the $write-hook variable if it is already being used, or Vileserv takes advantage of the CaptHook package if it is loaded. You can disabled this behavior entirely by adding the following to your .vilerc file before you load Vileserv:
If the Vileserv socket file already exists, Vileserv will attempt to determine if another Vileserv is active or not. If not, the old socket file is removed and the Vileserv startup proceeds normally. If another Vileserv seems to be active, the new Vileserv will slink away fairly quietly. If you prefer the old behavior in which Vileserv dies a horrible death and brings your entire Vile startup to a grinding halt, you can add the following to your .vilerc file:
setv %vileserv-doh! true
If the server is started, then stopped, then started again, you may see the warning "Attempt to free unreferenced scalar..." This is just a warning. The server startup probably succeeded.
Having a PERL interpreter in Vile is very slick. Kudos to everyone who made it happen. :-)
J. Chris Coppick, 1998 (last updated: Sept 29, 2001