Wing IDE Reference Manual
   
Wing IDE Reference Manual

Version 1.1.10


next up previous contents
Next: 3. Project Manager Up: Reference Manual Wing IDE 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/Unix) 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 graphical user interface can run in several modes, controlling how the menu bar and toolbar are presented, and how many windows are used to display source files and managers like the debugger and source code browser.

These modes are set using the following preference:

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.12 and 4.13 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.


2.2.6 Debug Trace Logs for Wing IDE

It is possible to run Wing IDE in such a way that prints debug output for Wing IDE and the debug machinery itself. If you are having problems with Wing or cannot get debugging working, this may reveal some information that will help in working with Technical Support.

2.2.6.1 Logging Wing IDE Internals

On Windows, do this by executing console_wing.exe instead of wing.exe. In this case, Wing will open a new console window where debug output will be displayed.

On Linux/Unix, pass --verbose as the first command line argument to wing. Here, debug output will be printed to the shell window from which you launched Wing.

Whether or not you enable debug output, Wing always logs debug information to a periodically truncated file called error-log, which is placed in your Wing configuration directory. On Linux/Unix, this is ~/.wingide. On Windows, it is profiles/USERNAME below your Wing IDE installation directory. USERNAME is replaced with the user name under which you are logged in.

2.2.6.2 Logging Debugger Internals

Similar debug output for diagnosing problems in the debugger internals is controlled seperately by setting the debug.verbose preference to true, and/or by setting debug.logfile preference to a non-None value (however, the specified file must exist or logging will be disabled).

When using wingdbstub logging of debugger internals is controlled by setting kSilent to 0 or by setting WINGDB_SILENT environment variable. Similarly, kLogFile or WINGDB_LOGFILE environment variable can be used to direct internal logging to a disk file. Again, the disk file must already exist or logging is disabled.

2.2.6.3 Combined Logging

Although Wing IDE and the debug program run in seperate processes, it is acceptible to direct the debug process' internal logging into Wing's error-log file. This produces a single chronological combined log, which can be sent to Archaeopteryx Technical Support.


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: Reference Manual Wing IDE Previous: 1. Introduction   Contents



2003-08-28