Coder Social home page Coder Social logo

r3sult / laravel-blade-snippets-vscode Goto Github PK

View Code? Open in Web Editor NEW

This project forked from onecentlin/laravel-blade-snippets-vscode

0.0 0.0 0.0 436 KB

Laravel blade snippets and syntax highlight support for Visual Studio Code

License: MIT License

HTML 100.00%

laravel-blade-snippets-vscode's Introduction

Laravel Blade Snippets

Laravel blade snippets and syntax highlight support for Visual Studio Code.

Suggest Laravel related extension: Laravel 5 Snippets

Screenshot

Demo

Important update change (VS Code 1.15+)

Open Preferences -> Settings

Add below settings to enable Emmet for blade:

"emmet.includeLanguages": {
    "blade": "html"
},
"emmet.triggerExpansionOnTab": true,

p.s. Since VS Code v1.15, please update preference settings from emmet.syntaxProfiles to emmet.includeLanguages.

Please set emmet.triggerExpansionOnTab value to true if you want to enable tab to expanse emmet tags.

Features

  • Blade syntax highlight
  • Laravel blade snippets
  • Emmet works in blade template

Blade Syntax Hightlight

Language Mode

  • Auto detected with .blade.php extension
  • Manually switch language mode to Laravel Blade (Ctrl + K, M or โŒ˜ + K, M)

Laravel Blade Snippets

Trigger Snippet
b:extends @extends
b:yield @yield
b:section @section...@endsection
b:section-show @section...@show
b:if @if...@endif
b:if-else @if...@else...@endif
b:has-section @hasSection...@else...@endif
b:for @for...@endfor
b:foreach @foreach...@endforeach
b:forelse @forelse...@empty...@endforelse
b:while @while...@endwhile
b:each @each
b:push @push...@endpush
b:stack @stack
b:inject @inject
b:comment {{-- comment --}} (Ctrl+/)
b:echo {{ $data }}
b:echo-html {!! $html !!}
b:echo-raw @{{ variable }}
b:can @can...@endcan (v5.1)
b:can-elsecan @can...@elsecan...@endcan (v5.1)
b:cannot @cannot...@endcannot (v5.3)
b:cannot-elsecannot @cannot...@elsecannot...@endcannot (v5.3)
b:verbatim @verbatim...@endverbatim (v5.3)
b:php @php...@endphp (v5.3)
b:includeIf @includeIf (v5.3)
b:component @component...@endcomponent (v5.4)
b:slot @slot...@endslot (v5.4)
b:includeWhen @includeWhen (v5.4)
b:isset @isset...@endisset (v5.4)
b:empty @empty...@endempty (v5.4)
b:auth @auth...@endauth (v5.5)
b:guest @guest...@endguest (v5.5)
b:switch @switch...@case...@endswitch (v5.5)

$loop variable (Laravel v5.3+)

Trigger Snippet
b:loop $loop->(index,remaining,count,first,last,depth,parent)
b:loop-first @if($loop->first)...@endif
b:loop-last @if($loop->last)...@endif

Laravel Helper Snippets for Blade

Trigger Laravel Helper
lv:elixir elixir()
lv:mix mix() (v5.4)
lv:trans trans()
lv:action action()
lv:secure-asset secure_asset()
lv:url url()
lv:asset asset()
lv:route route()
lv:csrf-field csrf_field()
lv:csrf-token csrf_token()
lv:pagination-links $collection->links()

Contact

Please file any issues or have a suggestion please tweet me @onecentlin.

Credits

License

Please read License for more information

laravel-blade-snippets-vscode's People

Contributors

adevade avatar mikebronner avatar onecentlin avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.