To format your whole script: Open the required file. Go to Source | Format Document or press Ctrl+Shift+F.