Wing IDE Reference Manual
   
Wing IDE Reference Manual

Version 1.1b7-2


next up previous contents
Next: 3. Project Manager Up: Wing IDE Reference Manual Previous: 1. Introduction


Subsections


2. Customization

This chapter describes how you can customize Wing IDE according to your needs.


   Wing may be customized in the following ways:
  • Through the preferences files
  • Keyboard shortcuts can be defined for any Wing command
  • The editor can run with different personalities, including a generic editor personality and an emacs-like mode
  • The menubar and toolbar can be altered



2.1 Preferences

Wing has a set of preferences that control the basic layout of the user interface and affect features of the editor, debugger, source browser, and project manager. Although Wing will prompt you to select a few options the first time you run the IDE, it is likely that you will want to refine your preferences settings subsequently.

Default values for all preferences are set in the file WINGHOME/preferences. Individual users can override these by placing a preferences file in the .wingide subdirectory of their home directory (on Linux) or WINGHOME\profiles\[username] (on Windows), which are created the first time Wing is run. The values given in the user-specific preferences file take precedence over any values in the default WINGHOME/preferences file.

It is also possible to specify additional preferences files on the command line though the --prefs-file option. For example:

wing -prefs-file /path/to/myprefs
       

The individual preferences are documented in this chapter and the chapters that follow for each IDE subsystem.


   Note that setting a preference currently requires quitting and restarting Wing before the preference takes effect.


2.1.1 Preferences File Format

The preferences file format consists of a sequence of lines, each of which is a name=value pair.

The name is in domain.preference form, where domain is the IDE subsystem affected and preference is the name of the specific preference (for example, edit.personality defines the source editor's runtime personality).

Preference values can be any Python expression that will evaluate to a number, string, tuple, list, or dictionary. Additionally, the constants true and false are defined and bound to 1 and 0, respectively. Long lines may be continued by placing a backslash (\\) at the end of a line and comments may be placed anywhere on a line by starting them with #.

For security's sake values in a preferences file are evaluated in the context of a restricted execution space and cannot access the disk or network. See the Python Language Manual's RExec module for more information on these restrictions.

2.2 Configuring the User Interface

We ship Wing configured in a way we think will be most usable for the widest range of users. However, a range of options exist to users who want to alter the user interface to suit their needs.

2.2.1 GUI Modes

The following preference can be used to alter windowing style in the graphical user interface:

You can also change the screen area that will be used by Wing and how windows will be presented initially:

It is also possible to control which manager windows are visible at IDE startup, and whether or not the most recently open project file is reopened automatically:

2.2.2 Editor Personalities

Wing ships with a default editor personality that acts like a simple graphical text editor.


   The first thing any emacs user will want to do is to set the editor personality to emulate emacs! This is done with the editor's personality preference:

  • edit.personality - Set to 'normal' for vanilla key bindings and actions, and 'emacs' for emacs-like operation. Default='normal'

Additional information about the editor personalities can be found in sections 4.10 and 4.11 of the Source Code Editor chapter.


2.2.3 Key Equivalents

Wing ships with two key equivalency maps, both found in WINGHOME: keymap.normal and keymap.emacs. These are used as default key maps for the corresponding editor personalities.

However, it is possible to copy these maps and customize them. If you do this, it is best to start with the mapping that most closely matches the editor personality you plan to use.

Key binding definitions in these files are in the form:

'key-sequence': 'ide-command'

The command portion of the key equivalency definition may be any of the commands listed in this manuals in appendix A. The key sequence is built from key names defined in WINGHOME/pygtk-0.6.5/GDK.py starting at line 300; the names are matched without regard to case. A single unmodified key is specified by its name alone (for example, 'Down' for the down arrow key). Modified keys are specified by hyphenating the key names (for example, 'shift-Down' for the down arrow key pushed while shift is held down). Multiple modifiers may also be specified, as in 'ctrl-shift-Down'.

It is also possible to build multi-key combinations by listing multiple key names separated by a space. For example, to define a key equivalent that consists of first pushing ctrl-x and then pushing the a key by itself, use 'ctrl-x a' as the key sequence.

Wing may be set to use the customized key map file through the following preference:

Note that key bindings defined in your mapping will be shown in any menu items that implement the same command. This makes it easier to learn key bindings while using Wing.

2.2.4 Menu Bar

It is also possible to customize the menu bar, although the way in which this is done requires that you have access to the source code, affects all users of a given Wing installation and will change in future versions of Wing.

To alter your menu bar, edit the file WINGHOME/guimgr/constants.py and change the definition of the kMenuBarDefn constant. This constant is described in a comment in the file.

Changes take effect when you restart Wing and caution is required as inserting a syntax error will prevent Wing from starting or may prevent menus from being available. Making a copy of the original file is strongly recommended.

2.2.5 Tool Bar

The toolbar can also be altered using WINGHOME/guimgr/constants.py by editing the kToolbarDefn constant. This also affects all users of a given Wing installation and will change in future versions of Wing.

The toolbar icons are located in WINGHOME/guimgr/icons. Making a copy of the original constants.py file is strongly recommended.

To enable or disable tooltips over the toolbar, set the gui.enable-tooltips preference. The default is to disable tooltips on Linux because of problems with gtk versions less than 1.2.8. On new Windows installations, the default is to enable tooltips (because Wing is shipped with its own copy of gtk). If you have a user preferences file on Windows from installation of version 1.1b3-3 or earlier, you need to set this manually.

2.2.6 Debug output for Wing

It is possible to have Wing's internal status messages appear in the terminal window Wing was launched from by setting the main.print-wing-debug-output preference to true. The messages include the location of Wing's library directory and any exceptions that may occur in Wing's Python code. This option is useful when tracking down bugs in Wing itself.


2.2.7 Other Preferences

Some additional preferences are also available for controlling top-level behaviors:


next up previous contents
Next: 3. Project Manager Up: Wing IDE Reference Manual Previous: 1. Introduction   Contents


Stephan R.A. Deibel
2001-09-17