Last active
June 8, 2021 08:22
-
-
Save brrd/f7ec4073dac34ecedc0169939edae38d to your computer and use it in GitHub Desktop.
Lodel snippets for VSCode
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
{ | |
// Place your snippets for html here. Each snippet is defined under a snippet name and has a prefix, body and | |
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are: | |
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the | |
// same ids are connected. | |
// Example: | |
// "Print to console": { | |
// "prefix": "log", | |
// "body": [ | |
// "console.log('$1');", | |
// "$2" | |
// ], | |
// "description": "Log output to console" | |
// } | |
"context": { | |
"prefix": "context", | |
"body": [ | |
"<pre><?php var_dump($$context); ?></pre>" | |
], | |
"description": "Afficher le $context Lodel" | |
}, | |
"DEFMACRO": { | |
"prefix": "defmacro", | |
"body": [ | |
"/**", | |
" * ${1:Description}.", | |
" */", | |
"<DEFMACRO NAME=\"$2\">", | |
"\t$0", | |
"</DEFMACRO>" | |
], | |
"description": "DEFMACRO Lodel" | |
}, | |
"DEFFUNC": { | |
"prefix": "deffunc", | |
"body": [ | |
"/**", | |
" * ${1:Description}.", | |
" * @param {type} [nom] - Description du paramètre.", | |
" */", | |
"<DEFFUNC NAME=\"$2\" REQUIRED=\"$3\" OPTIONAL=\"$4\">", | |
"\t$0", | |
"</DEFFUNC>" | |
], | |
"description": "DEFFUNC Lodel" | |
}, | |
"MACRO": { | |
"prefix": "macro", | |
"body": [ | |
"<MACRO NAME=\"$1\"/>$0" | |
], | |
"description": "MACRO Lodel" | |
}, | |
"FUNC": { | |
"prefix": "func", | |
"body": [ | |
"<FUNC NAME=\"$1\" ${2:ATTRIBUTS}/>$0" | |
], | |
"description": "FUNC Lodel" | |
}, | |
"LOOP": { | |
"prefix": "loop", | |
"body": [ | |
"<LOOP NAME=\"$1\" TABLE=\"$2\" WHERE=\"$3\" SELECT=\"$4\" LIMIT=\"$5\" ORDER=\"$6\">", | |
"\t<BEFORE></BEFORE>", | |
"\t<DO>$0</DO>", | |
"\t<AFTER></AFTER>", | |
"\t<ALTERNATIVE></ALTERNATIVE>", | |
"</LOOP>" | |
], | |
"description": "LOOP Lodel" | |
}, | |
"IF": { | |
"prefix": "if", | |
"body": [ | |
"<IF COND=\"$1\">", | |
"\t$0", | |
"</IF>" | |
], | |
"description": "IF Lodel" | |
}, | |
"ELSE": { | |
"prefix": "else", | |
"body": [ | |
"<ELSE/>" | |
], | |
"description": "ELSE Lodel" | |
}, | |
"ELSEIF": { | |
"prefix": "elseif", | |
"body": [ | |
"<ELSEIF COND=\"$1\">", | |
"\t$0" | |
], | |
"description": "ELSEIF Lodel" | |
}, | |
"LET": { | |
"prefix": "let", | |
"body": [ | |
"<LET VAR=\"$1\" ${2:GLOBAL=\"1\"}>$0</LET>" | |
], | |
"description": "LET Lodel" | |
}, | |
"Commentaire Lodel": { | |
"prefix": "!", | |
"body": [ | |
"<!--[ $0 ]-->" | |
], | |
"description": "Commentaire Lodel" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment