Ben
Ben

Reputation: 16649

Syntax Highlighting for Laravel Blade Template Engine in Sublime Text 2

In Sublime Text 2, what steps do I need to take to get Syntax Highlighting for the Laravel Blade Template Engine to work?

As described in http://daylerees.com/2012/04/06/notable-blade-syntax-support-by-medalink/, I took https://github.com/Medalink/Laravel-Blade, unzipped it and copied the folder into Sublime's packages folder.

However, it doesn't seem to work (see screenshot), even if I set it manually using Tools\Command Palette...\Set Syntax: Blade

Is this only meant to work with particular Color Schemes (if so, which ones), or what am I missing? (I just started using Sublime Text today)

enter image description here

Upvotes: 11

Views: 26249

Answers (5)

Sagiruddin Mondal
Sagiruddin Mondal

Reputation: 5787

For Sublime text 3 as well as sublime text 2

  1. install Sublime Package Control (more help on: http://wbond.net/sublime_packages/package_control/installation)

  2. then restart sublime text (2/3) and press ----> control (or command in mac) + shift + p

  3. there search for package control: install package

  4. wait for another interaction screen

  5. search for Laravel Blade (and other packages if you want)

{ For video tutorials on this and other , subscrive this channel : https://www.youtube.com/channel/UChEv_j3fE4k2r7KcEApFDyQ }

Upvotes: 16

Priyabrata
Priyabrata

Reputation: 21

mine was stored in users folder, just do a folder search for "laravel-blade" and remove the entry from json config

Find: laravel-blade Where: /Users/:username/Library/Application Support/Sublime Text 2/Packages

Upvotes: 0

paoloumali
paoloumali

Reputation: 65

In case you installed the Laravel Blade Syntax Highlighter using Package control, that plugin, for some reason keeps throwing out errors.

Package Control: The package specified, laravel-blade, is not available

What I did is just Preference > Browse packages and then rename the folder into laravel-blade. Seems working with no pesky errors now. What I did is just gut feel. I did not even read anything in the files in the folder.

-- Edited: Go to Preference > Browse packages > Package Control.sublime-settings and remove the offending entry.

Upvotes: 0

Sean
Sean

Reputation: 1888

Also, once you have Package Control installed, you should also install the package 'DetectSyntax'. It will automatically detect the blade syntax so you don't have to manually set it for each file.

Upvotes: 3

AndHeiberg
AndHeiberg

Reputation: 1029

The easiest way to install plugins for Sublime Text 2 is through Package Control.

To install Package Control:

Installation is through the Sublime Text 2 console. This is accessed via the ctrl+` shortcut. Once open, paste the following command into the console:

import urllib2,os; pf='Package Control.sublime-package'; ipp=sublime.installed_packages_path(); os.makedirs(ipp) if not os.path.exists(ipp) else None; urllib2.install_opener(urllib2.build_opener(urllib2.ProxyHandler())); open(os.path.join(ipp,pf),'wb').write(urllib2.urlopen('http://sublime.wbond.net/'+pf.replace(' ','%20')).read()); print 'Please restart Sublime Text to finish installation'
This command creates the Installed Packages folder for you (if necessary), and then downloads the Package Control.sublime-package into it.

When you have Package Control installed all you need to do to install the Blade syntax highlighter is to:

  1. Open the command palette and type "install package"
  2. Press enter
  3. Wait for a new palette to show up after it has fetched the package list
  4. Type "blade syntax"
  5. Press enter
  6. Enjoy

Upvotes: 22

Related Questions