ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Laravel Blade Spacer

by austenc ALL

Automatically adds spaces between laravel blade templating markers

Details

Installs

  • Total 76K
  • Win 50K
  • Mac 11K
  • Linux 15K
May 9 May 8 May 7 May 6 May 5 May 4 May 3 May 2 May 1 Apr 30 Apr 29 Apr 28 Apr 27 Apr 26 Apr 25 Apr 24 Apr 23 Apr 22 Apr 21 Apr 20 Apr 19 Apr 18 Apr 17 Apr 16 Apr 15 Apr 14 Apr 13 Apr 12 Apr 11 Apr 10 Apr 9 Apr 8 Apr 7 Apr 6 Apr 5 Apr 4 Apr 3 Apr 2 Apr 1 Mar 31 Mar 30 Mar 29 Mar 28 Mar 27 Mar 26 Mar 25
Windows 2 6 0 2 2 6 1 6 1 3 1 5 6 3 3 0 4 7 2 5 5 1 1 5 5 3 2 2 4 0 3 2 3 3 1 8 3 3 0 3 2 8 3 2 2 1
Mac 0 1 0 0 0 0 0 1 1 0 0 0 1 1 1 1 0 0 0 0 1 0 3 0 4 1 0 2 1 0 0 0 1 0 1 0 1 0 0 0 1 0 1 0 1 0
Linux 3 0 1 0 0 1 1 1 2 0 1 1 2 1 0 0 3 3 0 0 2 0 0 2 1 2 1 0 1 1 0 1 1 0 1 1 1 1 0 1 1 1 0 0 4 0

Readme

Source
raw.​githubusercontent.​com

Laravel Blade Spacer

Automatically adds spaces to laravel blade syntax for readability.

Plugin for Sublime Text 3 that adds in spaces after the opening blade tag and before the closing tag. Doing it manually gets overly tedious sometimes so I wrote this plugin, cheers!

Installing

Easy Install (Package Control)

You can install this plugin through the Package Control.

  1. Press ⌘/Ctrl + ⇧ + P to open the command palette.
  2. Type Package Control: Install Package and press enter. Then search for Laravel Blade Spacer.

Manual Installation (Not Recommended)

Without Git: Download the latest source from GitHub <http://github.com/austenc/blade-spacer>. Copy the whole directory into the Packages directory.

With Git: Clone the repository in your Sublime Text Packages directory:

git clone git://github.com/austenc/blade-spacer.git

The “Packages” packages directory is located at:

  • OS X::

    ~/Library/Application Support/Sublime Text 3/Packages/

  • Linux::

    ~/.Sublime Text 3/Packages/

  • Windows::

    %APPDATA%/Sublime Text 3/Packages/

How it works

Sublime text already handles the auto-closing of braces. This plugin automatically adds spaces between double (or triple) curly braces in blade files for readability.

The cursor is represented by | in the examples:

  • typing {{ will yield {{ | }} – notice the spaces and cursor position
  • should work with {{{ }}} and {{-- Comments --}} too!
  • Laravel5 syntax support {!! | !!}

Since 2.2.0 A command has been added to space every set of blade syntax tags in the currently open file. It is under the 'Blade Spacer: Format File' option in the command palette (Ctrl+Shift+P by default in windows / linux, and Cmd+Shift+P on mac).

Feedback welcome, open an issue here.