Variable | Package: ide | ToC | DocOverview | CGDoc | RelNotes | FAQ | Index | PermutedIndex
| Allegro CL version 9.0 Unrevised from 8.2 to 9.0. 8.2 version

## *text-edit-comtab*

This variable holds the comtab (command table) that defines the editing keystrokes that are available in the IDE's source code editor.

An IDE user could enhance the editor by calling set-event-function on the value of `*text-edit-comtab*` to add additional commands. And since the override-menu-bars property of this comtab is true, any added comtab keychords that conflict with IDE menu-bar shortcuts will override the IDE menu-bar commands when the editor is selected.

When a different comtab for the editor is selected by calling (setf editor-mode) or by using the Options Dialog, the `*text-edit-comtab*` comtab will inherit from a different internal comtab containing built-in commands, but will still contain any commands that were added to it directly by calling set-event-function.

### Example

Here is an example that would define control-shift-M and control-shift-N in the IDE editor to scroll either down or up (respectively) by four lines and then position the text cursor at the beginning of a line of text in the middle of the editor pane. When the editor is selected, these new comtab bindings will override the shortcuts for the Form | Add Menu Bar command and the File | New Form command on the IDE menu-bar.

    (in-package :cg-user)

    (set-event-function
     *text-edit-comtab* '(control-key shift-key #\M)
     (lambda (editor-pane)
       (scroll-and-move editor-pane 4)))

    (set-event-function
     *text-edit-comtab* '(control-key shift-key #\N)
     (lambda (editor-pane)
       (scroll-and-move editor-pane -4)))

    (defun scroll-and-move (editor-pane increment)
      (set-first-visible-line editor-pane increment t)
      (set-selection
       editor-pane
       (char-from-line-number
        editor-pane
        (+ (first-visible-line editor-pane)
           (floor (interior-height editor-pane)
                  (* 2 (line-height editor-pane)))))))

Copyright (c) 1998-2019, Franz Inc. Oakland, CA., USA. All rights reserved.
This page was not revised from the 8.2 page.
Created 2012.5.30.

|  | ToC | DocOverview | CGDoc | RelNotes | FAQ | Index | PermutedIndex
| Allegro CL version 9.0 Unrevised from 8.2 to 9.0. 8.2 version