6.2 Changing Settings

When you first use PWB, you don't have to specify the tab stops, whether the editor starts in insert or overtype mode, and so on. These settings (called “switches”) are all covered by defaults. PWB's default behavior can be extensively customized by changing the values of PWB switches.

Switches fall into three categories:

Boolean switches. True/false or on/off switches that can also be specified as yes/no or 0/1. An example of a Boolean switch is Autosave, which governs whether PWB saves a file when you switch to a different one.

Numeric switches. An example of a numeric switch is Undocount, which determines the maximum number of editing actions you can undo.

Text switches. Examples of a text switch are Markfile, the name of the file in which to store marks, Tabstops, a list of tab-stop intervals, and Readonly, the operating-system command for PWB to run when saving a read-only file.

·To change the setting for Tabstops:

1.From the Options menu, choose Editor Settings.

PWB displays the Editor Settings dialog box.

2.Tabstops is a text switch (not a numeric switch as you might expect), so select the Text option button.

3.Select Tabstops in the Switch List box.

PWB shows the current setting for Tabstops in the Switch text box at the top of the dialog box.

4.Move to the Switch text box by clicking in the box or by pressing ALT+S.

PWB selects only the switch value, instead of the entire text.

5.Type the new setting:

3 4 7 8

This setting defines a tab stop at columns 4, 8, 15, and every eight columns thereafter. At this point, the Editor Settings dialog box should look like:

6.Choose the Set Switch button to change the setting of the Tabstops switch.

7.Choose OK.

Important:

To change a setting you must choose the Set Switch button. The OK button only dismisses the dialog box. It does not perform any other action. This design allows you to set many switches in one session with the dialog box.

The new tab stops you set are used for the current session. If you want to use this setting permanently, you must choose the Save button in the Editor Settings dialog box. This changes your TOOLS.INI file in the same way as for key assignments.You can make temporary switch assignments for the current session by using the Assign function. You do this in the same way as for a key assignment by typing Arg switch : value Assign (ALT+A switch : value ALT+=).

You may be curious about the Switch Owner box that you did not use in this example. The Switch Owner is either PWB or a PWB extension such as PWBHELP (the extension that provides the Microsoft Advisor in PWB). Type or select a switch owner to set switches for that extension. Each extension has its own section in TOOLS.INI.

Note:

When you choose Set Switch, most switch settings take effect immediately. However, changes to the Height switch do not take effect until you choose OK.