Reputation: 16649
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)
Upvotes: 11
Views: 26249
Reputation: 5787
For Sublime text 3 as well as sublime text 2
install Sublime Package Control (more help on: http://wbond.net/sublime_packages/package_control/installation)
then restart sublime text (2/3) and press ----> control (or command in mac) + shift + p
there search for package control: install package
wait for another interaction screen
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
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
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
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
Reputation: 1029
The easiest way to install plugins for Sublime Text 2 is through 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:
Upvotes: 22