Created
February 8, 2019 16:20
-
-
Save Kcko/bd5658a25703e67c9006156d77375f81 to your computer and use it in GitHub Desktop.
This file contains 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
{ | |
"block": { "prefix": "block", "body": "{block ${1:content}}\n$0\n{/block}" }, | |
"snippet": { "prefix": "snippet", "body": "{snippet ${1:content}}\n$0\n{/snippet}" }, | |
"layout": { "prefix": "layout", "body": "{layout '${1:../@layout.latte}'}\n$0" }, | |
"extends": { "prefix": "extends", "body": "{extends '${1:../@layout.latte}'}\n$0" }, | |
"capture": { "prefix": "capture", "body": "{capture \\$${1:var}}\n$0\n{/capture}" }, | |
"define": { "prefix": "define", "body": "{define ${1:content}}\n$0\n{/define}" }, | |
"include": { "prefix": "include", "body": "{include #${1:content}}\n$0" }, | |
"includeblock": { "prefix": "includeblock", "body": "{includeblock '${1:file.latte}'}\n$0" }, | |
"foreach": { "prefix": "foreach", "body": "{foreach \\$$1s as \\$$1}\n$0\n{/foreach}" }, | |
"while": { "prefix": "while", "body": "{while \\$$1 = \\$$1s->fetch()}\n$0\n{/while}" }, | |
"for": { "prefix": "for", "body": "{for \\$${1:i} = 0; \\$${1:i} < ${2:10}; \\$${1:i}++}\n$0\n{/for}" }, | |
"first": { "prefix": "first", "body": "{first}\n$0\n{/first}" }, | |
"last": { "prefix": "last", "body": "{last}\n$0\n{/last}" }, | |
"sep": { "prefix": "sep", "body": "{sep}\n$0\n{/sep}" }, | |
"continueIf": { "prefix": "continueIf", "body": "{continueIf \\$${1:foo}}$0" }, | |
"breakIf": { "prefix": "breakIf", "body": "{breakIf \\$${1:foo}}$0" }, | |
"if": { "prefix": "if", "body": "{if \\$${1:foo}}\n$0\n{/if}" }, | |
"ifset": { "prefix": "ifset", "body": "{ifset \\$${1:foo}}\n$0\n{/ifset}" }, | |
"cache": { "prefix": "cache", "body": "{cache \\$${1:var}}\n$0\n{/cache}" }, | |
"default": { "prefix": "default", "body": "{default \\$${1:foo = ''}}$0" }, | |
"link": { "prefix": "link", "body": "{link ${1:Default}}\n$0" }, | |
"plink": { "prefix": "plink", "body": "{plink ${1:Default}}\n$0" }, | |
"control": { "prefix": "control", "body": "{control ${1:foo}}\n$0" }, | |
"form": { "prefix": "form", "body": "{form ${1:foo}}\n$0\n{/form}" }, | |
"label": { "prefix": "label", "body": "{label ${1:foo} /}\n" }, | |
"input": { "prefix": "input", "body": "{input ${1:foo}}\n$0" }, | |
"syntax": { "prefix": "syntax", "body": "{syntax ${1:mode}}\n$0\n{/syntax}" }, | |
"l": { "prefix": "l", "body": "{l}$0" }, | |
"r": { "prefix": "r", "body": "{r}$0" }, | |
"contentType": { "prefix": "contentType", "body": "{contentType ${1:application/xml}}\n$0" }, | |
"status": { "prefix": "status", "body": "{status ${1:500}}\n$0" }, | |
"dump": { "prefix": "dump", "body": "{dump \\$${1:var}}\n$0" }, | |
"debugbreak": { "prefix": "debugbreak", "body": "{debugbreak \\$${1:cond}}\n$0" }, | |
// Default Helpers | |
// String modification | |
"|truncate": { "prefix": "|truncate", "body": "|truncate:${1:length}${2:,'${3:append}'}" }, | |
"|substr": { "prefix": "|substr", "body": "|substr:${1:offset}${2:,${3:length}}" }, | |
"|trim": { "prefix": "|trim", "body": "|trim${1::'${2:charset}'}" }, | |
"|webalize": { "prefix": "|webalize", "body": "|webalize${1::'${2:charlist}'${3:,${4:lower}}}" }, | |
"|indent": { "prefix": "|indent", "body": "|indent${1::${2:level}${3:,'${4:char}'}}" }, | |
"|replace": { "prefix": "|replace", "body": "|replace:'${1:search}'${2:,'${3:replace}'}" }, | |
"|replaceRE": { "prefix": "|replaceRE", "body": "|replaceRE:'${1:pattern}'${2:,'${3:replace}'}" }, | |
"|padLeft": { "prefix": "|padLeft", "body": "|padLeft:${1:length}${2:,'${3:pad}'}" }, | |
"|padRight": { "prefix": "|padRight", "body": "|padRight:${1:length}${2:,'${3:pad}'}" }, | |
"|repeat": { "prefix": "|repeat", "body": "|repeat:${1:count}" }, | |
"|implode": { "prefix": "|implode", "body": "|implode:'${1:glue}'" }, | |
// Formatting | |
"|date": { "prefix": "|date", "body": "|date:'${1:format}'" }, | |
"|number": { "prefix": "|number", "body": "|number${1::${2:decimals}${3:,'${4:decPoint}'${5:,'${6:thousandsSep}'}}}" }, | |
"|bytes": { "prefix": "|bytes", "body": "|bytes${1::${2:precision}}" }, | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment