LambdaMOO utility code
Local Editing

Description

Put simply, this lets you use any editor you like instead of the generic editor. It adds a verb, ledit, to the editor, that uses a client feature to shell out to pico or something.

This needs the OOB Command Handler to manage the client features bit.

The local editing command protocol

When the server wants to local edit a file, it outputs a line starting:

#$# -- Local edit of ...

The client then starts logging, starting at that line. The server outputs the editor's buffer and finishes with:

#$# ledit end

which prompts the client to stop logging, and then waits. The client executes the editor. Which one is entirely up to it, and the user. Once the user has finished, the client dumps the file back to the server, finishing up with:

.

as per @program. The server replaces the editor's buffer contents with this.

Please note that the #$# lines being output to the client aren't OOB commands! These are output to the client, not the server.

Installation

You need the server-side code, and the client code. The server-side code can be found here, and is just a script to add the $generic_editor:ledit verb.

The client-side code varies according to the client, of course. If you use TinyFugue, you can use the ledit.tf file. This has all the various triggers in it. Install it into your TinyFugue library and put:

/load ledit.tf

in your .tfrc. When you log in, it should automatically inform the server of its presence.

If anybody has an equivalent for any other client, I'd love to know!


| Home || Up ||| Mail me || St.Andrews |