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
  • 1 month ago
  • 3 weeks ago
  • 12 years ago

Installs

  • Total 459K
  • Win 278K
  • Mac 92K
  • Linux 88K
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 Feb 10 Feb 9 Feb 8 Feb 7 Feb 6 Feb 5 Feb 4 Feb 3 Feb 2 Feb 1 Jan 31 Jan 30 Jan 29 Jan 28 Jan 27 Jan 26 Jan 25 Jan 24 Jan 23 Jan 22 Jan 21 Jan 20
Windows 8 7 14 14 5 13 9 18 24 15 10 8 10 15 22 35 18 28 15 6 14 20 13 21 17 13 11 14 9 25 18 9 5 6 11 5 10 9 28 5 5 15 13 18 19 32
Mac 2 4 3 2 0 5 2 4 8 2 5 4 0 3 6 3 7 2 0 1 7 2 3 6 8 1 4 4 3 7 3 5 3 4 5 4 8 4 1 3 1 1 5 5 5 2
Linux 1 6 12 7 1 5 4 3 2 4 6 3 3 6 6 6 10 12 2 4 1 6 9 6 2 4 2 1 5 4 2 5 2 4 2 2 6 2 3 2 1 4 5 3 6 0

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.