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

Laravel Blade

by SublimeText ALL Top 100

Laravel Blade Template syntax for Sublime Text

Details

  • 2.1.0
    1.6.19
    1.5.3
  • github.​com
  • github.​com
  • 2 months ago
  • 1 month ago
  • 12 years ago

Installs

  • Total 459K
  • Win 279K
  • Mac 92K
  • Linux 88K
Mar 28 Mar 27 Mar 26 Mar 25 Mar 24 Mar 23 Mar 22 Mar 21 Mar 20 Mar 19 Mar 18 Mar 17 Mar 16 Mar 15 Mar 14 Mar 13 Mar 12 Mar 11 Mar 10 Mar 9 Mar 8 Mar 7 Mar 6 Mar 5 Mar 4 Mar 3 Mar 2 Mar 1 Feb 28 Feb 27 Feb 26 Feb 25 Feb 24 Feb 23 Feb 22 Feb 21 Feb 20 Feb 19 Feb 18 Feb 17 Feb 16 Feb 15 Feb 14 Feb 13 Feb 12 Feb 11
Windows 12 8 12 10 11 2 4 6 6 9 13 13 10 6 9 11 10 13 8 12 8 10 13 7 14 14 5 13 9 18 24 15 10 8 10 15 22 35 18 28 15 6 14 20 13 21
Mac 5 1 3 0 2 2 3 3 1 3 1 3 3 2 1 3 4 3 5 6 7 0 5 4 3 2 0 5 2 4 8 2 5 4 0 3 6 3 7 2 0 1 7 2 3 6
Linux 3 2 5 5 8 2 1 5 1 3 10 2 4 2 5 1 5 10 1 5 3 7 5 6 12 7 1 5 4 3 2 4 6 3 3 6 6 6 10 12 2 4 1 6 9 6

Readme

Source
raw.​githubusercontent.​com

Blade

Laravel Blade Template syntax definitions for Sublime Text based on its HTML/CSS/JS syntaxes.

It is a fork of great Medialink/Laravel Blade Highlighter which is no longer maintained.

Installation

Package Control

The easiest way to install is using Package Control. It's listed as Laravel Blade.

  1. Open Command Palette using ctrl+shift+P or menu item Tools → Command Palette...
  2. Choose Package Control: Install Package
  3. Find Laravel Blade and hit Enter
  4. Restart Sublime Text (e.g.: if A File Icons is installed)
  5. Reopen any .blade files.

Manual Install

  1. Download or clone this repository into [install-dir]/Packages/Laravel Blade
  2. Restart Sublime Text (e.g.: if A File Icons is installed)
  3. Reopen any .blade files.

[!NOTE]

Syntax from main branch require Sublime Text 4.

For Sublime Text 3 compatible version refer to st3 branch.

Supported Extensions

Troubleshooting

§1 Syntax Definition Parse Errors

Blade extends Sublime Text's HTML syntax definition.

If Blade syntax highlighting doesn't work and console displays syntax errors in HTML (Blade).sublime-syntax, please make sure to remove any out-dated syntax override.

Steps:

  1. call Menu > Preferences > Browse Packages..
  2. Look for HTML folder
  3. Remove it or at least delete any syntax definition in it.

§2 Scripts are not correctly highlighted

Blade relies on JavaScript (source.js), JSX (source.jsx), TypeScript (source.ts) and TSX (source.tsx) to scope script blocks and inline scripts.

Make sure to remove related out-dated syntax packages, which don't meet least compatibility requirements.

They can be identified by calling e.g. sublime.find_syntax_by_scope("source.ts") in ST's console.

Known candidates are:

How to Contribute

  • To test a local version of the highlighter first uninstall the highlighter from package control.
  • Follow the manual installation process by cloning the repo into your packages directory.
  • Restart Sublime Text.
  • Open up the '[install-dir]/Packages/laravel-blade' folder into a new Sublime Text project.
  • Open up the blade.tmLanguage file and make changes.
  • I have provided a test.blade file that holds most of the common uses for testing the regex, use this to verify your changes before and after you make them to ensure the changes you make do not break anything.
  • Send a pull request with a single change per request.