You can easily format/align Apex code directly in the Developer Console.
- Open an Apex class, trigger, or the Anonymous Window.
- Press Ctrl + A to select all the code.
- For Mac OS: Command-A (⌘-A)
- Press Shift + Tab to format and indent the code.
Salesforce tutorials for developers, admins and architects.
You can easily format/align Apex code directly in the Developer Console.