All Manuals > LispWorks User Guide and Reference Manual > 13 Customization of LispWorks

NextPrevUpTopContentsIndex

13.6 Customizing the editor

This section explains some of the customizations you can make to the Editor tool in the LispWorks IDE.

13.6.1 Controlling appearance of found definitions

The commands Find Source, Find Source for Dspec and Find Tag retrieve the file containing a definition and place it in a buffer with the relevant definition visible. By default, the start of the definition is in the middle of the Editor window and is highlighted.

The variable editor:*source-found-action* controls the position and highlighting of the found definition. The value should be a list of length 2.

The first element controls the positioning of the definition, as follows:

t

Show it at the top of the editor window.

A non-negative fixnum

Position it that many lines from the top.

nil

Position it at the center of the window.

The second element can be :highlight, meaning highlight the definition, or nil, meaning don't.

For example, to configure the editor so that found definitions are positioned at the top of the window and are not highlighted, do

(setq editor:*source-found-action* '(t nil))

This variable is set in the file a-dot-lispworks.lisp.

13.6.2 Specifying the number of editor windows

You can specify the maximum number of editor windows that are present at any one time. For example, to set the maximum to 1:

(setq editor:*maximum-ordinary-windows* 1)

This variable is set in the file a-dot-lispworks.lisp.

13.6.3 Binding commands to keystrokes

You can bind existing editor commands to different keystrokes, using editor:bind-key.

The LispWorks file config/key-binds.lisp is supplied. It shows the standard Emacs key bindings for LispWorks.

The following example shows how to rebind ? so that it behaves as an ordinary character in the echo area of tools in the LispWorks IDE -- this can be useful if your symbol names include question marks.

(editor:bind-key "Self Insert" #\? :mode "Echo Area")

Since ? is then no longer available for help, you may wish to rebind help to Ctrl+?.

(editor:bind-key "Help on Parse" "Control-?" :mode "Echo Area")

If you use another editor emulation, then see the LispWorks file config/msw-key-binds.lisp or config/mac-key-binds.lisp for the corresponding editor:bind-key. forms.


LispWorks User Guide and Reference Manual - 13 Feb 2015

NextPrevUpTopContentsIndex