Qedit

Selecting Default Color Schemes

By François Desrochers

Syntax coloring has been introduced in Qedit for Windows 5.3. You can customize a language template or create your own. You can also select default color schemes at different levels:

Color Schemes Hierarchy

The color scheme hierarchy is as follows:
  1. If a color scheme has been selected for a specific file through the File Properties dialog box (File | Properties), the colors remain associated with the file from that point on.

  2. If there is no file-level color scheme and this is a host file, Qedit for Windows looks for a color scheme set for the corresponding connection on the Connection List dialog box (Options | Connections). All files opened on that connection will have these colors.

  3. If there are no color schemes at the file or connection levels, the color scheme selected for the type of file (UNIX / MPE / Local tabs) on the Qedit Preferences dialog box (Options | Preferences) is used.

  4. If there are no color schemes at the file, connection or filetype levels, the global color scheme (General tab) selected on the Qedit Preferences dialog box (Options | Preferences) dialog box is used.

  5. If no default color schemes have been selected at any levels, Qedit for Windows uses a predefined set of colors. This predefined color scheme can not be changed.
Note: The file-level color scheme overrides all color schemes selected at the other levels. You can change the file color scheme to something else but there's currently no easy way to dissociate a file-level scheme from the file and make it use the default scheme again. See Removing file-level colors below.

If you set a color scheme at lower levels (connection, filetype, global), the color scheme is used for all files matching that level. Color schemes are searched in that order. It doesn't matter whether the file has been opened in the past or the file is brand new.

For example, to set a color scheme for all MPE files (provided individual connections do not have a different scheme):

  1. Go to Options | Preferences
  2. Go to the MPE tab
  3. Select the color scheme in the Default Colors field
  4. Click OK
Open a file on an MPE connection and you should get that color scheme. If you have files already opened, you have to close them and re-open them to get the new colors.

Removing File-level Colors

The file-specific color scheme is stored in the document database (qwinddb.dat) along with a lot of other file information. One way of removing a file-specific color scheme is to get rid of the document database. Of course, this is rather drastic as you would lose a lot of useful information about all the files you have accessed since you installed Qedit for Windows.

Here's another approach. Each file entry in the document database is identified by the fully-qualified filename. For this purpose, Qedit for Windows stores the connection name and the actual filename for host files and the full path for local files. Some examples would be:

MPEServer:myfile.mygroup.myacct
UXServer:/users/home/public_html/myfile
C:\Word Documents\Homework.doc
So, if you wanted to dissociate a color scheme, you could have Qedit for Windows create a new entry for that file by changing part of its name as stored in the document database. You can not edit the document database directly but could force the file to a new entry. The old entry would still be there but you wouldn't use it anymore.

For host files, you could create a new connection and open the file through it. This would affect all files opened through that connection. This would be limited to your own environment.

To limit the change to a single file, you could change the pathname (directories, group, account) or the filename itself but that would probably bring other problems and confusion if the file was used by someone else.


October 2003