[plt-scheme] vi mode and editor questions

From: Robby Findler (robby at cs.uchicago.edu)
Date: Sat Nov 22 16:36:33 EST 2008

On Sat, Nov 22, 2008 at 3:10 PM, Jon Rafkind <workmin at ccs.neu.edu> wrote:
> I have just put a vi-mode drscheme interface package on planet:
> http://planet.plt-scheme.org/display.ss?package=vi.plt&owner=kazzmir
>
> It doesn't do too much yet but it does have some basic commands. The only
> way to disable it is to uninstall it or hack the source, so be careful if
> you install it.
>
> I have a few questions about extending drscheme related to this:
> 1. I overrode the on-char and on-default-char methods of the editor. Is that
> too low level?

It is low-level, but for a vi mode, it might just be the right place.
Probably you only need one or the other, tho.

> 2. I would like to capture the control key for ctrl-d and whatnot but most
> ctrl-# key bindings do something in drscheme and when ctrl-# keys that
> aren't bound in drscheme don't seem to make their way to my editor.

You should be able to catch them in on-char, if not on-default-char.

> 3. How can I display stuff on the bottom border of drscheme? The same border
> that has the line:column information on it.

I think you want to look at frame:info-mixin and frame:info<%> in the framework.

> 4. How do I add a menu item? I want something like Vi -> Enable / Disable.

See menu% and frame% and menu-bar% etc.

But maybe that belongs in the edit menu? In that case, see frame:standard-menus.

Robby


Posted on the users mailing list.