To install the latest commit of this extension use the built-in Brackets Extension Manager which has a function to
Install from URL... using this link:
The latest release of this extension is also available on the Brackets npm Registry.
Brackets Beautify can be run manually on the whole file or on a selection.
Use the Toolbar Button with the wand icon, the menu entry
Edit > Beautify, the context-menu entry
Beautify, or one of the keyboard shortcuts
Cmd-Shift-L (Mac), or define your own.
Alternatively it can be enabled to run automatically on save.
Use the menu entry
Edit > Beautify on Save or the more advanced settings to activate.
Brackets Beautify supports the same options as js-beautify with the exception of indentation-based options (
indent_with_tabs) which are taken from the current settings in Brackets.
The options can be specified in a
.jsbeautifyrc file on project level and will be merged with the default.
The default is defined in
default.jsbeautifyrc and looks like this:
Brackets Beautify leverages Brackets preferences, which means that you can specify per project settings by defining a
.brackets.json in the root directory of your project. With Brackets preferences you can even define per file settings, which is really handy when dealing with third party libraries or minified resources.
Brackets Beautify also support per language settings, which enables you to enable/disabled
Beautify on Save for your documents using the Brackets language layer.
.brackets.json below generally enables
min and any PHP file.
keymap.json with the menu entry
Debug > Open User Key Map and add an overrides entry.
"documentation": """overrides":"Ctrl-Alt-F": "bb.beautify.beautify"
You can add languages or change their assigned beautifiers by adding their ids to the
The language id for the current document can be found by using the following command in the Brackets DeveloperTools:
The beautifier id has to be either one of the bundled beautifiers (
html) or one that was defined as external formatter.
Additionally, external formatters can be added to Brackets Beautify by modifying the
The key is a name that can be use to configure the language where this formatter should be used.
<COMMAND> is executed on a shell and gets the filename as last command line argument.