Package Control

The official Sublime Text package manager.

BladeFormatter

Sublime text plugin to format blade files

By RushabhJoshi
Created April 18, 2023, last updated August 6, 2026.

JulJunMayAprMarFebJan Dec2025 NovOctSepAug 2026-W33 | installs: 1 | removals: 0 | upgrades: 0 2026-W33 | installs: 1 | removals: 0 | upgrades: 0 2026-W33 | installs: 1 | removals: 0 | upgrades: 0 2026-W32 | installs: 0 | removals: 0 | upgrades: 0 2026-W32 | installs: 0 | removals: 0 | upgrades: 0 2026-W32 | installs: 0 | removals: 0 | upgrades: 0 024 WeeklyInstalls 024 WeeklyUpgrades 2026-W32 | upgrades: 0 1.0.2 2026-W30 1.0.1 2026-W22 1.0.0
Installations: 1 in total
Installations minus removals
Upgrades

Links

Versions

1.0.2 ·
2026-08-06 06:44

More

Blade Formatter

Blade Formatter is a Sublime Text package that helps you to format your Laravel Blade templates as per PSR standards.

Requirements

To use this package you need to install node package globaly blade-formatter.

Installation

To install Blade Formatter, you can use Sublime Text's Package Control. Follow these steps:

  1. Open the command palette by pressing Ctrl+Shift+P on Windows or Cmd+Shift+P on Mac
  2. Type Package Control: Install Package and press Enter
  3. Search for Blade Formatter and press Enter to install

Alternatively, you can install it manually by cloning this repository to your Sublime Text's Packages directory.

Usage

You can format your Blade templates by using the Format: Blade File command. Here's how to do it:

  1. Open a Blade template file
  2. Press Ctrl+Shift+P on Windows/Linux or Cmd+Shift+P on Mac to open the command palette
  3. Type Format: Blade File and press Enter

Keyboard Shortcut

To avoid conflicts with other packages, Blade Formatter does not ship with a default keyboard shortcut. You can easily set up your own:

  1. Open Preferences > Key Bindings in Sublime Text.
  2. Add the following entry to your User key bindings (the file on the right side):
[
    {
        "keys": ["shift+alt+f"],
        "command": "blade_format",
        "context": [
            { "key": "selector", "operator": "equal", "operand": "text.html.blade" }
        ]
    }
]

(On Mac, you might prefer "keys": ["super+shift+f"] or "keys": ["shift+option+f"])

Configuration

Blade Formatter supports all configuration options available in the underlying blade-formatter. You can modify these in your BladeFormatter settings by opening the Command Palette (Ctrl+Shift+P on Windows/Linux or Cmd+Shift+P on Mac), typing Preferences: BladeFormatter Settings, and pressing Enter.

Here is the complete list of options with their default values:

{
  "indent_size": 4,
  "wrap_attributes": "auto",
  "wrap_line_length": 120,
  "wrap_attributes_min_attrs": 2,
  "indent_inner_html": false,
  "end_with_newline": true,
  "end_of_line": "LF",
  "use_tabs": false,
  "sort_tailwindcss_classes": false,
  "tailwindcss_config_path": "",
  "sort_html_attributes": "none",
  "no_multiple_empty_lines": false,
  "no_php_syntax_check": false,
  "no_single_quote": false,
  "no_trailing_comma_php": false,
  "extra_liners": ["head", "body", "/html"],
  "component_prefix": ["x-", "livewire:"],
  "php_version": ""
}

Option Descriptions

Credits

Blade Formatter is based on blade-formatter, a PHP package that formats Blade templates. The Sublime Text package was developed by Rahul Kadyan and contributors.

License

Blade Formatter is open-source software licensed under the MIT license.

Results

Packages