This page describes how to customize your preferences for formatting your code.
Contents |
Introduction
Note: Currently, code formatting only works for HTML. In the future, you will be able to format JavaScript and other code.
You can quickly reformat your code by pressing Ctrl+Shift+F. You can customize the way that your code is formatted by setting your formatting preferences.
Instructions
Customizing your formatting preferences
To customize your code formatting preferences:
- From the Window menu, select Preferences... to open a Preferences window.
- On the tree on the left, navigate to Aptana > Editors, expand the Editor that you want to change the code formatting for, and select Formatting.
- Modify your formatting preferences to fit your needs. You can modify both your indentation and cleanup options.
- Click OK.
Exporting and importing your formatting preferences
You can export and import your formatting preferences to port those preferences between different computers, instances, etc.
Exporting your formatting preferences
To export your formatting preferences:
- From the Window menu, select Preferences... to open a Preferences window.
- On the tree on the left, navigate to Aptana > Editors, expand the Editor that you want to change the code formatting for, and select Formatting.
- From the Format preference page drop-down list, select the preference page that you want
to export, and click the Edit... button to to go the Profile screen (shown below).
Note: If you do not already have a page to export, click the New... button to create one.
- Click the Export... button.
- Type a name for your formatting .xml file and save it to your computer.
You can now port the exported .xml file to another computer or instance of Aptana.
Importing your formatting preferences
To import an .xml file containing your formatting preferences (see above if you do not have an already exported .xml file):
- From the Window menu, select Preferences... to open a Preferences window.
- On the tree on the left, navigate to Aptana > Editors, expand the Editor that you want to change the code formatting for, and select Formatting.
- Click the Import... button.
- Browse to the location of your .xml file containing your preferences.
- Click OK.