medalink / laravel-blade Goto Github PK
View Code? Open in Web Editor NEWThis package adds syntax definitions for the Laravel Blade engine.
Home Page: http://www.laravel.com
License: MIT License
This package adds syntax definitions for the Laravel Blade engine.
Home Page: http://www.laravel.com
License: MIT License
The PHP code is highlighted when it is into the "mustaches" of blade except when this mustaches are inside quotation marks. This case is very frequent when you want to define dynamic data (for a JS function, for example) or class in HTML markup.
In the exemple below, GitHub Highlighting do the same :
<button id="delete-user" data-user="{{ $user->id }}">
Delete {{ $user->name }}
<button>
Is there a solution to improve this ?
Sublime text 2 installation using package control causes the package folder to be called "Laravel Blade Highlighter" instead of "laravel-blade"
Which causes sublime text 2 to trigger an error every time its launched.
<div class="control-group">
{{ Form::submit('Login', array('class' => 'btn btn-primary')) }} {{ HTML::link('forgotpassword', "Can't remember your password?") }}
</div>
something begins at array( and ends at {{ HTML::
@if($user->profile_answer_array('prefer_to_meet_at'))
@endif
simple test:
it needs to be highlighted prior to treatment of it as a text
I've tried to highlight the "<%" and "%>" as an addition to the regular syntax "{{ }}", but it didn't work out for me. what would I need to add to the tmLanguage file to make it work?
Could you please update the ReadMe to be clearer that the HTML_5_ package is incompatible with laravel-blade.
It does say HTML, but it was only when I moused over it that I noticed it was the HTML5 package.
Otherwise, great package, thanks for contributing!
Hi Guys
I've started getting the following error opening Sublime:
Error loading syntax file "Packages/Laravel-Blade/Blade.tmLanguage": Error parsing plist xml: Failed to open file In file "Packages/Laravel-Blade/Blade.tmLanguage"
I tried deleting the package to reinstall it but still getting the message. Any ideas?
Currently supports multi-line comments, needs to support single line:
{{- Comment
and
{{- Comment -}}
Is there a way to revert "blade style comments" that were introduced in v1.5.2 or a way to use v1.5.1 without manually installing your package?
Syntax highlight not working on Linux Mint if filename use *.blade.php
if use *.blade it Syntax highlight works but autocomplete didn't
Hi Medalink,
thanks for your Blade Highlighting Plugin.
I've encountered, that highlighting for forelse is missing.
Only small changes need to be made. For the case you are too busy, feel free to paste this fixes for laravel-blade.tmLanguage:
Line 114: <string>\s{1}|^)@\b(if|elseif|foreach|for|forelse|while|extends|unless|each|yield|lang|choice|section|include)\b(?=(|\s*|)()</string>
Line 195: <string>\s{1}|^)@\b(endif|endforeach|endfor|endforelse|endwhile|else|empty|endunless|show|stop|endsection|parent|overwrite)\b</string>
Can you include instructions on how to make blade.php files automatically identified in Sublime Text 2?
For some odd reason whenever i put
<style>
@section('styles')
@show
</style>
it breaks everything after it
it looks like this happens whenever the blade is inside the style tag
In the last update from "jasonlewis/basset" they added in the Blade view helpers @Stylesheets('xxx') and @javascripts('xxx'). Can you add these to the syntax highlighting?
Package Control says that laravel-blade is only available for Sublime 2, therefore it's not showing up on the package manager in Sublime 3!!
While using sublime with vanilla PHP language definition, typing div#wrap
and hitting tab expands it into <div id=wrap></div>
; however, with PHP Blade, this behavior is broken and div#wrap
expands into the closest matching PHP function.
I've updated some of the blade syntax for Laravel 4. If you'll add another branch for Laravel 4 I'll be happy to create a pull request to it :)
It would be great to have syntax coloration in html attributes. What do you think ?
This package does not show up on Package Control lately or is it just me? ST keeps prompting me it can't be found!
I'm on Windows 7 64-bit with ST2. I've installed Laravel Blade Highlighter using Package Control but it doesn't work at all. I don't have the HTML5 package installed. The color scheme is Monokai. All other html/php highlighting appears normal.
Any ideas?
Sorry - it's woken up! The problem was that I had files already open in ST2 and they didn't update. As soon as I closed and re-opened them, I was cooking.
Here are images of the errors I'm getting after updating the package today.
It appears that laravel-blade is no longer available on Package Control - Sublime Text 2.
Is it just me?
Would be lovely to see support added for collapsing @Sections.
When I made a comment
{{-- --}}
It doesn't appear correctly
Heading explains it all :)
I have this issue using TextMate 2.0 beta 6
In fact I always had this issue : file.blade.php
are not recongized as blade until you select the Blade syntax. Then textmate remembers your choice for this only file and use Blade everytime you open the file, but the extension detection does not work for a reason I can't figure out.
Am I alone ? Did I miss something ?
Offending Code:
<li class="{{ URI::is('blog*') ? 'active' : '' }}">
Hey guys,
Thanks for the plugin! I think a couple of days ago my Sublime Text updated itself (that doesn't happen a lot! ;) ) and since then Laravel Blade has been unusable. What can I do?
Thanks,
Mark
Hello and first of all thanks for this wonderful highlighter for blade.
But I have a small issue where {{ $var }}
is not highlighted the way it should.
Although it is highlighted but not in PHP style but just in raw text style which is not so handy.
You can see an example at the screen shot.
Thanks in advance,
Juje007
Most packages allow CMD+/ to comment out the current selection line-by-line (with //
in PHP, for example), or OPT+CMD+/ to comment it out in a block (e.g. /* ... */
).
It would be great for your package to do this as well!
<a href="{{ URL::to_action('intake@program_selection') }}">
In this scenario the {{}} and contents are highlighted as if they are within the HTML anchor href quotes.
Thanks for this plugin. However, it only works for .blade, but as soon as I change to .blade.php, it didn't work.
Any solutions?
is there any way to enable laravel syntax highlight between {{ }}??
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.