Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

lasse's avatar

Sublime code formatter package for Laravel Blade?

Is there a package for Sublime Text 3 which reindents Laravel Blade syntax correctly upon Edit -> Line -> Reindent?

Example:

@section()
SOME CODE
@endsetion

becomes:

@section()
    SOME CODE
@endsection

Thanks!

0 likes
5 replies
Jaytee's avatar

Not that I know of but there is this wonderful thing out, it's called the TAB key. Basically, it's not that hard to use, once you create a new file, you simply add in your sections and then press the TAB key before your content. Boom!

All jokes aside, we shouldn't become that lazy that we even need to indent blade syntax.

PayZip's avatar

This assumes that you aren't inheriting the Blade view file from another developer whose indenting is less than ideal and that you want a quick fix for it.

Please or to participate in this conversation.