We support code formatting via the PRETTIER button available in the project editor. Click the button and we’ll clean up your code (and add a little magic sparkle, too!) You can also use the keyboard shortcut (ctrl-alt-S for PC, cmd+opt+S for Mac) to do this.
Want to format just part of a file?
Highlight the lines you want to format, click the button, and voila! It's especially handy if you're collaborating with people in the same file and don't want to format the line they're working on.
Want to customize the way the PRETTIER button works on Glitch?
- When you use the keyboard shortcut, or if you have "reduce motion" set on your device, we won't animate with sparkles. We know you might not want to see them all the time. If you do want the magic sparkles, click the button!