How to: Format Code in Programs

You can format specific blocks of code or the entire program file by setting the options you want in the Beautify Options dialog box and then apply the formatting options you chose. After formatting the code using the Beautify tool, you can make any additional changes in the formatting of the code.

To set code formatting options

  1. Open the program file.

  2. To format a specific block of code, select the code you want to format.

    Note

    To format the entire program, do not select any code.

  3. On the Tools menu, click Beautify.

  4. In the Beautify Options dialog box, select the formatting options you want.

    The formatting process uses the top line in the block selected for determining the base indentation level.

To apply formatting options to code

  • In the Beautify Options dialog box, click Run.

See Also

Tasks

How to: Edit Programs
How to: Save Programs

Reference

Beautify Options Dialog Box

Other Resources

Working with Programs