Setting Code Editor Options
Queries can be automatically colorized as you type, using the Code Editor tab in the Options dialog box. The query text is colorized based on specific SQL keywords and functions, strings and numbers, comments, and so on. Query syntax and parser errors are highlighted in yellow by default in the Query window. This color can be changed in the Code Editor tab.
To set formatting options for a query
1 Select Tools > Options.
2 Select the Code Editor tab.
3 Choose an option. The following table explains each option.
Note: For more information on how syntax highlighting works, see “Language Definition Files” on page 96.
Note: Japanese object names are only highlighted as object names if they are enclosed in double quotes.
Option |
Description |
Automatic syntax highlighting |
Enables syntax highlighting. If this option is not selected, all text is set to the default color. The default is selected. Note: Disabling this feature also turns off automatic brace matching. |
Convert keywords to upper case |
Displays all keywords in uppercase. The default is cleared. |
Display line numbers |
Displays line numbers to the left of each line in the query. The default is cleared. |
Display left margin |
Displays the left margin in the Query window. The default is selected. |
Display brace matches |
If this option is selected, keywords (such as BEGIN and END), symbols, parenthesis, and quotation marks are highlighted as a pair when the cursor is placed within or after a keyword. The default is selected. |
Insert spaces for tabs |
Inserts ‘n’ space characters each time the tab key is pressed. Use the Tab Size box to indicate the number of spaces for each tab entered, from 2-9. The default is cleared. |
Indent new lines like previous |
The default is selected. If this option is not selected, all new lines start at the left margin. |
Wrap lists after |
When using Format Query, any comma that is found after this column causes the remaining text on that line to be moved to a new line. To format the query so that each column in the select list is on a separate line, set to a low value such as three. The default is 60. |
Display Quick-Info Tips |
When selected, a description of the function will be displayed in a tool tip when you hover the mouse over a function name. The default is cleared. |
Display suggestions |
If this option is selected SQL Assistant displays drop down lists containing object and built-in function names. The default is cleared. See “Using Code Completion” on page 73. |
Include table names |
This option applies only if Display suggestions is also selected. When selected, both Table and View names are included in the object name lists. When cleared, only Views are included. The default is cleared. |
Include built-in functions |
This option applies only if Display suggestions is also selected. When selected, built-in function names are included in the suggestion lists. The default is checked. |
Display Item |
Shows a list of syntax elements and other application settings. Select an item to see its current color displayed in the Color field to the right. Its font style is indicated by the bold and italicized check boxes below. Change the color by clicking the dropdown button of the Color list and selecting a new color from one of the three tabs: Change the font style by selecting or clearing the two check boxes. Note: The font style options are only available for the query syntax highlighting colors. |