[plt-scheme] editor: managing comments

From: Anthony Cowley (acowley at seas.upenn.edu)
Date: Fri Sep 25 10:33:12 EDT 2009

On Sun, Sep 20, 2009 at 5:30 AM, Jens Axel Søgaard
<jensaxel at soegaard.net> wrote:
> Hi Eric,
>> I have a couple of suggestions for enhancing the managing of comments in the
>> DrScheme editor.
>> I maybe missing the way to do this already, in that case please tell me!
>> a) keyboard shortcut for
>> . comment with box
>> . comment with semi-column
>> . uncomment
> Anyone?

Here is what I use for the last two commands. I don't have a shortcut
for comment with box.

#lang s-exp framework/keybinding-lang

(define (send-keymap f)
  (λ(editor event) (send (send editor get-keymap)
                         call-function f editor event #t)))

(keybinding "d:semicolon"
            (send-keymap "comment-out"))

(keybinding "c:d:semicolon"
            (send-keymap "uncomment"))


Posted on the users mailing list.