Skip to content

Syntax Highlighting

Magician allows you to define the text attributes (such as font name and color) for the various syntactical elements that are displayed in the Magik Prompt window and the Magician Editor window.

When you open a file in the Magician Editor or enter a command at the Magik Prompt, Magician will parse the file or command into its different elements and assign text attributes to those elements based on a set of defaults or on the preferences that you have defined for yourself.  For example, all numbers could be displayed in blue text and all comments could be displayed in brown italic text.

Note that because syntax highlighting can be different for each language, Magician uses the file extension to determine what language was used to create the file.  

To change the language for an open file, right-click on the text of the file and then select Language | desired-language from the pop up list.

To turn off all syntax highlighting for an open file, right-click on the text and then select Language | None.

Define Syntax Highlighting

To define syntax highlighting, select Tools | Editor Options | desired_language from the Smallworld Magician menu bar.  The Editor Options window appears.  Click on the Highlighting tab, as shown below:

To define the text attributes for a particular element, highlight the name of that element in the Element list.  Then, select the desired Foreground color, Background color, Font name, character set (Charset), and font Size from the pulldown menus.  If desired, you may check the Bold, Italic, Underline boxes.  

If you want to use the defaults for the Foreground or Background text color, check the corresponding boxes.

Press OK to save your changes and exit the Editor Options dialog box.