Created
March 4, 2017 12:08
-
-
Save dnlcorrea/f8083ac1077c9fc5d8f9101a3fa7d162 to your computer and use it in GitHub Desktop.
Getting crazy with UltiSnips
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extends materialize | |
extends php | |
global !p | |
import inflection | |
endglobal | |
snippet csrf | |
{{ csrf_field() }} | |
endsnippet | |
snippet unescaped "Blade Unescaped data" w | |
{!! ${1} !!} | |
endsnippet | |
snippet // "Blade Comment" | |
{{-- ${0} --}} | |
endsnippet | |
snippet @foreach | |
@foreach ($${1:vars} as $${2:var}) | |
${VISUAL:<html>} | |
@endforeach | |
endsnippet | |
snippet @each "each blade loop" b | |
@each('${1:view.view}', $${2:array}, '${3:var}') | |
endsnippet | |
snippet @forelse | |
@forelse ($${1} as $${2}) | |
${VISUAL} | |
@empty | |
No record available. | |
@endforelse | |
endsnippet | |
snippet @e | |
@extends('${1:file}') | |
endsnippet | |
snippet @s | |
@section('${1}') | |
${2} | |
@stop | |
endsnippet | |
snippet @y | |
@yield('${1}') | |
endsnippet | |
snippet @i | |
@include('${1}') | |
endsnippet | |
snippet @if | |
@if(${1}) | |
${VISUAL:code} | |
@endif | |
endsnippet | |
snippet @elif "If...Else" | |
@if(${1}) | |
${VISUAL:code} | |
@else | |
${0} | |
@endif | |
endsnippet | |
snippet {{ "" i | |
{{ $${1:obj}->${2:prop}`!p snip.rv = '' if vim.current.line.count('}') > 1 and snip.c == '' else ' }}'` | |
endsnippet | |
snippet basic "Basic Template" b | |
@extends('meta.master') | |
@section('content') | |
${1:<h1>Awesome content</h1>} | |
@stop | |
endsnippet | |
snippet @comp "@component" b | |
@component('${1}') | |
$2 | |
@endcomponent | |
endsnippet |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment