For indentation at the beginning of the line, use spaces instead of
tabs. This helps when copying code as it formats correctly in all
editors. Showing whitespace characters helps you see tabs versus
spaces
There is a setting in Appcelerator to specify to insert spaces for
tabs.
- Click the Appcelerator link in the menu.
- For a text editor:
- Select Preferences.
- Select General > Editors
> Text Editors.
- For Displayed tab width, enter 4.
- Check Insert spaces for tabs.
- For editing JavaScript:
- Select Preferences.
- Select General > Studio
> JavaScript.
- For Tab policy, select Use Spaces.
- For Tab size, enter 4.