Skip to content

Instantly share code, notes, and snippets.

@JuanVqz
Created October 1, 2017 14:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JuanVqz/e771a7dbf36f4bcb866d464efc8e28ac to your computer and use it in GitHub Desktop.
Save JuanVqz/e771a7dbf36f4bcb866d464efc8e28ac to your computer and use it in GitHub Desktop.
vim-blade-snippets
extends html
snippet foreach "@foreach"
@foreach ($${1:array} as $${2:item})
{{ $$2->${3} }}
@endforeach
snippet if "@if"
@if (${1:true})
${2:tag}
@endif
snippet ife "@if @else"
@if (${1:true})
${2}
@else
${3}
@endif
snippet extends "@extends"
@extends('${1:layouts.app}')
${2}
snippet section "@section"
@section('${1:content}')
${2}
@endsection
snippet include "@include"
@include('${1:layouts.partials}', ${2:[]})
${3}
snippet component "@component"
@component('${1:components.panel}' ${2:, []})
${3}
@endcomponent
snippet slot "@slot"
@slot('${1:footer}')
${2}
@endslot
snippet !! "{!! !!}"
{!! ${1} !!}
snippet {{ "{{ }}"
{{ ${1} }}
snippet @{{ "@{{ }}"
@{{ ${1} }}
snippet route "{{ route('name') }}"
{{ route('${1}') }}
snippet asset "{{ asset('path') }}"
{{ asset('${1}') }}
snippet url "{{ url('path') }}"
{{ url('${1}') }}
snippet config "{{ config('app.name') }}"
{{ config('${1}') }}
snippet -- "{{-- comment --}}"
{{-- ${1} --}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment