Format Code in the Editor
Syntax Coloring
The Syntax Coloring feature in IDL is the text chromacoding that makes your code easier to read and scan for particular elements. See the following example from the U.S. Census demo program:

Note
You can change the appearance of syntax coloring by changing the syntax coloring preferences in IDL. See Syntax Coloring for more information.
Formatting Options
The IDL Workbench Source menu provides features that help you quickly format your code:
- Format—This command does simple code formatting. It adjusts indentation and the formatting of IDL reserved words. The IDL reserved word formatting preference is set on the Preferences dialog, found under Window → Preferences → IDL → Editor.
- Shift Right—This command moves a line of text to the right. Select a line or block of lines and then the Tab key or Source → Shift Right.
- Shift Left—This command moves a line of text to the left. Select a line or block of lines and then the Shift+Tab keys or Source → Shift Left.
- To Uppercase—This command converts selected text to uppercase characters. Select a line or block of lines and then right-click and choose To Uppercase from the pop-up menu or select Source → To Uppercase.
- To Lowercase—This command converts selected text to lowercase characters. Select a line or block of lines and then right-click and choose To Lowercase from the pop-up menu or select Source → To Lowercase.