Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Unibeautify for VSCode

Build Status Visual Studio Marketplace Renovate enabled

Unibeautify for Visual Studio Code


🎉 Install

Search for Unibeautify extension and click Install. See Install an extension for more details.

code --install-extension Glavin001.unibeautify-vscode

📚 Support

See for list of supported beautifiers.

# Beautifier Documentation
1 Black
2 CSScomb
3 ClangFormat
4 ESLint
5 Gofmt
6 JS-Beautify
7 PHP-CS-Fixer
8 PHP_CodeSniffer
9 Prettier
10 Pretty Diff
11 TSLint
13 sqlformat
14 stylelint

🎨 Usage

🔧 Configure

Important: You must first configure for the extension to work properly.

Use the Unibeautify Assistant for an interactive setup of your configuration file. Simply select the languages you want and the configuration assistant will walk you though the options available. At the end, simply download or copy to your clipboard your configuration.

📝 Example Configuration File

See for details.

Given the following scenario:

Create a .unibeautifyrc.yml file in your project's root directory with the following contents:

JavaScript: # Enable language
  beautifiers: ["Prettier"] # Enable beautifiers
  indent_style: "space"
  indent_size: 2

Then look at and for more supported options.

📌 Default configuration

We provide the option to set a path to a default configuration file, so whenever a project of yours has no, e.g. .unibeautifyrc.yml, the default configuration will be used as a fallback.

To enable this, just add this to your VSCode settings:

"unibeautify.defaultConfig": "/path/to/your/.unibeautifyrc.yml",

Keyboard Shortcut

From Stack Overflow:

  • Windows: Shift + Alt + F
  • Mac: Shift + Option + F
  • Ubuntu: Ctrl + Shift + I

🎹 Command Palette

Open the Command Palette (Ctrl +Shift+ P or Command + Shift + P on Mac) and search for format:


  • Format Document - Formats the entire editor document.
  • Format Selection - Formats only the selection. Only appears when text selected.


How do I add language support for a non-standard file extension?

This section is for you if you are seeing the following error message after running Format Document or similar:

There is no document formatter for 'plaintext'-files installed.

See for VSCode documentation on file.associations setting. For example, the .vscode/settings.json below adds the .myphp file extension to the php language identifier:

  "files.associations": {
    "*.myphp": "php"
Before After
before after
How do I disable a supported language?

By default all languages supported by Unibeautify will be enabled.

You can disable a specific language by setting the language options to false as shown below.

Important: You must restart/reload VSCode after enabling/disabling a language.

Example .unibeautifyrc.yml:

CSS: false # Disable CSS!
JavaScript: # Enable TypeScript
  beautifiers: ["Prettier"] # Enable beautifiers
  indent_style: "space"
  indent_size: 2
Before After
Beautified CSS files There is no document formatter for 'css'-files installed.
What can I do when a beautifier takes to much time formatting?

This section is for you if you are seeing the following error message in the developer console after running Format Document or similar:

Timeout message

Sometimes beautifiers are taking much time formatting your file, this can be caused by big files or many settings you have set for your beautifier, then you need to increase the VSCode editor.formatOnSaveTimeout option to give the beautifier more time formatting your file.

Just add this entry in your VSCode settings:

"editor.formatOnSaveTimeout": 2000

The time is set in milliseconds, in the example above 2000 is equal to 2 seconds