I broke up with neovim....vim is my best friend now
This commit is contained in:
547
dot_vim/plugged/friendly-snippets/snippets/c.json
Normal file
547
dot_vim/plugged/friendly-snippets/snippets/c.json
Normal file
@@ -0,0 +1,547 @@
|
||||
{
|
||||
"Standard Starter Template": {
|
||||
"prefix": "sst",
|
||||
"body": [
|
||||
"#include <stdlib.h>",
|
||||
"#include <stdio.h>",
|
||||
"",
|
||||
"int main(int argc, char *argv[])",
|
||||
"{",
|
||||
"\t$0",
|
||||
"\treturn EXIT_SUCCESS;",
|
||||
"}"
|
||||
],
|
||||
"description": "Standard starter template for a tiny C program"
|
||||
},
|
||||
"Preprocessor Starter Template": {
|
||||
"prefix": "sstp",
|
||||
"body": [
|
||||
"// #define NDEBUG // disables assert()",
|
||||
"#include <stdlib.h>",
|
||||
"#include <stddef.h>",
|
||||
"#include <stdbool.h>",
|
||||
"#include <assert.h>",
|
||||
"#include <errno.h>",
|
||||
"#include <stdio.h>"
|
||||
],
|
||||
"description": "Preprocessor starter template for a C project"
|
||||
},
|
||||
"main() template": {
|
||||
"prefix": "main",
|
||||
"body": [
|
||||
"int main(int argc, char *argv[])",
|
||||
"{\n",
|
||||
"\t$0\n",
|
||||
"\treturn EXIT_SUCCESS;",
|
||||
"}"
|
||||
],
|
||||
"description": "Standard main function variant"
|
||||
},
|
||||
"main(void) template": {
|
||||
"prefix": "mainn",
|
||||
"body": [
|
||||
"int main(void)",
|
||||
"{\n",
|
||||
"\t$0\n",
|
||||
"\treturn EXIT_SUCCESS;",
|
||||
"}"
|
||||
],
|
||||
"description": "Void main function variant"
|
||||
},
|
||||
"#include <...>": {
|
||||
"prefix": "#inc",
|
||||
"body": ["#include <$0>"],
|
||||
"description": "Code snippet for #include <...>"
|
||||
},
|
||||
"#include \"...\"": {
|
||||
"prefix": "#Inc",
|
||||
"body": ["#include \"$0\""],
|
||||
"description": "Code snippet for #include \"...\""
|
||||
},
|
||||
"#define macro": {
|
||||
"prefix": "#def",
|
||||
"body": ["#define ${1:MACRO}"],
|
||||
"description": "Code snippet for a textual macro"
|
||||
},
|
||||
"#define macro()": {
|
||||
"prefix": "#deff",
|
||||
"body": ["#define ${1:MACRO}($2) ($3)"],
|
||||
"description": "Code snippet for a func-like macro"
|
||||
},
|
||||
"#if": {
|
||||
"prefix": "#if",
|
||||
"body": [
|
||||
"#if ${1:0}",
|
||||
"$0",
|
||||
"#endif /* if $1 */"
|
||||
],
|
||||
"description": "Code snippet for #if"
|
||||
},
|
||||
"#ifdef": {
|
||||
"prefix": "#ifdef",
|
||||
"body": [
|
||||
"#ifdef ${1:DEBUG}",
|
||||
"$0",
|
||||
"#endif /* ifdef $1 */"
|
||||
],
|
||||
"description": "Code snippet for #ifdef"
|
||||
},
|
||||
"#ifndef": {
|
||||
"prefix": "#ifndef",
|
||||
"body": [
|
||||
"#ifndef ${1:DEBUG}",
|
||||
"$0",
|
||||
"#endif /* ifndef $1 */"
|
||||
],
|
||||
"description": "Code snippet for #ifndef"
|
||||
},
|
||||
"include once": {
|
||||
"prefix": "once",
|
||||
"body": [
|
||||
"#ifndef ${1:FILE_H}",
|
||||
"#define $1\n",
|
||||
"$0\n",
|
||||
"#endif /* end of include guard: $1 */"
|
||||
],
|
||||
"description": "Header include guard"
|
||||
},
|
||||
"extern C": {
|
||||
"prefix": "nocpp",
|
||||
"body": [
|
||||
"#ifdef __cplusplus",
|
||||
"extern \"C\" {",
|
||||
"#endif\n",
|
||||
"$0\n",
|
||||
"#ifdef __cplusplus",
|
||||
"} /* extern \"C\" */",
|
||||
"#endif"
|
||||
],
|
||||
"description": "Disable C++ name mangling in C headers"
|
||||
},
|
||||
"#error": {
|
||||
"prefix": "#err",
|
||||
"body": ["#error \"$0\""],
|
||||
"description": "Code snippet for #error"
|
||||
},
|
||||
"#warning": {
|
||||
"prefix": "#warn",
|
||||
"body": ["#warning \"$0\""],
|
||||
"description": "Code snippet for #warning"
|
||||
},
|
||||
"if": {
|
||||
"prefix": "if",
|
||||
"body": [
|
||||
"if (${1:true}) {",
|
||||
"\t$0",
|
||||
"}"
|
||||
],
|
||||
"description": "Code snippet for if statement"
|
||||
},
|
||||
"if else": {
|
||||
"prefix": "ife",
|
||||
"body": [
|
||||
"if (${1:true}) {",
|
||||
"\t$2",
|
||||
"} else {",
|
||||
"\t$0",
|
||||
"}"
|
||||
],
|
||||
"description": "Code snippet for if with else"
|
||||
},
|
||||
"else": {
|
||||
"prefix": "el",
|
||||
"body": [
|
||||
"else {",
|
||||
"\t$0",
|
||||
"}"
|
||||
],
|
||||
"description": "Code snippet for else statement"
|
||||
},
|
||||
"else if": {
|
||||
"prefix": "elif",
|
||||
"body": [
|
||||
"else if (${1:true}) {",
|
||||
"\t$0",
|
||||
"}"
|
||||
],
|
||||
"description": "Code snippet for else-if statement"
|
||||
},
|
||||
"if 1L": {
|
||||
"prefix": "ifi",
|
||||
"body": ["if (${1:true}) $0;"],
|
||||
"description": "Code snippet for 1-line-if"
|
||||
},
|
||||
"else if 1L": {
|
||||
"prefix": "elifi",
|
||||
"body": ["else if (${1:true}) $0;"],
|
||||
"description": "Code snippet for 1-line-if"
|
||||
},
|
||||
"ternary": {
|
||||
"prefix": "t",
|
||||
"body": ["$1 ? $2 : $0"],
|
||||
"description": "Code snippet for ternary operator"
|
||||
},
|
||||
"switch": {
|
||||
"prefix": "switch",
|
||||
"body": [
|
||||
"switch (${1:switch_on}) {",
|
||||
"$0",
|
||||
"default:",
|
||||
"\t$2",
|
||||
"}"
|
||||
],
|
||||
"description": "Code snippet for switch statement"
|
||||
},
|
||||
"switch no default": {
|
||||
"prefix": "switchndef",
|
||||
"body": [
|
||||
"switch (${1:switch_on}) {",
|
||||
"$0",
|
||||
"}"
|
||||
],
|
||||
"description": "Code snippet for switch without default"
|
||||
},
|
||||
"case": {
|
||||
"prefix": "case",
|
||||
"body": [
|
||||
"case ${1:0}:",
|
||||
"\t$2",
|
||||
"\t${3:break;}"
|
||||
],
|
||||
"description": "Code snippet for case branch"
|
||||
},
|
||||
"case 1L": {
|
||||
"prefix": "casei",
|
||||
"body": ["case ${1:0}: $2;${3: break;}"],
|
||||
"description": "Code snippet for single-line case"
|
||||
},
|
||||
"while": {
|
||||
"prefix": "while",
|
||||
"body": [
|
||||
"while (${1:true}) {",
|
||||
"\t$0",
|
||||
"}"
|
||||
],
|
||||
"description": "Code snippet for while loop"
|
||||
},
|
||||
"do...while loop": {
|
||||
"prefix": "do",
|
||||
"body": [
|
||||
"do {",
|
||||
"\t$0",
|
||||
"} while(${1:false});"
|
||||
],
|
||||
"description": "Code snippet for do...while loop"
|
||||
},
|
||||
"return": {
|
||||
"prefix": "ret",
|
||||
"body": ["return $0;"],
|
||||
"description": "Code snippet for return statement"
|
||||
},
|
||||
"exit()": {
|
||||
"prefix": "ex",
|
||||
"body": ["exit($0);"],
|
||||
"description": "Code snippet for exit function"
|
||||
},
|
||||
"for": {
|
||||
"prefix": "for",
|
||||
"body": [
|
||||
"for (size_t ${2:i} = 0; $2 < ${1:count}; ++$2) {",
|
||||
"\t$0",
|
||||
"}"
|
||||
],
|
||||
"description": "Mostly used 'for' loop variant"
|
||||
},
|
||||
"for custom type": {
|
||||
"prefix": "fort",
|
||||
"body": [
|
||||
"for (${1:int} ${2:i} = 0; $2 < ${4:count}; ++$2) {",
|
||||
"\t$0",
|
||||
"}"
|
||||
],
|
||||
"description": "Mostly used 'for' loop variant with custom type"
|
||||
},
|
||||
"for non-zero start": {
|
||||
"prefix": "for1",
|
||||
"body": [
|
||||
"for (${1:size_t} ${2:i} = ${3:1}; $2 <= ${4:finish}; ++$2) {",
|
||||
"\t$0",
|
||||
"}"
|
||||
],
|
||||
"description": "'for' loop variant with non-zero start"
|
||||
},
|
||||
"for main() args": {
|
||||
"prefix": "forp",
|
||||
"body": [
|
||||
"for (int ${2:i} = ${1:1}; $2 < argc; ++$2) {",
|
||||
"\t$0",
|
||||
"}"
|
||||
],
|
||||
"description": "'for' loop variant with non-zero start"
|
||||
},
|
||||
"for reverse": {
|
||||
"prefix": "forr",
|
||||
"body": [
|
||||
"for (${1:size_t} ${2:i} = ${3:count}; $2 > ${4:0}; --$2) {",
|
||||
"\t$0",
|
||||
"}"
|
||||
],
|
||||
"description": "Mostly used reverse 'for' loop variant"
|
||||
},
|
||||
"for reverse custom": {
|
||||
"prefix": "forr1",
|
||||
"body": [
|
||||
"for (${1:int} ${2:i} = ${3:start}; $2 >= ${4:finish}; --$2) {",
|
||||
"\t$0",
|
||||
"}"
|
||||
],
|
||||
"description": "More custom reverse 'for' loop variant"
|
||||
},
|
||||
"for custom": {
|
||||
"prefix": "forc",
|
||||
"body": [
|
||||
"for (${1:size_t} ${2:i} = ${3:initval}; ${4:$2}; $2${5:++}) {",
|
||||
"\t$0",
|
||||
"}"
|
||||
],
|
||||
"description": "Code snippet for reverse 'for' loop"
|
||||
},
|
||||
"Function Declaration": {
|
||||
"prefix": "fund",
|
||||
"body": ["${2:void} ${1:fun}(${3:void});"],
|
||||
"description": "Declare a function"
|
||||
},
|
||||
"Define a function": {
|
||||
"prefix": "fun",
|
||||
"body": [
|
||||
"${2:void} ${1:fun}(${3:void})",
|
||||
"{",
|
||||
"\t$4",
|
||||
"}"
|
||||
],
|
||||
"description": "Code snippet for a function definition"
|
||||
},
|
||||
"Function with return var": {
|
||||
"prefix": "func",
|
||||
"body": [
|
||||
"${2:int} ${1:func}(${3:void})",
|
||||
"{",
|
||||
"\t$2 ${4:retval} = ${5:0};",
|
||||
"\t$6",
|
||||
"\treturn $4;",
|
||||
"}"
|
||||
],
|
||||
"description": "Define a function that uses a variable for return"
|
||||
},
|
||||
"Function with 1 parameter": {
|
||||
"prefix": "fun1",
|
||||
"body": [
|
||||
"${2:void} ${1:fun}(${3:Type1} ${4:Parm1})",
|
||||
"{",
|
||||
"\t$4",
|
||||
"}"
|
||||
],
|
||||
"description": "Define a function with 1 parameter"
|
||||
},
|
||||
"Function with 2 parameters": {
|
||||
"prefix": "fun2",
|
||||
"body": [
|
||||
"${2:void} ${1:fun}(${3:Type1} ${4:Parm1}, ${3:Type2} ${4:Parm2})",
|
||||
"{",
|
||||
"\t$4",
|
||||
"}"
|
||||
],
|
||||
"description": "Define a function with 2 parameters"
|
||||
},
|
||||
"Function with 3 parameters": {
|
||||
"prefix": "fun3",
|
||||
"body": [
|
||||
"${2:void} ${1:fun}(${3:Type1} ${4:Parm1}, ${3:Type2} ${4:Parm2}, ${3:Type3} ${4:Parm3})",
|
||||
"{",
|
||||
"\t$4",
|
||||
"}"
|
||||
],
|
||||
"description": "Define a function with 3 parameters"
|
||||
},
|
||||
"typedef": {
|
||||
"prefix": "td",
|
||||
"body": ["typedef ${1:void} ${2:Emptiness};"],
|
||||
"description": "Code snippet for typedef"
|
||||
},
|
||||
"Complicated typedef": {
|
||||
"prefix": "tdd",
|
||||
"body": ["typedef $0;"],
|
||||
"description": "Code snippet to typedef function,array,etc. type"
|
||||
},
|
||||
"typedef struct": {
|
||||
"prefix": "tdst",
|
||||
"body": ["typedef struct $1 ${1:Box};"],
|
||||
"description": "Code snippet for implicit struct typedef"
|
||||
},
|
||||
"typedef union": {
|
||||
"prefix": "tduo",
|
||||
"body": ["typedef union $1 ${1:Cell};"],
|
||||
"description": "Code snippet for implicit union typedef"
|
||||
},
|
||||
"typedef enum": {
|
||||
"prefix": "tdenum",
|
||||
"body": ["typedef enum $1 ${1:Numbers};"],
|
||||
"description": "Code snippet for implicit enum typedef"
|
||||
},
|
||||
"struct": {
|
||||
"prefix": "st",
|
||||
"body": [
|
||||
"struct ${1:MyStruct} {",
|
||||
"\t$2",
|
||||
"}$0;"
|
||||
],
|
||||
"description": "Code snippet for struct"
|
||||
},
|
||||
"struct type": {
|
||||
"prefix": "stt",
|
||||
"body": [
|
||||
"typedef struct $1 ${1:Box};",
|
||||
"struct $1 {",
|
||||
"\t$0",
|
||||
"};"
|
||||
],
|
||||
"description": "Define a type with struct"
|
||||
},
|
||||
"union": {
|
||||
"prefix": "uo",
|
||||
"body": [
|
||||
"union ${1:MyUnion} {",
|
||||
"\t$0",
|
||||
"};"
|
||||
],
|
||||
"description": "Code snippet for union"
|
||||
},
|
||||
"union type": {
|
||||
"prefix": "uot",
|
||||
"body": [
|
||||
"typedef union $1 ${1:Cell};",
|
||||
"union $1 {",
|
||||
"\t$0",
|
||||
"};"
|
||||
],
|
||||
"description": "Define a type with union"
|
||||
},
|
||||
"enum constant": {
|
||||
"prefix": "enumc",
|
||||
"body": ["enum { $0 };"],
|
||||
"description": "Define a constant with enum"
|
||||
},
|
||||
"enum": {
|
||||
"prefix": "enum",
|
||||
"body": [
|
||||
"enum ${1:MyEnum} {",
|
||||
"\t$0",
|
||||
"};"
|
||||
],
|
||||
"description": "Code snippet for enum"
|
||||
},
|
||||
"enum type": {
|
||||
"prefix": "enumt",
|
||||
"body": [
|
||||
"typedef enum $1 ${1:Numbers};",
|
||||
"enum $1 {",
|
||||
"\t$0",
|
||||
"};"
|
||||
],
|
||||
"description": "Define a type with enum"
|
||||
},
|
||||
"Print variable of type float (2 decimal places)": {
|
||||
"prefix": "pflo",
|
||||
"body": ["printf(\"$0 :>> %.2f\\n\", $0);"],
|
||||
"description": "Calls printf() to log value of variable of type float rounded to 2 decimal places"
|
||||
},
|
||||
"Print variable of type integer": {
|
||||
"prefix": "pint",
|
||||
"body": ["printf(\"$0 :>> %d\\n\", $0);"],
|
||||
"description": "Calls printf() to log value of variable of type signed integer"
|
||||
},
|
||||
"Print variable of type char": {
|
||||
"prefix": "pcha",
|
||||
"body": ["printf(\"$0 :>> %c\\n\", $0);"],
|
||||
"description": "Calls printf() to log value of variable of type char"
|
||||
},
|
||||
"Print variable of type pointer": {
|
||||
"prefix": "ppoint",
|
||||
"body": ["printf(\"$0 :>> %p\\n\", (void *) $0);"],
|
||||
"description": "Calls printf() to log value of variable of type pointer"
|
||||
},
|
||||
"Print variable of type size_t": {
|
||||
"prefix": "psiz",
|
||||
"body": ["printf(\"$0 :>> %zu\\n\", $0);"],
|
||||
"description": "Calls printf() to log value of variable of type size_t"
|
||||
},
|
||||
"printf": {
|
||||
"prefix": "printf",
|
||||
"body": ["printf(\"$1\\n\"$0);"],
|
||||
"description": "Generic printf() snippet"
|
||||
},
|
||||
"sprintf": {
|
||||
"prefix": "sprintf",
|
||||
"body": ["sprintf($1, \"$2\\n\"$0);"],
|
||||
"description": "Generic sprintf() snippet"
|
||||
},
|
||||
"fprintf": {
|
||||
"prefix": "fprintf",
|
||||
"body": ["fprintf(${1:stderr}, \"$2\\n\"$0);"],
|
||||
"description": "Generic fprintf() snippet"
|
||||
},
|
||||
"scanf": {
|
||||
"prefix": "scanf",
|
||||
"body": ["scanf(\"$1\"$0);"],
|
||||
"description": "Generic scanf() snippet"
|
||||
},
|
||||
"sscanf": {
|
||||
"prefix": "sscanf",
|
||||
"body": ["sscanf($1, \"$2\"$0);"],
|
||||
"description": "Generic sscanf() snippet"
|
||||
},
|
||||
"fscanf": {
|
||||
"prefix": "fscanf",
|
||||
"body": ["fscanf($1, \"$2\"$0);"],
|
||||
"description": "Generic fscanf() snippet"
|
||||
},
|
||||
"Allocate memory using malloc": {
|
||||
"prefix": "mal",
|
||||
"body": [
|
||||
"${1:int} *${2:v} = malloc(${3:1} * sizeof($1));",
|
||||
"",
|
||||
"if (!$2) {",
|
||||
"\tfprintf(stderr, \"Memory allocation failed!\\n\");",
|
||||
"\t$4;",
|
||||
"}",
|
||||
"$0",
|
||||
"free($2);"
|
||||
],
|
||||
"description": "Allocates memory to a pointer variable using malloc(), then deallocates using free()."
|
||||
},
|
||||
"Allocate memory using calloc": {
|
||||
"prefix": "cal",
|
||||
"body": [
|
||||
"${1:int} *${2:v} = calloc(${3:1}, sizeof($1));",
|
||||
"",
|
||||
"if (!$2) {",
|
||||
"\tfprintf(stderr, \"Memory allocation failed!\\n\");",
|
||||
"\t$4;",
|
||||
"}",
|
||||
"$0",
|
||||
"free($2);"
|
||||
],
|
||||
"description": "Allocates memory to a pointer variable using calloc(), then deallocates using free()."
|
||||
},
|
||||
"Create linked list": {
|
||||
"prefix": "clist",
|
||||
"body": [
|
||||
"typedef struct $1 ${1:Node};",
|
||||
"struct $1 {",
|
||||
"\t$0",
|
||||
"\t$1 *${2:next};",
|
||||
"};"
|
||||
],
|
||||
"description": "Creates a linked list template"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"ep0": {
|
||||
"prefix": "ep0",
|
||||
"body": [
|
||||
"exit program returning ${1:0}"
|
||||
],
|
||||
"description": "exit program returning [0]",
|
||||
"scope": "cobol,acucobol"
|
||||
},
|
||||
"sr0": {
|
||||
"prefix": "sr0",
|
||||
"body": [
|
||||
"stop run returning ${1:0}"
|
||||
],
|
||||
"description": "stop run returing [0]",
|
||||
"scope": "cobol,acucobol"
|
||||
},
|
||||
"gr0": {
|
||||
"prefix": "gr0",
|
||||
"body": [
|
||||
"goback returning ${1:0}"
|
||||
],
|
||||
"description": "goback returning [0]",
|
||||
"scope": "cobol,acucobol"
|
||||
}
|
||||
}
|
||||
2407
dot_vim/plugged/friendly-snippets/snippets/cobol/vscode_cobol.json
Normal file
2407
dot_vim/plugged/friendly-snippets/snippets/cobol/vscode_cobol.json
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,49 @@
|
||||
{
|
||||
"dialect": {
|
||||
"prefix": "dialect",
|
||||
"body": [
|
||||
"dialect\"${2|ans85,bs2000,bs2000-offload,cob370,cob371,cob372,entcobol,mf,mvs,os390,osvs,vsc21,vsc22,vsc23,vsc24|}\"",
|
||||
"$0"
|
||||
]
|
||||
},
|
||||
"sourceformat": {
|
||||
"prefix": "sourceformat",
|
||||
"body": [
|
||||
"sourceformat\"${2|free,variable,fixed|}\"",
|
||||
"$0"
|
||||
]
|
||||
},
|
||||
"jvmgen": {
|
||||
"prefix": "jvmgen",
|
||||
"body": [
|
||||
"jvmgen\"${2|sub|}\"",
|
||||
"$0"
|
||||
]
|
||||
},
|
||||
"ilgen": {
|
||||
"prefix": "ilgen",
|
||||
"body": [
|
||||
"ilgen\"${2|sub|}\"",
|
||||
"$0"
|
||||
]
|
||||
},
|
||||
"copypath": {
|
||||
"prefix": "copypath",
|
||||
"body": [
|
||||
"copypath\"\\$COBCPY;$1\"",
|
||||
"$0"
|
||||
]
|
||||
},
|
||||
"speed - native" : {
|
||||
"prefix" : "speed",
|
||||
"body" : [
|
||||
"nocheck",
|
||||
"fastcall",
|
||||
"fastinit",
|
||||
"nolinkcheck",
|
||||
"lnkalign",
|
||||
"noparamcountcheck",
|
||||
"$0"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
{
|
||||
"Job/ADDRSPC": {
|
||||
"scope": "JCL",
|
||||
"prefix": "ADDRSPC",
|
||||
"body": [
|
||||
"ADDRSPC=${2|VIRT,REAL|}${3|\\,|}"
|
||||
],
|
||||
"description": "ADDRSPC Parameter"
|
||||
},
|
||||
"JOB/BYTES": {
|
||||
"scope": "JCL",
|
||||
"prefix": "BYTES",
|
||||
"body": [
|
||||
"BYTES=${2:500},${3|CANCEL,DUMP,WARNING|}${4|\\,|}"
|
||||
],
|
||||
"description": "BYTES Parameter"
|
||||
},
|
||||
"Job/CARDS": {
|
||||
"scope": "JCL",
|
||||
"prefix": "CARDS",
|
||||
"body": [
|
||||
"CARDS=${2:500},${3|CANCEL,DUMP,WARNING|}${4|\\,|}"
|
||||
],
|
||||
"description": "CARDS Parameter"
|
||||
},
|
||||
"Job/COND": {
|
||||
"scope": "JCL",
|
||||
"prefix": "COND",
|
||||
"body": [
|
||||
"COND=(${2:0},${3|GT,GE,EQ,LT,LE,NE|},${4:STEPNAME})${5|\\,|}"
|
||||
],
|
||||
"description": "COND Parameter"
|
||||
},
|
||||
"Job/DISP": {
|
||||
"scope": "JCL",
|
||||
"prefix": "DISP",
|
||||
"body": [
|
||||
"DISP=${2|NEW,CATLG,DELETE|}"
|
||||
],
|
||||
"description" : "DISP Parameter, NEW = New data set, CATLG = Create a new catalog entry, DELETE = delete data set on abnormal termination"
|
||||
},
|
||||
"Job/LRECL": {
|
||||
"scope": "JCL",
|
||||
"prefix": "LRECL",
|
||||
"body": [
|
||||
"LRECL=${2|80,132|}"
|
||||
],
|
||||
"description" : "LRECL Parameter"
|
||||
},
|
||||
"Job/IEFBR14": {
|
||||
"scope": "JCL",
|
||||
"prefix": "IEFBR14",
|
||||
"body": [
|
||||
"//${2:STEPID01} EXEC PGM=IEFBR14",
|
||||
"$0"
|
||||
],
|
||||
"description" : "IEFBR14 Data set utility"
|
||||
},
|
||||
"Job/IEBGENER ": {
|
||||
"scope": "JCL",
|
||||
"prefix": "IEBGENER ",
|
||||
"body": [
|
||||
"//${2:STEPID01} EXEC PGM=IEBGENER ",
|
||||
"//SYSUT1 DD *",
|
||||
"${3}",
|
||||
"/*",
|
||||
"//SYSUT2 DD DISP=NEW,DSN=${4:A.B.C)",
|
||||
"//SYSPRINT DD SYSOUT=*",
|
||||
"$0"
|
||||
],
|
||||
"description" : "IEBGENER create/load a dataset"
|
||||
}
|
||||
}
|
||||
254
dot_vim/plugged/friendly-snippets/snippets/cpp.json
Normal file
254
dot_vim/plugged/friendly-snippets/snippets/cpp.json
Normal file
@@ -0,0 +1,254 @@
|
||||
{
|
||||
"for": {
|
||||
"prefix": "for",
|
||||
"body": [
|
||||
"for (${1:size_t} ${2:i} = ${3:0}; $2 < ${4:length}; $2++) {",
|
||||
"\t$0",
|
||||
"}"
|
||||
],
|
||||
"description": "Code snippet for 'for' loop"
|
||||
},
|
||||
"forr": {
|
||||
"prefix": "forr",
|
||||
"body": [
|
||||
"for (${1:size_t} ${2:i} = ${3:length} - 1; $2 >= ${4:0}; $2--) {",
|
||||
"\t$0",
|
||||
"}"
|
||||
],
|
||||
"description": "Code snippet for reverse 'for' loop"
|
||||
},
|
||||
"do": {
|
||||
"prefix": "do",
|
||||
"body": ["do", "{", "\t$0", "} while($1);"],
|
||||
"description": "Code snippet for do...while loop"
|
||||
},
|
||||
"while": {
|
||||
"prefix": "while",
|
||||
"body": ["while ($1)", "{", "\t$2", "}"],
|
||||
"description": ""
|
||||
},
|
||||
"foreach": {
|
||||
"prefix": "foreach",
|
||||
"body": ["for(${1:auto} ${2:var} : ${3:collection_to_loop})", "{", "\t$0", "}"],
|
||||
"description": "Code snippet for range-based for loop (c++11) statement"
|
||||
},
|
||||
"if": {
|
||||
"prefix": "if",
|
||||
"body": ["if ($1) {", "\t$0", "}"],
|
||||
"description": "Code snippet for if statement"
|
||||
},
|
||||
"else": {
|
||||
"prefix": "else",
|
||||
"body": ["else {", "\t$0", "}"],
|
||||
"description": "Code snippet for else statement"
|
||||
},
|
||||
"else if": {
|
||||
"prefix": "else if",
|
||||
"body": ["else if ($1) {", "\t$0", "}"],
|
||||
"description": "Code snippet for else-if statement"
|
||||
},
|
||||
"enum": {
|
||||
"prefix": "enum",
|
||||
"body": ["enum ${1:MyEnum} {", "\t$0", "};"],
|
||||
"description": "Code snippet for enum"
|
||||
},
|
||||
"enum class": {
|
||||
"prefix": "enum class",
|
||||
"body": ["enum class ${1:MyClass} {$0};"],
|
||||
"description": "Code snippet for enum class (c++11)"
|
||||
},
|
||||
"class": {
|
||||
"prefix": "class",
|
||||
"body": [
|
||||
"class ${1:MyClass}",
|
||||
"{",
|
||||
"public:",
|
||||
"\t$1();",
|
||||
"\t$1($1 &&) = default;",
|
||||
"\t$1(const $1 &) = default;",
|
||||
"\t$1 &operator=($1 &&) = default;",
|
||||
"\t$1 &operator=(const $1 &) = default;",
|
||||
"\t~$1();",
|
||||
"",
|
||||
"private:",
|
||||
"\t$2",
|
||||
"};",
|
||||
"",
|
||||
"$1::$1()",
|
||||
"{",
|
||||
"}",
|
||||
"",
|
||||
"$1::~$1()",
|
||||
"{",
|
||||
"}"
|
||||
],
|
||||
"description": "Code snippet for class"
|
||||
},
|
||||
"eclass": {
|
||||
"prefix": "eclass",
|
||||
"body": [
|
||||
"class ${1:MyClass}",
|
||||
"{",
|
||||
"public:",
|
||||
"\t$2",
|
||||
"private:",
|
||||
"\t$3",
|
||||
"};",
|
||||
""
|
||||
],
|
||||
"description": "Code snippet for empty class"
|
||||
},
|
||||
"qclass": {
|
||||
"prefix": "qclass",
|
||||
"body": [
|
||||
"class ${1:MyClass} : public QObject",
|
||||
"{",
|
||||
"\tQ_OBJECT;",
|
||||
"public:",
|
||||
"\nexplicit $1(QObject *parent = nullptr);",
|
||||
"\t$2",
|
||||
"signals:",
|
||||
"",
|
||||
"public slots:",
|
||||
"};",
|
||||
""
|
||||
],
|
||||
"description": "Code snippet for empty Qt class"
|
||||
},
|
||||
"classi": {
|
||||
"prefix": "classi",
|
||||
"body": [
|
||||
"class ${1:MyClass}",
|
||||
"{",
|
||||
"public:",
|
||||
"\t$1() = default;",
|
||||
"\t$1($1 &&) = default;",
|
||||
"\t$1(const $1 &) = default;",
|
||||
"\t$1 &operator=($1 &&) = default;",
|
||||
"\t$1 &operator=(const $1 &) = default;",
|
||||
"\t~$1() = default;",
|
||||
"",
|
||||
"private:",
|
||||
"\t$2",
|
||||
"};"
|
||||
],
|
||||
"description": "Code snippet for class with inline constructor/destructor"
|
||||
},
|
||||
"interface": {
|
||||
"prefix": "interface",
|
||||
"body": ["__interface I${1:Interface}", "{", "\t$0", "};"],
|
||||
"description": "Code snippet for interface (Visual C++)"
|
||||
},
|
||||
"namespace": {
|
||||
"prefix": "namespace",
|
||||
"body": ["namespace ${1:MyNamespace}", "{", "\t$0", "}"]
|
||||
},
|
||||
"#ifdef": {
|
||||
"prefix": "#ifdef",
|
||||
"body": ["#ifdef ${1:DEBUG}", "$0", "#endif // ${DEBUG}"],
|
||||
"description": "Code snippet for #ifdef"
|
||||
},
|
||||
"#ifndef": {
|
||||
"prefix": "#ifndef",
|
||||
"body": ["#ifndef ${1:DEBUG}", "$0", "#endif // !$1"],
|
||||
"description": "Code snippet for #ifndef"
|
||||
},
|
||||
"#if": {
|
||||
"prefix": "#if",
|
||||
"body": ["#if ${1:0}", "$0", "#endif // $1"],
|
||||
"description": "Code snippet for #if"
|
||||
},
|
||||
"struct": {
|
||||
"prefix": "struct",
|
||||
"body": ["struct ${1:MyStruct}", "{", "\t$0", "};"],
|
||||
"description": "Code snippet for struct"
|
||||
},
|
||||
"switch": {
|
||||
"prefix": "switch",
|
||||
"body": ["switch (${1:switch_on}) {", "\tdefault:", "\t\t$0", "\t\tbreak;", "}"],
|
||||
"description": "Code snippet for switch statement"
|
||||
},
|
||||
"try": {
|
||||
"prefix": "try",
|
||||
"body": [
|
||||
"try {",
|
||||
"\t",
|
||||
"}",
|
||||
"catch (const std::exception&) {",
|
||||
"\t$1",
|
||||
"}"
|
||||
],
|
||||
"description": "Code snippet for try catch"
|
||||
},
|
||||
"union": {
|
||||
"prefix": "union",
|
||||
"body": ["union ${1:MyUnion}", "{", "\t$0", "};"],
|
||||
"description": "Code snippet for union"
|
||||
},
|
||||
"cout": {
|
||||
"prefix": "cout",
|
||||
"body": ["std::cout << \"${1:message}\" << std::endl;"],
|
||||
"description": "Code snippet for printing to std::cout, provided the header is set"
|
||||
},
|
||||
"cin": {
|
||||
"prefix": "cin",
|
||||
"body": ["std::cin >> $1;"],
|
||||
"description": "Code snippet for std::cin, provided the header is set"
|
||||
},
|
||||
"printf": {
|
||||
"prefix": "printf",
|
||||
"body": ["printf(\"$1\\n\"$0);"],
|
||||
"description": "Generic printf() snippet"
|
||||
},
|
||||
"sprintf": {
|
||||
"prefix": "sprintf",
|
||||
"body": ["sprintf($1, \"$2\\n\"$0);"],
|
||||
"description": "Generic sprintf() snippet"
|
||||
},
|
||||
"fprintf": {
|
||||
"prefix": "fprintf",
|
||||
"body": ["fprintf(${1:stderr}, \"$2\\n\"$0);"],
|
||||
"description": "Generic fprintf() snippet"
|
||||
},
|
||||
"scanf": {
|
||||
"prefix": "scanf",
|
||||
"body": ["scanf(\"$1\"$0);"],
|
||||
"description": "Generic scanf() snippet"
|
||||
},
|
||||
"sscanf": {
|
||||
"prefix": "sscanf",
|
||||
"body": ["sscanf($1, \"$2\"$0);"],
|
||||
"description": "Generic sscanf() snippet"
|
||||
},
|
||||
"fscanf": {
|
||||
"prefix": "fscanf",
|
||||
"body": ["fscanf($1, \"$2\"$0);"],
|
||||
"description": "Generic fscanf() snippet"
|
||||
},
|
||||
"#inc": {
|
||||
"prefix": "#inc",
|
||||
"body": ["#include \"$0\""],
|
||||
"description": "Code snippet for #include \" \""
|
||||
},
|
||||
"#inc<": {
|
||||
"prefix": "#inc<",
|
||||
"body": ["#include <$0>"],
|
||||
"description": "Code snippet for #include < >"
|
||||
},
|
||||
"#def": {
|
||||
"prefix": "def",
|
||||
"body": ["#define $0"],
|
||||
"description": "Code snippet for #define \" \""
|
||||
},
|
||||
"Main function template": {
|
||||
"prefix": "main",
|
||||
"body": [
|
||||
"int main (int argc, char *argv[])",
|
||||
"{",
|
||||
"\t$1",
|
||||
"\treturn 0;",
|
||||
"}"
|
||||
],
|
||||
"description": "A standard main function for a C++ program"
|
||||
}
|
||||
}
|
||||
401
dot_vim/plugged/friendly-snippets/snippets/csharp.json
Normal file
401
dot_vim/plugged/friendly-snippets/snippets/csharp.json
Normal file
@@ -0,0 +1,401 @@
|
||||
{
|
||||
"Attribute using recommended pattern": {
|
||||
"prefix": "attribute",
|
||||
"body": [
|
||||
"[System.AttributeUsage(System.AttributeTargets.${1:All}, Inherited = ${2:false}, AllowMultiple = ${3:true})]",
|
||||
"sealed class ${4:My}Attribute : System.Attribute",
|
||||
"{",
|
||||
" // See the attribute guidelines at",
|
||||
" // http://go.microsoft.com/fwlink/?LinkId=85236",
|
||||
" readonly string positionalString;",
|
||||
" ",
|
||||
" // This is a positional argument",
|
||||
" public ${4:My}Attribute(string positionalString)",
|
||||
" {",
|
||||
" this.positionalString = positionalString;",
|
||||
" ",
|
||||
" // TODO: Implement code here",
|
||||
" ${5:throw new System.NotImplementedException();}",
|
||||
" }",
|
||||
" ",
|
||||
" public string PositionalString",
|
||||
" {",
|
||||
" get { return positionalString; }",
|
||||
" }",
|
||||
" ",
|
||||
" // This is a named argument",
|
||||
" public int NamedInt { get; set; }",
|
||||
"}"
|
||||
],
|
||||
"description": "Attribute using recommended pattern"
|
||||
},
|
||||
"Checked block": {
|
||||
"prefix": "checked",
|
||||
"body": ["checked", "{", " $0", "}"],
|
||||
"description": "Checked block"
|
||||
},
|
||||
"Class": {
|
||||
"prefix": "class",
|
||||
"body": ["class ${1:Name}", "{", " $0", "}"],
|
||||
"description": "Class"
|
||||
},
|
||||
"Console.WriteLine": {
|
||||
"prefix": "cw",
|
||||
"body": ["System.Console.WriteLine($0);"],
|
||||
"description": "Console.WriteLine"
|
||||
},
|
||||
"do...while loop": {
|
||||
"prefix": "do",
|
||||
"body": ["do", "{", " $0", "} while (${1:true});"],
|
||||
"description": "do...while loop"
|
||||
},
|
||||
"Else statement": {
|
||||
"prefix": "else",
|
||||
"body": ["else", "{", " $0", "}"],
|
||||
"description": "Else statement"
|
||||
},
|
||||
"Enum": {
|
||||
"prefix": "enum",
|
||||
"body": ["enum ${1:Name}", "{", " $0", "}"],
|
||||
"description": "Enum"
|
||||
},
|
||||
"Implementing Equals() according to guidelines": {
|
||||
"prefix": "equals",
|
||||
"body": [
|
||||
"// override object.Equals",
|
||||
"public override bool Equals(object obj)",
|
||||
"{",
|
||||
" //",
|
||||
" // See the full list of guidelines at",
|
||||
" // http://go.microsoft.com/fwlink/?LinkID=85237",
|
||||
" // and also the guidance for operator== at",
|
||||
" // http://go.microsoft.com/fwlink/?LinkId=85238",
|
||||
" //",
|
||||
" ",
|
||||
" if (obj == null || GetType() != obj.GetType())",
|
||||
" {",
|
||||
" return false;",
|
||||
" }",
|
||||
" ",
|
||||
" // TODO: write your implementation of Equals() here",
|
||||
" ${1:throw new System.NotImplementedException();}",
|
||||
" return base.Equals (obj);",
|
||||
"}",
|
||||
"",
|
||||
"// override object.GetHashCode",
|
||||
"public override int GetHashCode()",
|
||||
"{",
|
||||
" // TODO: write your implementation of GetHashCode() here",
|
||||
" ${2:throw new System.NotImplementedException();}",
|
||||
" return base.GetHashCode();",
|
||||
"}"
|
||||
],
|
||||
"description": "Implementing Equals() according to guidelines"
|
||||
},
|
||||
"Exception": {
|
||||
"prefix": "exception",
|
||||
"body": [
|
||||
"[System.Serializable]",
|
||||
"public class ${1:My}Exception : ${2:System.Exception}",
|
||||
"{",
|
||||
" public ${1:My}Exception() { }",
|
||||
" public ${1:My}Exception(string message) : base(message) { }",
|
||||
" public ${1:My}Exception(string message, System.Exception inner) : base(message, inner) { }",
|
||||
" protected ${1:My}Exception(",
|
||||
" System.Runtime.Serialization.SerializationInfo info,",
|
||||
" System.Runtime.Serialization.StreamingContext context) : base(info, context) { }",
|
||||
"}"
|
||||
],
|
||||
"description": "Exception"
|
||||
},
|
||||
"Foreach statement": {
|
||||
"prefix": "foreach",
|
||||
"body": [
|
||||
"foreach (${1:var} ${2:item} in ${3:collection})",
|
||||
"{",
|
||||
" $0",
|
||||
"}"
|
||||
],
|
||||
"description": "Foreach statement"
|
||||
},
|
||||
"Reverse for loop": {
|
||||
"prefix": "forr",
|
||||
"body": [
|
||||
"for (int ${1:i} = ${2:length} - 1; ${1:i} >= 0 ; ${1:i}--)",
|
||||
"{",
|
||||
" $0",
|
||||
"}"
|
||||
],
|
||||
"description": "Reverse for loop"
|
||||
},
|
||||
"for loop": {
|
||||
"prefix": "for",
|
||||
"body": [
|
||||
"for (int ${1:i} = 0; ${1:i} < ${2:length}; ${1:i}++)",
|
||||
"{",
|
||||
" $0",
|
||||
"}"
|
||||
],
|
||||
"description": "for loop"
|
||||
},
|
||||
"if statement": {
|
||||
"prefix": "if",
|
||||
"body": ["if (${1:true})", "{", " $0", "}"],
|
||||
"description": "if statement"
|
||||
},
|
||||
"else-if statement": {
|
||||
"prefix": "else if",
|
||||
"body": ["else if (${1:true})", "{", " $0", "}"],
|
||||
"description": "else-if statement"
|
||||
},
|
||||
"Indexer": {
|
||||
"prefix": "indexer",
|
||||
"body": [
|
||||
"${1:public} ${2:object} this[${3:int} index]",
|
||||
"{",
|
||||
" get { $4 }",
|
||||
" set { $0 }",
|
||||
"}"
|
||||
],
|
||||
"description": "Indexer"
|
||||
},
|
||||
"Interface": {
|
||||
"prefix": "interface",
|
||||
"body": ["interface I${1:Name}", "{", " $0", "}"],
|
||||
"description": "Interface"
|
||||
},
|
||||
"Safely invoking an event": {
|
||||
"prefix": "invoke",
|
||||
"body": [
|
||||
"${1:EventHandler} temp = ${2:MyEvent};",
|
||||
"if (temp != null)",
|
||||
"{",
|
||||
" temp($0);",
|
||||
"}"
|
||||
],
|
||||
"description": "Safely invoking an event"
|
||||
},
|
||||
"Simple iterator": {
|
||||
"prefix": "iterator",
|
||||
"body": [
|
||||
"public System.Collections.Generic.IEnumerator<${1:ElementType}> GetEnumerator()",
|
||||
"{",
|
||||
" $0throw new System.NotImplementedException();",
|
||||
" yield return default(${1:ElementType});",
|
||||
"}"
|
||||
],
|
||||
"description": "Simple iterator"
|
||||
},
|
||||
"Named iterator/indexer pair using a nested class": {
|
||||
"prefix": "iterindex",
|
||||
"body": [
|
||||
"public ${1:Name}Iterator ${1:Name}",
|
||||
"{",
|
||||
" get",
|
||||
" {",
|
||||
" return new ${1:Name}Iterator(this);",
|
||||
" }",
|
||||
"}",
|
||||
"",
|
||||
"public class ${1:Name}Iterator",
|
||||
"{",
|
||||
" readonly ${2:ClassName} outer;",
|
||||
" ",
|
||||
" internal ${1:Name}Iterator(${2:ClassName} outer)",
|
||||
" {",
|
||||
" this.outer = outer;",
|
||||
" }",
|
||||
" ",
|
||||
" // TODO: provide an appropriate implementation here",
|
||||
" public int Length { get { return 1; } }",
|
||||
" ",
|
||||
" public ${3:ElementType} this[int index]",
|
||||
" {",
|
||||
" get",
|
||||
" {",
|
||||
" //",
|
||||
" // TODO: implement indexer here",
|
||||
" //",
|
||||
" // you have full access to ${2:ClassName} privates",
|
||||
" //",
|
||||
" ${4:throw new System.NotImplementedException();}",
|
||||
" return default(${3:ElementType});",
|
||||
" }",
|
||||
" }",
|
||||
" ",
|
||||
" public System.Collections.Generic.IEnumerator<${3:ElementType}> GetEnumerator()",
|
||||
" {",
|
||||
" for (int i = 0; i < this.Length; i++)",
|
||||
" {",
|
||||
" yield return this[i];",
|
||||
" }",
|
||||
" }",
|
||||
"}"
|
||||
],
|
||||
"description": "Named iterator/indexer pair using a nested class"
|
||||
},
|
||||
"Lock statement": {
|
||||
"prefix": "lock",
|
||||
"body": ["lock (${1:this})", "{", " $0", "}"],
|
||||
"description": "Lock statement"
|
||||
},
|
||||
"MessageBox.Show": {
|
||||
"prefix": "mbox",
|
||||
"body": ["System.Windows.Forms.MessageBox.Show(\"${1:Text}\");$0"],
|
||||
"description": "MessageBox.Show"
|
||||
},
|
||||
"Namespace": {
|
||||
"prefix": "namespace",
|
||||
"body": ["namespace ${1:Name}", "{", " $0", "}"],
|
||||
"description": "Namespace"
|
||||
},
|
||||
"#if": {
|
||||
"prefix": "ifd",
|
||||
"body": ["#if ${1:true}", " $0", "#endif"],
|
||||
"description": "#if"
|
||||
},
|
||||
"#region": {
|
||||
"prefix": "region",
|
||||
"body": ["#region ${1:Name}", " $0", "#endregion"],
|
||||
"description": "#region"
|
||||
},
|
||||
"Property and backing field": {
|
||||
"prefix": "propfull",
|
||||
"body": [
|
||||
"private ${1:int} ${2:myVar};",
|
||||
"public ${1:int} ${3:MyProperty}",
|
||||
"{",
|
||||
" get { return ${2:myVar}; }",
|
||||
" set { ${2:myVar} = value; }",
|
||||
"}",
|
||||
"$0"
|
||||
],
|
||||
"description": "Property and backing field"
|
||||
},
|
||||
"propg": {
|
||||
"prefix": "propg",
|
||||
"body": ["public ${1:int} ${2:MyProperty} { get; private set; }$0"],
|
||||
"description": "An automatically implemented property with a 'get' accessor and a private 'set' accessor. C# 3.0 or higher"
|
||||
},
|
||||
"prop": {
|
||||
"prefix": "prop",
|
||||
"body": ["public ${1:int} ${2:MyProperty} { get; set; }$0"],
|
||||
"description": "An automatically implemented property. C# 3.0 or higher"
|
||||
},
|
||||
"sim": {
|
||||
"prefix": "sim",
|
||||
"body": [
|
||||
"static int Main(string[] args)",
|
||||
"{",
|
||||
" $0",
|
||||
" return 0;",
|
||||
"}"
|
||||
],
|
||||
"description": "int Main()"
|
||||
},
|
||||
"Struct": {
|
||||
"prefix": "struct",
|
||||
"body": ["struct ${1:Name}", "{", " $0", "}"],
|
||||
"description": "Struct"
|
||||
},
|
||||
"svm": {
|
||||
"prefix": "svm",
|
||||
"body": ["static void Main(string[] args)", "{", " $0", "}"],
|
||||
"description": "void Main()"
|
||||
},
|
||||
"Switch statement": {
|
||||
"prefix": "switch",
|
||||
"body": ["switch (${1:switch_on})", "{", " $0", " default:", "}"],
|
||||
"description": "Switch statement"
|
||||
},
|
||||
"Try finally": {
|
||||
"prefix": "tryf",
|
||||
"body": ["try", "{", " $1", "}", "finally", "{", " $0", "}"],
|
||||
"description": "Try finally"
|
||||
},
|
||||
"Try catch": {
|
||||
"prefix": "try",
|
||||
"body": [
|
||||
"try",
|
||||
"{",
|
||||
" $1",
|
||||
"}",
|
||||
"catch (${2:System.Exception})",
|
||||
"{",
|
||||
" $0",
|
||||
" throw;",
|
||||
"}"
|
||||
],
|
||||
"description": "Try catch"
|
||||
},
|
||||
"Unchecked block": {
|
||||
"prefix": "unchecked",
|
||||
"body": ["unchecked", "{", " $0", "}"],
|
||||
"description": "Unchecked block"
|
||||
},
|
||||
"Unsafe statement": {
|
||||
"prefix": "unsafe",
|
||||
"body": ["unsafe", "{", " $0", "}"],
|
||||
"description": "Unsafe statement"
|
||||
},
|
||||
"Using statement": {
|
||||
"prefix": "using",
|
||||
"body": ["using (${1:resource})", "{", " $0", "}"],
|
||||
"description": "Using statement"
|
||||
},
|
||||
"While loop": {
|
||||
"prefix": "while",
|
||||
"body": ["while (${1:true})", "{", " $0", "}"],
|
||||
"description": "While loop"
|
||||
},
|
||||
"constructor": {
|
||||
"prefix": "ctor",
|
||||
"body": [
|
||||
"${1:public} ${2:$TM_FILENAME_BASE}(${3:Parameters})",
|
||||
"{",
|
||||
" $0",
|
||||
"}"
|
||||
],
|
||||
"description": "constructor"
|
||||
},
|
||||
"xUnit Test": {
|
||||
"prefix": "fact",
|
||||
"body": [
|
||||
"[Fact]",
|
||||
"public void ${1:TestName}()",
|
||||
"{",
|
||||
"//Given",
|
||||
"",
|
||||
"//When",
|
||||
"",
|
||||
"//Then",
|
||||
"}$0"
|
||||
],
|
||||
"description": "create xunit test method"
|
||||
},
|
||||
"Creates a Method structure": {
|
||||
"prefix": "method",
|
||||
"body": [
|
||||
"${1:public} ${2:void} ${3:MyMethod}(${4:string} ${5:parameter})",
|
||||
"{",
|
||||
"\t$0",
|
||||
"}"
|
||||
],
|
||||
"description": "Creates a Method structure"
|
||||
},
|
||||
"Creates an Async Method structure": {
|
||||
"prefix": "method_async",
|
||||
"body": [
|
||||
"${1:public} async ${2:Task}<${3:object}> ${4:MyMethodAsync}(${5:string} ${6:parameter})",
|
||||
"{",
|
||||
"\t$0",
|
||||
"}"
|
||||
],
|
||||
"description": "Creates an async Method structure"
|
||||
},
|
||||
"cls": {
|
||||
"prefix": "cls",
|
||||
"body": ["${1:public} class ${2:$TM_FILENAME_BASE}", "{", "\t$0", "}"],
|
||||
"description": "Create new class"
|
||||
}
|
||||
}
|
||||
651
dot_vim/plugged/friendly-snippets/snippets/css.json
Normal file
651
dot_vim/plugged/friendly-snippets/snippets/css.json
Normal file
@@ -0,0 +1,651 @@
|
||||
{
|
||||
"align-items": {
|
||||
"prefix": "ai",
|
||||
"body": "align-items: ${1|flex-start,flex-end,center,baseline,stretch,start,end,self-start,self-end|};",
|
||||
"description": "initial value: stretch"
|
||||
},
|
||||
"align-items: baseline": {
|
||||
"prefix": "aib",
|
||||
"body": "align-items: baseline;"
|
||||
},
|
||||
"align-items: center": {
|
||||
"prefix": "aic",
|
||||
"body": "align-items: center;"
|
||||
},
|
||||
"align-items: flex-start": {
|
||||
"prefix": "aifs",
|
||||
"body": "align-items: flex-start;"
|
||||
},
|
||||
"align-items: flex-end": {
|
||||
"prefix": "aife",
|
||||
"body": "align-items: flex-end;"
|
||||
},
|
||||
"align-items: stretch": {
|
||||
"prefix": "ais",
|
||||
"body": "align-items: stretch;"
|
||||
},
|
||||
"align-self": {
|
||||
"prefix": "as",
|
||||
"body": "align-items: ${1|flex-start,flex-end,center,baseline,stretch,auto|};",
|
||||
"description": "initial value: auto"
|
||||
},
|
||||
"animation": {
|
||||
"prefix": "ani",
|
||||
"body": "animation: ${1:name} ${2:1s} ${3|linear,ease-in-out,ease,ease-in,ease-out,step-start,step-end,steps,cubic-bezier|};",
|
||||
"description": "animation: name duration timing-function delay direction count fill-mode play-state"
|
||||
},
|
||||
"animation-delay": {
|
||||
"prefix": "anide",
|
||||
"body": "animation-delay: ${0:1s};"
|
||||
},
|
||||
"animation-direction": {
|
||||
"prefix": "anidi",
|
||||
"body": "animation-direction: ${1|alternate,alternate-reverse,reverse,normal|};",
|
||||
"description": "initial value: normal"
|
||||
},
|
||||
"animation-duratuion": {
|
||||
"prefix": "anidu",
|
||||
"body": "animation-duration: ${0:1s};"
|
||||
},
|
||||
"animation-fill-mode": {
|
||||
"prefix": "anifm",
|
||||
"body": "animation-fill-mode: ${1|forwards,backwards,both,none|};",
|
||||
"description": "initial value: none"
|
||||
},
|
||||
"animation-iteration-count": {
|
||||
"prefix": "aniic",
|
||||
"body": "animation-iteration-count: ${0:infinite};",
|
||||
"description": "initial value: 1"
|
||||
},
|
||||
"animation-name": {
|
||||
"prefix": "anin",
|
||||
"body": "animation-name: ${0:name};"
|
||||
},
|
||||
"animation-play-state": {
|
||||
"prefix": "anips",
|
||||
"body": "animation-play-state: ${1|paused,running|};",
|
||||
"description": "initial value: running"
|
||||
},
|
||||
"animation-timing-function": {
|
||||
"prefix": "anitf",
|
||||
"body": "animation-timing-function: ${1|linear,ease,ease-in-out,ease-in,ease-out,step-start,step-end,steps,cubic-bezier|};",
|
||||
"description": "initial value: ease"
|
||||
},
|
||||
"background": {
|
||||
"prefix": "bg",
|
||||
"body": "background: ${0:#fff};",
|
||||
"description": "background: image position/size repeat attachment box box"
|
||||
},
|
||||
"background-attachment": {
|
||||
"prefix": "bga",
|
||||
"body": "background-attachment: ${1|fixed,scroll,local|};",
|
||||
"description": "initial value: scroll"
|
||||
},
|
||||
"background-color": {
|
||||
"prefix": "bgc",
|
||||
"body": "background-color: ${0:#fff};"
|
||||
},
|
||||
"background-clip": {
|
||||
"prefix": "bgcl",
|
||||
"body": "background-clip: ${1|border-box,padding-box,content-box,text|};",
|
||||
"description": "initial value: border-box"
|
||||
},
|
||||
"background-image": {
|
||||
"prefix": "bgi",
|
||||
"body": "background-image: url('${0:background.jpg}');"
|
||||
},
|
||||
"background-origin": {
|
||||
"prefix": "bgo",
|
||||
"body": "background-origin: ${1|border-box,padding-box,content-box|};",
|
||||
"description": "initial value: padding-box"
|
||||
},
|
||||
"background-position": {
|
||||
"prefix": "bgp",
|
||||
"body": "background-position: ${1:left} ${2:top};"
|
||||
},
|
||||
"background-repeat": {
|
||||
"prefix": "bgr",
|
||||
"body": "background-repeat: ${1|no-repeat,repeat-x,repeat-y,repeat,space,round|};",
|
||||
"description": "initial value: repeat"
|
||||
},
|
||||
"background-repeat: repeat": {
|
||||
"prefix": "bgrr",
|
||||
"body": "background-repeat: repeat;"
|
||||
},
|
||||
"background-repeat: repeat-x": {
|
||||
"prefix": "bgrx",
|
||||
"body": "background-repeat: repeat-x;"
|
||||
},
|
||||
"background-repeat: repeat-y": {
|
||||
"prefix": "bgry",
|
||||
"body": "background-repeat: repeat-y;"
|
||||
},
|
||||
"background-repeat: no-repeat": {
|
||||
"prefix": "bgrn",
|
||||
"body": "background-repeat: no-repeat;"
|
||||
},
|
||||
"background-size": {
|
||||
"prefix": "bgs",
|
||||
"body": "background-size: ${0:cover};"
|
||||
},
|
||||
"border": {
|
||||
"prefix": "bor",
|
||||
"body": "border: ${1:1px} ${2|solid,dashed,dotted,double,groove,ridge,inset,outset,none,hidden|} ${0:#000};"
|
||||
},
|
||||
"border: none": {
|
||||
"prefix": "born",
|
||||
"body": "border: none;"
|
||||
},
|
||||
"border-color": {
|
||||
"prefix": "borc",
|
||||
"body": "border-color: ${0:#000};"
|
||||
},
|
||||
"border-style": {
|
||||
"prefix": "bors",
|
||||
"body": "border-style: ${1|solid,dashed,dotted,double,groove,ridge,inset,outset,none,hidden|};"
|
||||
},
|
||||
"border-width": {
|
||||
"prefix": "borw",
|
||||
"body": "border-width: ${0:1px};"
|
||||
},
|
||||
"border-bottom": {
|
||||
"prefix": "borb",
|
||||
"body": "border-bottom: ${1:1px} ${2|solid,dashed,dotted,double,groove,ridge,inset,outset,none,hidden|} ${0:#000};"
|
||||
},
|
||||
"border-left": {
|
||||
"prefix": "borl",
|
||||
"body": "border-left: ${1:1px} ${2|solid,dashed,dotted,double,groove,ridge,inset,outset,none,hidden|} ${0:#000};"
|
||||
},
|
||||
"border-right": {
|
||||
"prefix": "borr",
|
||||
"body": "border-right: ${1:1px} ${2|solid,dashed,dotted,double,groove,ridge,inset,outset,none,hidden|} ${0:#000};"
|
||||
},
|
||||
"border-top": {
|
||||
"prefix": "bort",
|
||||
"body": "border-top: ${1:1px} ${2|solid,dashed,dotted,double,groove,ridge,inset,outset,none,hidden|} ${0:#000};"
|
||||
},
|
||||
"border-radius": {
|
||||
"prefix": "br",
|
||||
"body": "border-radius: ${0:2px};"
|
||||
},
|
||||
"bottom": {
|
||||
"prefix": "bot",
|
||||
"body": "bottom: ${0:0};"
|
||||
},
|
||||
"box-shadow": {
|
||||
"prefix": "bos",
|
||||
"body": "box-shadow: ${1:1px} ${2:1px} ${3:1px} ${4:1px} ${0:rgba(0, 0, 0, .5)};",
|
||||
"description": "box-shadow: x-offset y-offset blur spread color"
|
||||
},
|
||||
"box-sizing": {
|
||||
"prefix": "boz",
|
||||
"body": "box-sizing: ${1|border-box,content-box|};",
|
||||
"description": "initial value: content-box"
|
||||
},
|
||||
"clear": {
|
||||
"prefix": "clr",
|
||||
"body": "clear: ${1|both,left,right,none|};"
|
||||
},
|
||||
"color": {
|
||||
"prefix": "col",
|
||||
"body": "color: ${0:#000};"
|
||||
},
|
||||
"content": {
|
||||
"prefix": "con",
|
||||
"body": "content: '$0';"
|
||||
},
|
||||
"cursor": {
|
||||
"prefix": "cur",
|
||||
"body": "cursor: ${1|auto,default,alias,cell,copy,crosshair,context-menu,help,grab,grabbing,move,none,no-drop,not-allowed,pointer,progress,e-resize,all-scroll,text,wait,vertical-text,zoom-in,zoom-out|};",
|
||||
"description": "initial value: auto"
|
||||
},
|
||||
"cursor: pointer": {
|
||||
"prefix": "curp",
|
||||
"body": "cursor: pointer;"
|
||||
},
|
||||
"cursor: default": {
|
||||
"prefix": "curd",
|
||||
"body": "cursor: default;"
|
||||
},
|
||||
"display": {
|
||||
"prefix": "dis",
|
||||
"body": "display: ${1|none,block,inline,inline-block,flex,inline-flex,list-item,table,inline-table,table-caption,table-cell,table-row,table-row-group,table-column|};"
|
||||
},
|
||||
"display: block": {
|
||||
"prefix": "disb",
|
||||
"body": "display: block;"
|
||||
},
|
||||
"display: inline-block": {
|
||||
"prefix": "disi",
|
||||
"body": "display: inline-block;"
|
||||
},
|
||||
"display: none": {
|
||||
"prefix": "disn",
|
||||
"body": "display: none;"
|
||||
},
|
||||
"display: flex": {
|
||||
"prefix": "disf",
|
||||
"body": "display: flex;"
|
||||
},
|
||||
"flex": {
|
||||
"prefix": "flex",
|
||||
"body": "flex: ${1:1} ${2:1} ${3:auto};",
|
||||
"description": "flex: grow shrink basis"
|
||||
},
|
||||
"flex (alt)": {
|
||||
"prefix": "fle",
|
||||
"body": "flex: ${1:1} ${2:1} ${3:auto};"
|
||||
},
|
||||
"flex-direction": {
|
||||
"prefix": "fld",
|
||||
"body": "flex-direction: ${1|row,row-reverse,column,column-reverse|};",
|
||||
"description": "initial value: row"
|
||||
},
|
||||
"flex-direction: row": {
|
||||
"prefix": "fldr",
|
||||
"body": "flex-direction: row;"
|
||||
},
|
||||
"flex-direction: column": {
|
||||
"prefix": "fldc",
|
||||
"body": "flex-direction: column;"
|
||||
},
|
||||
"flex-flow": {
|
||||
"prefix": "flf",
|
||||
"body": "flex-flow: ${1|row,row-reverse,column,column-reverse|} ${2|wrap,wrap-reverse,nowrap|};"
|
||||
},
|
||||
"flex-wrap": {
|
||||
"prefix": "flw",
|
||||
"body": "flex-wrap: ${1|wrap,wrap-reverse,nowrap|};",
|
||||
"description": "initial value: nowrap"
|
||||
},
|
||||
"float": {
|
||||
"prefix": "fl",
|
||||
"body": "float: ${1|left,right,none|};"
|
||||
},
|
||||
"float: left": {
|
||||
"prefix": "fll",
|
||||
"body": "float: left;"
|
||||
},
|
||||
"float: right": {
|
||||
"prefix": "flr",
|
||||
"body": "float: right;"
|
||||
},
|
||||
"float: none": {
|
||||
"prefix": "fln",
|
||||
"body": "float: none;"
|
||||
},
|
||||
"font-family": {
|
||||
"prefix": "ff",
|
||||
"body": "font-family: ${0:arial};"
|
||||
},
|
||||
"font-size": {
|
||||
"prefix": "fz",
|
||||
"body": "font-size: ${0:12px};"
|
||||
},
|
||||
"font-style": {
|
||||
"prefix": "fst",
|
||||
"body": "font-style: ${1|italic,oblique,normal|};"
|
||||
},
|
||||
"font-style: italic": {
|
||||
"prefix": "fsti",
|
||||
"body": "font-style: italic;"
|
||||
},
|
||||
"font-style: normal": {
|
||||
"prefix": "fstn",
|
||||
"body": "font-style: normal;"
|
||||
},
|
||||
"font-style: oblique": {
|
||||
"prefix": "fsto",
|
||||
"body": "font-style: oblique;"
|
||||
},
|
||||
"font-weight": {
|
||||
"prefix": "fw",
|
||||
"body": "font-weight: ${0:bold};"
|
||||
},
|
||||
"font-weight: bold": {
|
||||
"prefix": "fwb",
|
||||
"body": "font-weight: bold;"
|
||||
},
|
||||
"font-weight: light": {
|
||||
"prefix": "fwl",
|
||||
"body": "font-weight: light;"
|
||||
},
|
||||
"font-weight: normal": {
|
||||
"prefix": "fwn",
|
||||
"body": "font-weight: normal;"
|
||||
},
|
||||
"font": {
|
||||
"prefix": "ft",
|
||||
"body": "font: ${0:12px/1.5};",
|
||||
"description": "font: [weight style variant stretch] size/line-height family"
|
||||
},
|
||||
"height": {
|
||||
"prefix": "hei",
|
||||
"body": "height: ${0:1px};"
|
||||
},
|
||||
"justify-content": {
|
||||
"prefix": "jc",
|
||||
"body": "justify-content: ${1|flex-start,flex-end,center,space-between,space-around|};",
|
||||
"description": "initial value: flex-start"
|
||||
},
|
||||
"justify-content: flex-start": {
|
||||
"prefix": "jcfs",
|
||||
"body": "justify-content: flex-start;"
|
||||
},
|
||||
"justify-content: flex-end": {
|
||||
"prefix": "jcfe",
|
||||
"body": "justify-content: flex-end;"
|
||||
},
|
||||
"justify-content: center": {
|
||||
"prefix": "jcc",
|
||||
"body": "justify-content: center;"
|
||||
},
|
||||
"justify-content: space-around": {
|
||||
"prefix": "jcsa",
|
||||
"body": "justify-content: space-around;"
|
||||
},
|
||||
"justify-content: space-between": {
|
||||
"prefix": "jcsb",
|
||||
"body": "justify-content: space-between;"
|
||||
},
|
||||
"list-style": {
|
||||
"prefix": "lis",
|
||||
"body": "list-style: ${1|disc,circle,square,decimal,lower-roman,upper-roman,lower-alpha,upper-alpha,none,armenian,cjk-ideographic,georgian,lower-greek,hebrew,hiragana,hiragana-iroha,katakana,katakana-iroha,lower-latin,upper-latin|} ${2|outside,inside|};",
|
||||
"description": "list-style: type position image"
|
||||
},
|
||||
"list-style-position": {
|
||||
"prefix": "lisp",
|
||||
"body": "${1|outside,inside|}",
|
||||
"description": "initial value: outside"
|
||||
},
|
||||
"list-style-type": {
|
||||
"prefix": "list",
|
||||
"body": "list-style-type: ${1|disc,circle,square,decimal,lower-roman,upper-roman,lower-alpha,upper-alpha,none,armenian,cjk-ideographic,georgian,lower-greek,hebrew,hiragana,hiragana-iroha,katakana,katakana-iroha,lower-latin,upper-latin|};",
|
||||
"description": "initial value: disc"
|
||||
},
|
||||
"list-style-type: circle": {
|
||||
"prefix": "listc",
|
||||
"body": "list-style-type: circle;"
|
||||
},
|
||||
"list-style-type: disc": {
|
||||
"prefix": "listd",
|
||||
"body": "list-style-type: disc;"
|
||||
},
|
||||
"list-style-type: none": {
|
||||
"prefix": "listn",
|
||||
"body": "list-style-type: none;"
|
||||
},
|
||||
"list-style-type: square": {
|
||||
"prefix": "lists",
|
||||
"body": "list-style-type: square;"
|
||||
},
|
||||
"list-style-type: lower-roman": {
|
||||
"prefix": "listlr",
|
||||
"body": "list-style-type: lower-roman;"
|
||||
},
|
||||
"list-style-type: upper-roman": {
|
||||
"prefix": "listur",
|
||||
"body": "list-style-type: upper-roman;"
|
||||
},
|
||||
"left": {
|
||||
"prefix": "lef",
|
||||
"body": "left: ${0:0};"
|
||||
},
|
||||
"line-height": {
|
||||
"prefix": "lh",
|
||||
"body": "line-height: ${0:1.5};"
|
||||
},
|
||||
"letter-spacing": {
|
||||
"prefix": "ls",
|
||||
"body": "letter-spacing: ${0:2px};"
|
||||
},
|
||||
"letter-spacing: normal": {
|
||||
"prefix": "lsn",
|
||||
"body": "letter-spacing: normal;"
|
||||
},
|
||||
"margin": {
|
||||
"prefix": "mar",
|
||||
"body": "margin: ${0:0};"
|
||||
},
|
||||
"margin-bottom": {
|
||||
"prefix": "marb",
|
||||
"body": "margin-bottom: ${0:0};"
|
||||
},
|
||||
"margin-left": {
|
||||
"prefix": "marl",
|
||||
"body": "margin-left: ${0:0};"
|
||||
},
|
||||
"margin-right": {
|
||||
"prefix": "marr",
|
||||
"body": "margin-right: ${0:0};"
|
||||
},
|
||||
"margin-top": {
|
||||
"prefix": "mart",
|
||||
"body": "margin-top: ${0:0};"
|
||||
},
|
||||
"margin: 0 auto": {
|
||||
"prefix": "mara",
|
||||
"body": "margin: 0 auto;"
|
||||
},
|
||||
"min-height": {
|
||||
"prefix": "mih",
|
||||
"body": "min-height: ${0:1px};"
|
||||
},
|
||||
"min-width": {
|
||||
"prefix": "miw",
|
||||
"body": "min-width: ${0:1px};"
|
||||
},
|
||||
"max-height": {
|
||||
"prefix": "mah",
|
||||
"body": "max-height: ${0:1px};"
|
||||
},
|
||||
"max-width": {
|
||||
"prefix": "maw",
|
||||
"body": "max-width: ${0:1px};"
|
||||
},
|
||||
"opacity": {
|
||||
"prefix": "opa",
|
||||
"body": "opacity: ${0:0};"
|
||||
},
|
||||
"overflow": {
|
||||
"prefix": "ov",
|
||||
"body": "overflow: ${1|visible,hidden,scroll,auto,clip|};"
|
||||
},
|
||||
"overflow: auto": {
|
||||
"prefix": "ova",
|
||||
"body": "overflow: auto;"
|
||||
},
|
||||
"overflow: hidden": {
|
||||
"prefix": "ovh",
|
||||
"body": "overflow: hidden;"
|
||||
},
|
||||
"overflow: scroll": {
|
||||
"prefix": "ovs",
|
||||
"body": "overflow: scroll;"
|
||||
},
|
||||
"overflow: visible": {
|
||||
"prefix": "ovv",
|
||||
"body": "overflow: visible;"
|
||||
},
|
||||
"padding": {
|
||||
"prefix": "pad",
|
||||
"body": "padding: ${0:0};"
|
||||
},
|
||||
"padding-bottom": {
|
||||
"prefix": "padb",
|
||||
"body": "padding-bottom: ${0:0};"
|
||||
},
|
||||
"padding-left": {
|
||||
"prefix": "padl",
|
||||
"body": "padding-left: ${0:0};"
|
||||
},
|
||||
"padding-right": {
|
||||
"prefix": "padr",
|
||||
"body": "padding-right: ${0:0};"
|
||||
},
|
||||
"padding-top": {
|
||||
"prefix": "padt",
|
||||
"body": "padding-top: ${0:0};"
|
||||
},
|
||||
"position": {
|
||||
"prefix": "pos",
|
||||
"body": "position: ${1|relative,absolute,fixed,sticky,static|};"
|
||||
},
|
||||
"position absolute": {
|
||||
"prefix": "posa",
|
||||
"body": "position: absolute;"
|
||||
},
|
||||
"position fixed": {
|
||||
"prefix": "posf",
|
||||
"body": "position: fixed;"
|
||||
},
|
||||
"position relative": {
|
||||
"prefix": "posr",
|
||||
"body": "position: relative;"
|
||||
},
|
||||
"position sticky": {
|
||||
"prefix": "poss",
|
||||
"body": "position: sticky;"
|
||||
},
|
||||
"right": {
|
||||
"prefix": "rig",
|
||||
"body": "right: ${0:0};"
|
||||
},
|
||||
"text-align": {
|
||||
"prefix": "ta",
|
||||
"body": "text-align: ${1|center,left,right,justify,start,end|};"
|
||||
},
|
||||
"text-align: center": {
|
||||
"prefix": "tac",
|
||||
"body": "text-align: center;"
|
||||
},
|
||||
"text-align: left": {
|
||||
"prefix": "tal",
|
||||
"body": "text-align: left;"
|
||||
},
|
||||
"text-align: right": {
|
||||
"prefix": "tar",
|
||||
"body": "text-align: right;"
|
||||
},
|
||||
"text-decoration": {
|
||||
"prefix": "td",
|
||||
"body": "text-decoration: ${1|none,underline,overline,line-through|};"
|
||||
},
|
||||
"text-decoration: underline": {
|
||||
"prefix": "tdu",
|
||||
"body": "text-decoration: underline;"
|
||||
},
|
||||
"text-decoration: none": {
|
||||
"prefix": "tdn",
|
||||
"body": "text-decoration: none;"
|
||||
},
|
||||
"text-decoration: line-through": {
|
||||
"prefix": "tdl",
|
||||
"body": "text-decoration: line-through;"
|
||||
},
|
||||
"text-indent": {
|
||||
"prefix": "ti",
|
||||
"body": "text-indent: ${0:2em};"
|
||||
},
|
||||
"text-shadow": {
|
||||
"prefix": "ts",
|
||||
"body": "text-shadow: ${1:1px} ${2:1px} ${3:1px} ${4:1px} ${0:rgba(0, 0, 0, .5)};",
|
||||
"description": "text-shadow: x-offset y-offset blur spread color"
|
||||
},
|
||||
"text-transform": {
|
||||
"prefix": "tt",
|
||||
"body": "text-transform: ${1|capitalize,uppercase,lowercase,full-width,none|};"
|
||||
},
|
||||
"top": {
|
||||
"prefix": "top",
|
||||
"body": "top: ${0:0};"
|
||||
},
|
||||
"vertical-align": {
|
||||
"prefix": "va",
|
||||
"body": "vertical-align: ${1|baseline,middle,top,bottom,sub,super,text-top,text-bottom|};"
|
||||
},
|
||||
"vertical-align: bottom": {
|
||||
"prefix": "vab",
|
||||
"body": "vertical-align: bottom;"
|
||||
},
|
||||
"vertical-align: middle": {
|
||||
"prefix": "vam",
|
||||
"body": "vertical-align: middle;"
|
||||
},
|
||||
"vertical-align: top": {
|
||||
"prefix": "vat",
|
||||
"body": "vertical-align: top;"
|
||||
},
|
||||
"visibility": {
|
||||
"prefix": "vis",
|
||||
"body": "visibility: ${1|visible,hidden,collapse|};"
|
||||
},
|
||||
"visibility: visible": {
|
||||
"prefix": "visv",
|
||||
"body": "visibility: visible;"
|
||||
},
|
||||
"visibility: hidden": {
|
||||
"prefix": "vish",
|
||||
"body": "visibility: hidden;"
|
||||
},
|
||||
"word-break": {
|
||||
"prefix": "wb",
|
||||
"body": "word-break: ${1|break-all,keep-all,break-word,normal|};"
|
||||
},
|
||||
"width": {
|
||||
"prefix": "wid",
|
||||
"body": "width: ${0:0};"
|
||||
},
|
||||
"width: auto": {
|
||||
"prefix": "wida",
|
||||
"body": "width: auto;"
|
||||
},
|
||||
"white-space": {
|
||||
"prefix": "ws",
|
||||
"body": "white-space: ${1|nowrap,pre,pre-wrap,pre-line,normal|};"
|
||||
},
|
||||
"white-space: nowrap": {
|
||||
"prefix": "wsn",
|
||||
"body": "white-space: nowrap;"
|
||||
},
|
||||
"white-space: pre": {
|
||||
"prefix": "wsp",
|
||||
"body": "white-space: pre;"
|
||||
},
|
||||
"word-wrap": {
|
||||
"prefix": "ww",
|
||||
"body": "word-wrap: ${1|break-word,break-spaces,normal|};"
|
||||
},
|
||||
"z-index": {
|
||||
"prefix": "zi",
|
||||
"body": "z-index: ${0:-1};"
|
||||
},
|
||||
"@import": {
|
||||
"prefix": "imp",
|
||||
"body": "@import '${0:filename}';"
|
||||
},
|
||||
"@mixin": {
|
||||
"prefix": "mix",
|
||||
"body": "@mixin ${1:name} {\n $0\n}"
|
||||
},
|
||||
"@include": {
|
||||
"prefix": "inc",
|
||||
"body": "@include ${0:mixin};"
|
||||
},
|
||||
"@keyframes": {
|
||||
"prefix": "key",
|
||||
"body": "@keyframes ${1:name} {\n $0\n}"
|
||||
},
|
||||
"@media": {
|
||||
"prefix": "med",
|
||||
"body": "@media screen and (${1:max-width: 300px}) {\n $0\n}"
|
||||
},
|
||||
"!important": {
|
||||
"prefix": "!",
|
||||
"body": "!important"
|
||||
},
|
||||
"!important (alt)": {
|
||||
"prefix": "i",
|
||||
"body": "!important"
|
||||
}
|
||||
}
|
||||
84
dot_vim/plugged/friendly-snippets/snippets/dart.json
Normal file
84
dot_vim/plugged/friendly-snippets/snippets/dart.json
Normal file
@@ -0,0 +1,84 @@
|
||||
{
|
||||
"main": {
|
||||
"prefix": "main",
|
||||
"description": "Insert a main function, used as an entry point.",
|
||||
"body": ["void main(List<String> args) {", " $0", "}"]
|
||||
},
|
||||
"try": {
|
||||
"prefix": "try",
|
||||
"description": "Insert a try/catch block.",
|
||||
"body": ["try {", " $0", "} catch (${1:e}) {", "}"]
|
||||
},
|
||||
"if": {
|
||||
"prefix": "if",
|
||||
"description": "Insert an if statement.",
|
||||
"body": ["if ($1) {", " $0", "}"]
|
||||
},
|
||||
"if else": {
|
||||
"prefix": "ife",
|
||||
"description": "Insert an if statement with an else block.",
|
||||
"body": ["if ($1) {", " $0", "} else {", "}"]
|
||||
},
|
||||
"switch case": {
|
||||
"prefix": "switch",
|
||||
"description": "Insert a switch statement.",
|
||||
"body": [
|
||||
"switch ($1) {",
|
||||
" case $2:",
|
||||
" $0",
|
||||
" break;",
|
||||
" default:",
|
||||
"}"
|
||||
]
|
||||
},
|
||||
"for": {
|
||||
"prefix": "for",
|
||||
"description": "Insert a for loop.",
|
||||
"body": ["for (var i = 0; i < ${1:count}; i++) {", " $0", "}"]
|
||||
},
|
||||
"for in": {
|
||||
"prefix": "fori",
|
||||
"description": "Insert a for-in loop.",
|
||||
"body": ["for (var ${1:item} in ${2:items}) {", " $0", "}"]
|
||||
},
|
||||
"while": {
|
||||
"prefix": "while",
|
||||
"description": "Insert a while loop.",
|
||||
"body": ["while ($1) {", " $0", "}"]
|
||||
},
|
||||
"do while": {
|
||||
"prefix": "do",
|
||||
"description": "Insert a do-while loop.",
|
||||
"body": ["do {", " $0", "} while ($1);"]
|
||||
},
|
||||
"fun": {
|
||||
"prefix": "fun",
|
||||
"description": "Insert a function definition.",
|
||||
"body": ["${3:void} ${1:name}(${2:args}) {", " $0", "}"]
|
||||
},
|
||||
"class": {
|
||||
"prefix": "class",
|
||||
"description": "Insert a class definition.",
|
||||
"body": ["class ${1:Name} {", " $0", "}"]
|
||||
},
|
||||
"typedef": {
|
||||
"prefix": "typedef",
|
||||
"description": "Insert a typedef.",
|
||||
"body": "typedef ${1:Type} ${2:Name}(${3:params});"
|
||||
},
|
||||
"test": {
|
||||
"prefix": "test",
|
||||
"description": "Insert a test block.",
|
||||
"body": ["test('$1', () {", " $0", "});"]
|
||||
},
|
||||
"group": {
|
||||
"prefix": "group",
|
||||
"description": "Insert a test group block.",
|
||||
"body": ["group('$1', () {", " $0", "});"]
|
||||
},
|
||||
"enum": {
|
||||
"prefix": "enum",
|
||||
"description": "Insert a enum.",
|
||||
"body": ["enum ${1:Name} {", " $0", "}"]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,332 @@
|
||||
{
|
||||
"Version": {
|
||||
"prefix": "ver",
|
||||
"body": ["version: '${1:3}'"],
|
||||
"description": ""
|
||||
},
|
||||
"Volumes": {
|
||||
"prefix": "volumes",
|
||||
"body": ["volumes:", "\t\t- ${1:value}"],
|
||||
"description": ""
|
||||
},
|
||||
"Volume Driver": {
|
||||
"prefix": "volume_",
|
||||
"body": ["volume_driver: ${1:driver}"],
|
||||
"description": ""
|
||||
},
|
||||
"Volumes From": {
|
||||
"prefix": "volumes_",
|
||||
"body": ["volumes_from:", "\t\t- ${1:name}"],
|
||||
"description": ""
|
||||
},
|
||||
"External": {
|
||||
"prefix": "exter",
|
||||
"body": ["external: ${1:boolean}"],
|
||||
"description": ""
|
||||
},
|
||||
"Services": {
|
||||
"prefix": "ser",
|
||||
"body": ["services:", "\t\t${1:name}"],
|
||||
"description": ""
|
||||
},
|
||||
"Build": {
|
||||
"prefix": "bu",
|
||||
"body": ["build:", "\t\t${1:value}"],
|
||||
"description": ""
|
||||
},
|
||||
"Context": {
|
||||
"prefix": "conte",
|
||||
"body": ["context: ${1:dir}"],
|
||||
"description": ""
|
||||
},
|
||||
"Command": {
|
||||
"prefix": "com",
|
||||
"body": ["command: ${1:command}"],
|
||||
"description": ""
|
||||
},
|
||||
"Depends on": {
|
||||
"prefix": "dep",
|
||||
"body": ["depends_on:", "\t\t${1:value}"],
|
||||
"description": ""
|
||||
},
|
||||
"Environment": {
|
||||
"prefix": "env",
|
||||
"body": ["environment:", "\t\t${1:name}: ${2:value}"],
|
||||
"description": ""
|
||||
},
|
||||
"Dockerfile": {
|
||||
"prefix": "doc",
|
||||
"body": ["dockerfile: ${1:file}"],
|
||||
"description": ""
|
||||
},
|
||||
"Args": {
|
||||
"prefix": "ar",
|
||||
"body": ["args:", "\t\t${1:name}: ${2:value}"],
|
||||
"description": ""
|
||||
},
|
||||
"Cap Add": {
|
||||
"prefix": "cap_a",
|
||||
"body": ["cap_add:", "\t\t- ${1:value}"],
|
||||
"description": ""
|
||||
},
|
||||
"Cap Drop": {
|
||||
"prefix": "cap_d",
|
||||
"body": ["cap_drop:", "\t\t- ${1:value}"],
|
||||
"description": ""
|
||||
},
|
||||
"cgroup_parent": {
|
||||
"prefix": "cgr",
|
||||
"body": ["cgroup_parent: ${1:cgroup}"],
|
||||
"description": ""
|
||||
},
|
||||
"Container Name": {
|
||||
"prefix": "conta",
|
||||
"body": ["container_name: ${1:name}"],
|
||||
"description": ""
|
||||
},
|
||||
"Devices": {
|
||||
"prefix": "dev",
|
||||
"body": ["devices:", "\t\t- ${1:value}"],
|
||||
"description": ""
|
||||
},
|
||||
"DNS": {
|
||||
"prefix": "dn",
|
||||
"body": ["dns:", "\t\t- ${1:ip}"],
|
||||
"description": ""
|
||||
},
|
||||
"DNS Search": {
|
||||
"prefix": "dns_",
|
||||
"body": ["dns_search:", "\t\t- ${1:ip}"],
|
||||
"description": ""
|
||||
},
|
||||
"tmpfs": {
|
||||
"prefix": "tm",
|
||||
"body": ["tmpfs:", "\t\t- ${1:dir}"],
|
||||
"description": ""
|
||||
},
|
||||
"Entrypoint": {
|
||||
"prefix": "ent",
|
||||
"body": ["entrypoint: ${1:command}"],
|
||||
"description": ""
|
||||
},
|
||||
"Env File": {
|
||||
"prefix": "env_",
|
||||
"body": ["env_file:", "\t\t- ${1:file}"],
|
||||
"description": ""
|
||||
},
|
||||
"Expose": {
|
||||
"prefix": "exp",
|
||||
"body": ["expose:", "\t\t- ${1:port}"],
|
||||
"description": ""
|
||||
},
|
||||
"Extends": {
|
||||
"prefix": "exten",
|
||||
"body": ["extends:", "\t\tfile: ${1:file}", "\t\tservice: ${2:name}"],
|
||||
"description": ""
|
||||
},
|
||||
"Extra Hosts": {
|
||||
"prefix": "extr",
|
||||
"body": ["extra_hosts:", "\t\t- ${1:host}:${2:ip}"],
|
||||
"description": ""
|
||||
},
|
||||
"Group Add": {
|
||||
"prefix": "gr",
|
||||
"body": ["group_add:", "\t\t- ${1:name}"],
|
||||
"description": ""
|
||||
},
|
||||
"Image": {
|
||||
"prefix": "im",
|
||||
"body": ["image: ${1:image}"],
|
||||
"description": ""
|
||||
},
|
||||
"Labels": {
|
||||
"prefix": "la",
|
||||
"body": ["labels:", "\t\t${1:dns}: ${2:label}"],
|
||||
"description": ""
|
||||
},
|
||||
"Links": {
|
||||
"prefix": "links",
|
||||
"body": ["links:", "\t\t- ${1:name}"],
|
||||
"description": ""
|
||||
},
|
||||
"Logging": {
|
||||
"prefix": "logg",
|
||||
"body": [
|
||||
"logging:",
|
||||
"\t\tdriver: ${1:driver}",
|
||||
"\t\toptions:",
|
||||
"\t\t\t${2:value}"
|
||||
],
|
||||
"description": ""
|
||||
},
|
||||
"Log Driver": {
|
||||
"prefix": "log_d",
|
||||
"body": ["log_driver: ${1:driver}"],
|
||||
"description": ""
|
||||
},
|
||||
"Log Options": {
|
||||
"prefix": "log_o",
|
||||
"body": ["log_opt:", "\t\t${1:value}"],
|
||||
"description": ""
|
||||
},
|
||||
"Net": {
|
||||
"prefix": "net",
|
||||
"body": ["net: ${1:value}"],
|
||||
"description": ""
|
||||
},
|
||||
"Network Mode": {
|
||||
"prefix": "network_",
|
||||
"body": ["network_mode: ${1:value}"],
|
||||
"description": ""
|
||||
},
|
||||
"Networks": {
|
||||
"prefix": "networks",
|
||||
"body": ["networks:", "\t\t- ${1:value}"],
|
||||
"description": ""
|
||||
},
|
||||
"Ipv4 Address": {
|
||||
"prefix": "ipv4",
|
||||
"body": ["ipv4_address: ${1:ip}"],
|
||||
"description": ""
|
||||
},
|
||||
"Ipv6 Address": {
|
||||
"prefix": "ipv6",
|
||||
"body": ["ipv6_address: ${1:ip}"],
|
||||
"description": ""
|
||||
},
|
||||
"Link Local IPs": {
|
||||
"prefix": "link_",
|
||||
"body": ["link_local_ips:", "\t\t- ${1:ip}"],
|
||||
"description": ""
|
||||
},
|
||||
"PID": {
|
||||
"prefix": "pi",
|
||||
"body": ["pid: ${1:host}"],
|
||||
"description": ""
|
||||
},
|
||||
"Ports": {
|
||||
"prefix": "po",
|
||||
"body": ["ports:", "\t\t- ${1:value}"],
|
||||
"description": ""
|
||||
},
|
||||
"Security Opt": {
|
||||
"prefix": "sec",
|
||||
"body": ["security_opt:", "\t\t- ${1:value}"],
|
||||
"description": ""
|
||||
},
|
||||
"Stop Signal": {
|
||||
"prefix": "sto",
|
||||
"body": ["stop_signal: ${1:signal}"],
|
||||
"description": ""
|
||||
},
|
||||
"Ulimits": {
|
||||
"prefix": "ul",
|
||||
"body": ["ulimits:", "\t\t${1:value}"],
|
||||
"description": ""
|
||||
},
|
||||
"CPU Shares": {
|
||||
"prefix": "cpu_s",
|
||||
"body": ["cpu_shares: ${1:value}"],
|
||||
"description": ""
|
||||
},
|
||||
"CPU Quota": {
|
||||
"prefix": "cpu_q",
|
||||
"body": ["cpu_quota: ${1:value}"],
|
||||
"description": ""
|
||||
},
|
||||
"CPU Set": {
|
||||
"prefix": "cpus",
|
||||
"body": ["cpuset: ${1:value}"],
|
||||
"description": ""
|
||||
},
|
||||
"Domain Name": {
|
||||
"prefix": "dom",
|
||||
"body": ["domainname: ${1:name}"],
|
||||
"description": ""
|
||||
},
|
||||
"Hostname": {
|
||||
"prefix": "ho",
|
||||
"body": ["hostname: ${1:name}"],
|
||||
"description": ""
|
||||
},
|
||||
"IPC": {
|
||||
"prefix": "ipc",
|
||||
"body": ["ipc: ${1:host}"],
|
||||
"description": ""
|
||||
},
|
||||
"Memory Limit": {
|
||||
"prefix": "mem_",
|
||||
"body": ["mem_limit: ${1:value}"],
|
||||
"description": ""
|
||||
},
|
||||
"Mem swap Limit": {
|
||||
"prefix": "mems",
|
||||
"body": ["memswap_limit: ${1:value}"],
|
||||
"description": ""
|
||||
},
|
||||
"Privileged": {
|
||||
"prefix": "pr",
|
||||
"body": ["privileged: ${1:boolean}"],
|
||||
"description": ""
|
||||
},
|
||||
"OOM Score Adj": {
|
||||
"prefix": "oom",
|
||||
"body": ["oom_score_adj: ${1:value}"],
|
||||
"description": ""
|
||||
},
|
||||
"Restart": {
|
||||
"prefix": "res",
|
||||
"body": ["restart: ${1:value}"],
|
||||
"description": ""
|
||||
},
|
||||
"User": {
|
||||
"prefix": "us",
|
||||
"body": ["user: ${1:value}"],
|
||||
"description": ""
|
||||
},
|
||||
"Working Directory": {
|
||||
"prefix": "wo",
|
||||
"body": ["working_dir: ${1:dir}"],
|
||||
"description": ""
|
||||
},
|
||||
"Read Only": {
|
||||
"prefix": "rea",
|
||||
"body": ["read_only: ${1:boolean}"],
|
||||
"description": ""
|
||||
},
|
||||
"SHM Size": {
|
||||
"prefix": "sh",
|
||||
"body": ["shm_size: ${1:value}"],
|
||||
"description": ""
|
||||
},
|
||||
"Stdin Open": {
|
||||
"prefix": "std",
|
||||
"body": ["stdin_open: ${1:boolean}"],
|
||||
"description": ""
|
||||
},
|
||||
"TTY": {
|
||||
"prefix": "tt",
|
||||
"body": ["tty: ${1:boolean}"],
|
||||
"description": ""
|
||||
},
|
||||
"Driver": {
|
||||
"prefix": "driver",
|
||||
"body": ["driver: ${1:value}"],
|
||||
"description": ""
|
||||
},
|
||||
"Driver Opts": {
|
||||
"prefix": "driver_",
|
||||
"body": ["driver_opts:", "\t\t${1:key}: ${2:value}"],
|
||||
"description": ""
|
||||
},
|
||||
"IPAM": {
|
||||
"prefix": "ipa",
|
||||
"body": ["ipam:", "\t\t${1:value}"],
|
||||
"description": ""
|
||||
},
|
||||
"Health Check": {
|
||||
"prefix": "hc",
|
||||
"body": ["healthcheck:", "\t\ttest: ${1:command}"],
|
||||
"description": ""
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
{
|
||||
"FROM": {
|
||||
"prefix": "F",
|
||||
"body": "FROM ${1:ubuntu}"
|
||||
},
|
||||
"Label maintainer": {
|
||||
"prefix": "m",
|
||||
"body": "LABEL maintainer=\"${1:name}\""
|
||||
},
|
||||
"RUN": {
|
||||
"prefix": "R",
|
||||
"body": ["RUN ${1:command}"]
|
||||
},
|
||||
|
||||
"CMD": {
|
||||
"prefix": "C",
|
||||
"body": ["CMD ${1:command}"]
|
||||
},
|
||||
|
||||
"COPY": {
|
||||
"prefix": "cp",
|
||||
"body": ["COPY ${1:src} ${2:dest}"]
|
||||
},
|
||||
|
||||
"EXPOSE": {
|
||||
"prefix": "exp",
|
||||
"body": ["EXPOSE ${1:port}"]
|
||||
},
|
||||
"ENV": {
|
||||
"prefix": "env",
|
||||
"body": ["ENV ${1:key} ${2: value}"]
|
||||
},
|
||||
"ADD": {
|
||||
"prefix": "a",
|
||||
"body": ["ADD ${1:src} ${2:dst}"]
|
||||
},
|
||||
"ENTRYPOINT": {
|
||||
"prefix": "ent",
|
||||
"body": "ENTRYPOINT ${1:command}"
|
||||
},
|
||||
"VOLUME": {
|
||||
"prefix": "v",
|
||||
"body": "VOLUME [\"${1:path}\"]"
|
||||
},
|
||||
"USER": {
|
||||
"prefix": "u",
|
||||
"body": "USER ${1:name}"
|
||||
},
|
||||
"WORKDIR": {
|
||||
"prefix": "w",
|
||||
"body": "WORKDIR ${1:name}"
|
||||
},
|
||||
"Update Packages": {
|
||||
"prefix": "upd",
|
||||
"body": [
|
||||
"RUN echo \"deb http://archive.ubuntu.com/ubuntu ${1:precise} main universe\" > /etc/apt/sources.list; \\",
|
||||
"apt-get update && apt-get -y upgrade; \\ ",
|
||||
"${2}; \\",
|
||||
"rm -rf /var/lib/apt/lists/*"
|
||||
]
|
||||
},
|
||||
"HEAD": {
|
||||
"prefix": "head",
|
||||
"body": ["# ${1:description}", "# ", "# VERSION ${2:0.1.0}", "${3}"]
|
||||
},
|
||||
"ONBUILD": {
|
||||
"prefix": "o",
|
||||
"body": "ONBUILD ${1}"
|
||||
},
|
||||
"LABEL": {
|
||||
"prefix": "L",
|
||||
"body": "LABEL ${1:label}=\"${2:value}\""
|
||||
}
|
||||
}
|
||||
44
dot_vim/plugged/friendly-snippets/snippets/eelixir.json
Normal file
44
dot_vim/plugged/friendly-snippets/snippets/eelixir.json
Normal file
@@ -0,0 +1,44 @@
|
||||
{
|
||||
"%": {
|
||||
"prefix": "%",
|
||||
"body": "<% $0 %>"
|
||||
},
|
||||
"=": {
|
||||
"prefix": "=",
|
||||
"body": "<%= $0 %>"
|
||||
},
|
||||
"gettext": {
|
||||
"prefix": "gt",
|
||||
"body": "<%= gettext(\"$0\") %>"
|
||||
},
|
||||
"for": {
|
||||
"prefix": "for",
|
||||
"body": [
|
||||
"<%= for ${1:item} <- ${2:items} do %>",
|
||||
" $0",
|
||||
"<% end %>"
|
||||
]
|
||||
},
|
||||
"if": {
|
||||
"prefix": "if",
|
||||
"body": [
|
||||
"<%= if ${1} do %>",
|
||||
" $0",
|
||||
"<% end %>"
|
||||
]
|
||||
},
|
||||
"ife": {
|
||||
"prefix": "if",
|
||||
"body": [
|
||||
"<%= if ${1} do %>",
|
||||
" $2",
|
||||
"<% else %>",
|
||||
" $0",
|
||||
"<% end %>"
|
||||
]
|
||||
},
|
||||
"lin": {
|
||||
"prefix": "if",
|
||||
"body": "<%= link \"${1:Submit}\", to: ${2:\"/users\"}, method: ${3::delete} %>"
|
||||
}
|
||||
}
|
||||
220
dot_vim/plugged/friendly-snippets/snippets/elixir.json
Normal file
220
dot_vim/plugged/friendly-snippets/snippets/elixir.json
Normal file
@@ -0,0 +1,220 @@
|
||||
{
|
||||
"defmodule": {
|
||||
"prefix": "defmo",
|
||||
"body": [
|
||||
"defmodule ${1:module} do",
|
||||
" $0",
|
||||
"end"
|
||||
],
|
||||
"description": "Define a module"
|
||||
},
|
||||
"def": {
|
||||
"prefix": "def",
|
||||
"body": [
|
||||
"def ${1:name}() do",
|
||||
" $0",
|
||||
"end"
|
||||
],
|
||||
"description": "Define a function"
|
||||
},
|
||||
"defp": {
|
||||
"prefix": "defp",
|
||||
"body": [
|
||||
"defp ${1:name}() do",
|
||||
" $0",
|
||||
"end"
|
||||
],
|
||||
"description": "Define a private function"
|
||||
},
|
||||
"IO.puts": {
|
||||
"prefix": "put",
|
||||
"body": "IO.puts($0)"
|
||||
},
|
||||
"IO.inspect": {
|
||||
"prefix": "ins",
|
||||
"body": "IO.inspect($0)"
|
||||
},
|
||||
"IO.inspect with label": {
|
||||
"prefix": "insl",
|
||||
"body": "IO.inspect($1, label: \"$0\")"
|
||||
},
|
||||
"if .. do .. end": {
|
||||
"prefix": "if",
|
||||
"body": [
|
||||
"if ${1:condition} do",
|
||||
" $0",
|
||||
"end"
|
||||
]
|
||||
},
|
||||
"if .. do:": {
|
||||
"prefix": "if:",
|
||||
"body": "if ${1:condition}, do: $0"
|
||||
},
|
||||
"if .. do .. else .. end": {
|
||||
"prefix": "ife",
|
||||
"body": [
|
||||
"if ${1:condition} do",
|
||||
" $2",
|
||||
"else",
|
||||
" $0",
|
||||
"end"
|
||||
]
|
||||
},
|
||||
"if .. do: .. else:": {
|
||||
"prefix": "ife:",
|
||||
"body": "if ${1:condition}, do: $2, else: $0"
|
||||
},
|
||||
"cond": {
|
||||
"prefix": "cond",
|
||||
"body": [
|
||||
"cond do",
|
||||
" $1 -> ",
|
||||
" $0",
|
||||
"end"
|
||||
]
|
||||
},
|
||||
"case": {
|
||||
"prefix": "case",
|
||||
"body": [
|
||||
"case $1 do",
|
||||
" $2 -> ",
|
||||
" $0",
|
||||
"end"
|
||||
]
|
||||
},
|
||||
"for": {
|
||||
"prefix": "for",
|
||||
"body": [
|
||||
"for ${1:item} <- ${2:items} do",
|
||||
" $0",
|
||||
"end"
|
||||
]
|
||||
},
|
||||
"def + doc": {
|
||||
"prefix": "defd",
|
||||
"body": [
|
||||
"@doc \"\"\"",
|
||||
"${1:doc}",
|
||||
"\"\"\"",
|
||||
"def ${2:name} do",
|
||||
" $0",
|
||||
"end"
|
||||
]
|
||||
},
|
||||
"def + spec": {
|
||||
"prefix": "defs",
|
||||
"body": [
|
||||
"@spec ${1:name}(${2:args}) :: ${3:no_return}",
|
||||
"def $1{4:args} do",
|
||||
" $0",
|
||||
"end"
|
||||
]
|
||||
},
|
||||
"def + doc + spec": {
|
||||
"prefix": "defsd",
|
||||
"body": [
|
||||
"@doc \"\"\"",
|
||||
"${1:doc}",
|
||||
"\"\"\"",
|
||||
"@spec ${2:name}(${3:args}) :: ${4:no_return}",
|
||||
"def $2{5:args} do",
|
||||
" $0",
|
||||
"end"
|
||||
]
|
||||
},
|
||||
"doc": {
|
||||
"prefix": "doc",
|
||||
"body": [
|
||||
"@doc \"\"\"",
|
||||
"$0",
|
||||
"\"\"\""
|
||||
]
|
||||
},
|
||||
"doc s": {
|
||||
"prefix": "docs",
|
||||
"body": [
|
||||
"@doc ~S\"\"\"",
|
||||
"$0",
|
||||
"\"\"\""
|
||||
]
|
||||
},
|
||||
"doc false": {
|
||||
"prefix": "docf",
|
||||
"body": "@doc false"
|
||||
},
|
||||
"moduledoc": {
|
||||
"prefix": "mdoc",
|
||||
"body": [
|
||||
"@moduledoc \"\"\"",
|
||||
"$0",
|
||||
"\"\"\""
|
||||
]
|
||||
},
|
||||
"moduledoc s": {
|
||||
"prefix": "mdocs",
|
||||
"body": [
|
||||
"@moduledoc ~S\"\"\"",
|
||||
"$0",
|
||||
"\"\"\""
|
||||
]
|
||||
},
|
||||
"moduledoc false": {
|
||||
"prefix": "mdocf",
|
||||
"body": "@moduledoc false"
|
||||
},
|
||||
"require": {
|
||||
"prefix": "req",
|
||||
"body": "require ${0:Logger}"
|
||||
},
|
||||
"test": {
|
||||
"prefix": "test",
|
||||
"body": [
|
||||
"test \"${1:name}\" do",
|
||||
" $0",
|
||||
"end"
|
||||
]
|
||||
},
|
||||
"des": {
|
||||
"prefix": "desc",
|
||||
"body": [
|
||||
"describe \"${1:test group subject}\" do",
|
||||
" $0",
|
||||
"end"
|
||||
]
|
||||
},
|
||||
"IEx.pry": {
|
||||
"prefix": "pry",
|
||||
"body": [
|
||||
"require IEx; IEx.pry",
|
||||
"$0"
|
||||
]
|
||||
},
|
||||
"pipe char": {
|
||||
"prefix": "p",
|
||||
"body": "|> $0"
|
||||
},
|
||||
"pipe into each": {
|
||||
"prefix": ">e",
|
||||
"body": "|> Enum.each($0)"
|
||||
},
|
||||
"pipe into map": {
|
||||
"prefix": ">m",
|
||||
"body": "|> Enum.map($0)"
|
||||
},
|
||||
"pipe into filter": {
|
||||
"prefix": ">f",
|
||||
"body": "|> Enum.filter($0)"
|
||||
},
|
||||
"pipe into reduce": {
|
||||
"prefix": ">r",
|
||||
"body": "|> Enum.reduce(${1:acc}, fn ${2}, ${3:acc} -> $0 end)"
|
||||
},
|
||||
"word list": {
|
||||
"prefix": "wl",
|
||||
"body": "~w($0)"
|
||||
},
|
||||
"atom list": {
|
||||
"prefix": "al",
|
||||
"body": "~w($0)a"
|
||||
}
|
||||
}
|
||||
86
dot_vim/plugged/friendly-snippets/snippets/erb.json
Normal file
86
dot_vim/plugged/friendly-snippets/snippets/erb.json
Normal file
@@ -0,0 +1,86 @@
|
||||
{
|
||||
"if": {
|
||||
"prefix": "if",
|
||||
"body": [
|
||||
"<% if ${1:truevalue} %>",
|
||||
" $2",
|
||||
"<% end %>"
|
||||
],
|
||||
"description": "if .. end"
|
||||
},
|
||||
"else": {
|
||||
"prefix": "else",
|
||||
"body": [
|
||||
"<% else %>"
|
||||
],
|
||||
"description": "else"
|
||||
},
|
||||
"elsif": {
|
||||
"prefix": "elsif",
|
||||
"body": [
|
||||
"<% elsif ${1:truevalue} %>"
|
||||
],
|
||||
"description": "elsif"
|
||||
},
|
||||
"end": {
|
||||
"prefix": "end",
|
||||
"body": [
|
||||
"<% end %>"
|
||||
],
|
||||
"description": "end"
|
||||
},
|
||||
"ife": {
|
||||
"prefix": "ife",
|
||||
"body": [
|
||||
"<% if ${1:truevalue} %>",
|
||||
" $2",
|
||||
"<% else %>",
|
||||
" $3",
|
||||
"<% end %>"
|
||||
],
|
||||
"description": "if .. else .. end"
|
||||
},
|
||||
"unless": {
|
||||
"prefix": "unless",
|
||||
"body": [
|
||||
"<% unless ${1:falsevalue} %>",
|
||||
" $2",
|
||||
"<% end %>"
|
||||
],
|
||||
"description": "unless .. end"
|
||||
},
|
||||
"unlesse": {
|
||||
"prefix": "unlesse",
|
||||
"body": [
|
||||
"<% unless ${1:falsevalue} %>",
|
||||
" $2",
|
||||
"<% else %>",
|
||||
" $3",
|
||||
"<% end %>"
|
||||
],
|
||||
"description": "unless .. end"
|
||||
},
|
||||
"each": {
|
||||
"prefix": "each",
|
||||
"body": [
|
||||
"<% ${1:items}.each do |${2:item}| %>",
|
||||
" $2",
|
||||
"<% end %>"
|
||||
],
|
||||
"description": "each do"
|
||||
},
|
||||
"render": {
|
||||
"prefix": ["pe", "="],
|
||||
"body": [
|
||||
"<%= $1 %>"
|
||||
],
|
||||
"description": "render block pe"
|
||||
},
|
||||
"exec": {
|
||||
"prefix": ["er", "%"],
|
||||
"body": [
|
||||
"<% $1 %>"
|
||||
],
|
||||
"description": "erb exec block"
|
||||
}
|
||||
}
|
||||
55
dot_vim/plugged/friendly-snippets/snippets/erlang.json
Normal file
55
dot_vim/plugged/friendly-snippets/snippets/erlang.json
Normal file
@@ -0,0 +1,55 @@
|
||||
{
|
||||
"module": {
|
||||
"prefix": "mod",
|
||||
"body": "-module(${1:module}).",
|
||||
"description": "module"
|
||||
},
|
||||
"include": {
|
||||
"prefix": "inc",
|
||||
"body": "-include(\"${1:hrl_name}.hrl\").",
|
||||
"description": "module"
|
||||
},
|
||||
"define": {
|
||||
"prefix": "def",
|
||||
"body": "-define(${1:def_name}, ${2:def_value}).",
|
||||
"description": "define"
|
||||
},
|
||||
"export": {
|
||||
"prefix": "exp",
|
||||
"body": [
|
||||
"-export([",
|
||||
" ${1}",
|
||||
" ])."],
|
||||
"description": "export"
|
||||
},
|
||||
"if": {
|
||||
"prefix": "if",
|
||||
"body": [
|
||||
"if ${1:Cond} ->",
|
||||
" ${2:todo};",
|
||||
" true ->",
|
||||
" ${3:todo}",
|
||||
"end$4"],
|
||||
"description": "if block"
|
||||
},
|
||||
"case": {
|
||||
"prefix": "case",
|
||||
"body": [
|
||||
"case ${1:Expr} of",
|
||||
" ${2:Cond} ->",
|
||||
" ${3:todo};",
|
||||
" _ ->",
|
||||
" ${4:todo}",
|
||||
"end$5"],
|
||||
"description": "case block"
|
||||
},
|
||||
"receive": {
|
||||
"prefix": "rec",
|
||||
"body": [
|
||||
"receive",
|
||||
" ${1:pattern} ->",
|
||||
" ${2:todo}",
|
||||
"end$3"],
|
||||
"description": "receive block"
|
||||
}
|
||||
}
|
||||
52
dot_vim/plugged/friendly-snippets/snippets/fennel.json
Normal file
52
dot_vim/plugged/friendly-snippets/snippets/fennel.json
Normal file
@@ -0,0 +1,52 @@
|
||||
{
|
||||
"fn": {
|
||||
"prefix": "fn",
|
||||
"body": "(fn ${1:name} [${2:params}]\n )",
|
||||
"description": "Create a function"
|
||||
},
|
||||
"let": {
|
||||
"prefix": "let",
|
||||
"body": "(let [${1:name} ${2:value}])",
|
||||
"description": "Create a variable"
|
||||
},
|
||||
"while": {
|
||||
"prefix": "while",
|
||||
"body": "(while (${1:condition})\n($0))",
|
||||
"description": "Create a while loop"
|
||||
},
|
||||
"var": {
|
||||
"prefix": "var",
|
||||
"body": "(var ${1:name} ${2:value})",
|
||||
"description": "Create a variable with var"
|
||||
},
|
||||
"local": {
|
||||
"prefix": "local",
|
||||
"body": "(local ${1:name} ${2:value})",
|
||||
"description": "Create a variable with local"
|
||||
},
|
||||
"for": {
|
||||
"prefix": "for",
|
||||
"body": "(for [i 1 10]\n($0))",
|
||||
"description": "Create a for loop"
|
||||
},
|
||||
"global": {
|
||||
"prefix": "global",
|
||||
"body": "(global $0)",
|
||||
"description": "Create a global"
|
||||
},
|
||||
"require": {
|
||||
"prefix": "require",
|
||||
"body": "(require :${1:module})",
|
||||
"description": "Require a module"
|
||||
},
|
||||
"create a table": {
|
||||
"prefix": "tbl",
|
||||
"body": "(let [${1:tbl} {}\n\t${2:key1} ${3:key1_value}])",
|
||||
"description": "Declaring a table"
|
||||
},
|
||||
"set table value": {
|
||||
"prefix": "tset",
|
||||
"body": "(tset ${1:tbl} ${2:value})",
|
||||
"description": "Set a value in a table"
|
||||
}
|
||||
}
|
||||
520
dot_vim/plugged/friendly-snippets/snippets/fortran.json
Normal file
520
dot_vim/plugged/friendly-snippets/snippets/fortran.json
Normal file
@@ -0,0 +1,520 @@
|
||||
{
|
||||
"all": {
|
||||
"prefix": "all",
|
||||
"body": "all(${1:mask}${2:, dim=${3:1}})",
|
||||
"description": "all",
|
||||
"scope": "source.fortran"
|
||||
},
|
||||
"alloc": {
|
||||
"prefix": "alloc",
|
||||
"body": [
|
||||
"allocate(${1:array}, stat=${2:err})",
|
||||
"if ($2 /= 0) print *, \"$1: Allocation request denied\"",
|
||||
"",
|
||||
"if (allocated($1)) deallocate($1, stat=$2)",
|
||||
"if ($2 /= 0) print *, \"$1: Deallocation request denied\""
|
||||
],
|
||||
"description": "Allocate and Deallocate array",
|
||||
"scope": "source.fortran"
|
||||
},
|
||||
"al": {
|
||||
"body": [
|
||||
"allocate(${1:array}, stat=${2:err})",
|
||||
"if ($2 /= 0) print *, \"$1: Allocation request denied\""
|
||||
],
|
||||
"prefix": "al",
|
||||
"description": "Allocate Array"
|
||||
},
|
||||
"and": {
|
||||
"prefix": "and",
|
||||
"body": ".and.",
|
||||
"description": "And",
|
||||
"scope": "source.fortran"
|
||||
},
|
||||
"any": {
|
||||
"prefix": "any",
|
||||
"body": "any(${1:mask}${2:, dim=${3:1}})",
|
||||
"description": "any",
|
||||
"scope": "source.fortran"
|
||||
},
|
||||
"case": {
|
||||
"prefix": "case",
|
||||
"body": "case ${1:default}\n\t$0",
|
||||
"description": "case",
|
||||
"scope": "source.fortran"
|
||||
},
|
||||
"char": {
|
||||
"prefix": "char",
|
||||
"body": "character(len=$1${2:, kind=$3})${4:, ${5:attributes}} :: ${6:name}",
|
||||
"description": "Character",
|
||||
"scope": "source.fortran"
|
||||
},
|
||||
"close": {
|
||||
"prefix": "close",
|
||||
"body": "close(unit=${1:iounit}, iostat=${2:ios}${3:, status=\"delete\"})\nif ($2 /= 0) stop \"Error closing file unit $1\"\n",
|
||||
"description": "Close File",
|
||||
"scope": "source.fortran"
|
||||
},
|
||||
"count": {
|
||||
"prefix": "count",
|
||||
"body": "count(${1:mask}${2:, dim=${3:1}})",
|
||||
"description": "count",
|
||||
"scope": "source.fortran"
|
||||
},
|
||||
"typ": {
|
||||
"prefix": "typ",
|
||||
"body": "type(${1:type name})${2:, ${3:attributes}} :: ${4:name}",
|
||||
"description": "Custom Type",
|
||||
"scope": "source.fortran"
|
||||
},
|
||||
"cy": {
|
||||
"prefix": "cy",
|
||||
"body": "cycle",
|
||||
"description": "cycle",
|
||||
"scope": "source.fortran"
|
||||
},
|
||||
"data": {
|
||||
"prefix": "data",
|
||||
"body": "data ${1:variable} / ${2:data} /",
|
||||
"description": "data",
|
||||
"scope": "source.fortran"
|
||||
},
|
||||
"deal": {
|
||||
"prefix": "deal",
|
||||
"body": "if (allocated($1)) deallocate(${1:array}, stat=${2:err})\nif ($2 /= 0) print *, \"$1: Deallocation request denied$0\"",
|
||||
"description": "Deallocate Array",
|
||||
"scope": "source.fortran"
|
||||
},
|
||||
"dow": {
|
||||
"prefix": "dow",
|
||||
"body": "do while (${1:condition})\n\t$0\nend do",
|
||||
"description": "do while",
|
||||
"scope": "source.fortran"
|
||||
},
|
||||
"do": {
|
||||
"prefix": "do",
|
||||
"body": "do${1: ${2:i} = ${3:1}, ${4:100}, ${5:1}}\n\t$0\nend do",
|
||||
"description": "do",
|
||||
"scope": "source.fortran"
|
||||
},
|
||||
"dot": {
|
||||
"prefix": "dot",
|
||||
"body": "dot_product($1,$2)",
|
||||
"description": "Dot Product of Vectors",
|
||||
"scope": "source.fortran"
|
||||
},
|
||||
"elif": {
|
||||
"prefix": "elif",
|
||||
"body": "else if (${1:condition}) then\n\t",
|
||||
"description": "else if",
|
||||
"scope": "source.fortran"
|
||||
},
|
||||
"eq": {
|
||||
"prefix": "eq",
|
||||
"body": ".eq.",
|
||||
"description": "Equal",
|
||||
"scope": "source.fortran"
|
||||
},
|
||||
"eqv": {
|
||||
"prefix": "eqv",
|
||||
"body": ".eqv.",
|
||||
"description": "Equality",
|
||||
"scope": "source.fortran"
|
||||
},
|
||||
"for": {
|
||||
"prefix": "for",
|
||||
"body": "forall (${1:i=1:100}${2:, mask})\n\t$0\nend forall",
|
||||
"description": "forall",
|
||||
"scope": "source.fortran.modern"
|
||||
},
|
||||
"fun": {
|
||||
"prefix": "fun",
|
||||
"body": [
|
||||
"function ${1:name}(${2:input}) result(${3:output})",
|
||||
"\t${4:argument type}, intent(${5:inout}) :: $2",
|
||||
"\t${6:function type} :: $3",
|
||||
"\t$0",
|
||||
"end function $1"
|
||||
],
|
||||
"description": "function",
|
||||
"scope": "source.fortran"
|
||||
},
|
||||
"ge": {
|
||||
"prefix": "ge",
|
||||
"body": ".ge.",
|
||||
"description": "Greater or Equal",
|
||||
"scope": "source.fortran"
|
||||
},
|
||||
"gt": {
|
||||
"prefix": "gt",
|
||||
"body": ".gt.",
|
||||
"description": "Greater Than",
|
||||
"scope": "source.fortran"
|
||||
},
|
||||
"if": {
|
||||
"prefix": "if",
|
||||
"body": "if (${1:condition}) ",
|
||||
"description": "if (single line)",
|
||||
"scope": "source.fortran"
|
||||
},
|
||||
"if1": {
|
||||
"prefix": "if",
|
||||
"body": "if (${1:condition}) then\n\t$0\nend if",
|
||||
"description": "if",
|
||||
"scope": "source.fortran"
|
||||
},
|
||||
"imp": {
|
||||
"prefix": "imp",
|
||||
"body": "implicit none\n",
|
||||
"description": "implicit none",
|
||||
"scope": "source.fortran"
|
||||
},
|
||||
"ido": {
|
||||
"prefix": "ido",
|
||||
"body": "(${1:i}, $1 = ${2:1}, ${3:100}, ${4:1})$0",
|
||||
"description": "Implied do",
|
||||
"scope": "source.fortran"
|
||||
},
|
||||
"maxloc": {
|
||||
"prefix": "maxloc",
|
||||
"body": "maxloc(${1:source}${2:, mask=${3:($1>0)}})",
|
||||
"description": "Index of Maximum",
|
||||
"scope": "source.fortran"
|
||||
},
|
||||
"minloc": {
|
||||
"prefix": "minloc",
|
||||
"body": "minloc(${1:source}${2:, mask=${3:$1>0}})",
|
||||
"description": "Index of Minimum",
|
||||
"scope": "source.fortran"
|
||||
},
|
||||
"open": {
|
||||
"prefix": "open",
|
||||
"body": "open(unit=${1:iounit}, file=${2:name}, iostat=${3:ios}, status=\"${4:old}\", action=\"${5:read}\")\nif ($3 /= 0) stop \"Error opening file ${2/[\\\"\\'](.*)[\\\"\\']/$1/}\"\n",
|
||||
"description": "Input File",
|
||||
"scope": "source.fortran"
|
||||
},
|
||||
"inq": {
|
||||
"prefix": "inq",
|
||||
"body": "inquire(file=${1:filename}, opened=${2:ioopen}, exists=${3:ioexist}, number=${4:iounit})",
|
||||
"description": "Inquire (by Filename)",
|
||||
"scope": "source.fortran"
|
||||
},
|
||||
"inq1": {
|
||||
"prefix": "inq",
|
||||
"body": "inquire(unit=${1:iounit}, opened=${2:ioopen}, name=${3:filename}, action=${4:ioaction})",
|
||||
"description": "Inquire (by Unit)",
|
||||
"scope": "source.fortran"
|
||||
},
|
||||
"int": {
|
||||
"prefix": "int",
|
||||
"body": "integer${1:(${2:kind})}${3:, ${4:attributes}} :: ${5:name}",
|
||||
"description": "Integer",
|
||||
"scope": "source.fortran"
|
||||
},
|
||||
"interf": {
|
||||
"prefix": "interf",
|
||||
"body": "interface ${1:name}\n\t$0\nend interface $1",
|
||||
"description": "interface",
|
||||
"scope": "source.fortran"
|
||||
},
|
||||
"le": {
|
||||
"prefix": "le",
|
||||
"body": ".le.",
|
||||
"description": "Less or Equal",
|
||||
"scope": "source.fortran"
|
||||
},
|
||||
"lt": {
|
||||
"prefix": "lt",
|
||||
"body": ".lt.",
|
||||
"description": "Less Than",
|
||||
"scope": "source.fortran"
|
||||
},
|
||||
"log": {
|
||||
"prefix": "log",
|
||||
"body": "logical${1:(${2:kind})}${3:, ${4:attributes}} :: ${5:name}",
|
||||
"description": "Logical",
|
||||
"scope": "source.fortran"
|
||||
},
|
||||
"lbound": {
|
||||
"prefix": "lbound",
|
||||
"body": "lbound(${1:source}${2:, dim=${3:1}})",
|
||||
"description": "Lower Bound",
|
||||
"scope": "source.fortran"
|
||||
},
|
||||
"mat": {
|
||||
"prefix": "mat",
|
||||
"body": "matmul($1,$2)",
|
||||
"description": "Matrix Multiplication",
|
||||
"scope": "source.fortran"
|
||||
},
|
||||
"max": {
|
||||
"prefix": "max",
|
||||
"body": "max($1, $2${, $3:...})$0",
|
||||
"description": "max",
|
||||
"scope": "source.fortran"
|
||||
},
|
||||
"maxval": {
|
||||
"prefix": "maxval",
|
||||
"body": "maxval(${1:source}${2:, dim=${3:1}}${4:, mask=${5:($1>0)}})",
|
||||
"description": "Maximum Value",
|
||||
"scope": "source.fortran"
|
||||
},
|
||||
"merge": {
|
||||
"prefix": "merge",
|
||||
"body": "merge(${1:source}, ${2:alternative}, mask=(${2:$1>0}))",
|
||||
"description": "merge",
|
||||
"scope": "source.fortran"
|
||||
},
|
||||
"min": {
|
||||
"prefix": "min",
|
||||
"body": "min($1, $2${, $3:...})$0",
|
||||
"description": "min",
|
||||
"scope": "source.fortran"
|
||||
},
|
||||
"minval": {
|
||||
"prefix": "minval",
|
||||
"body": "minval(${1:source}${2:, dim=${3:1}}${4:, mask=${5:($1>0)}})",
|
||||
"description": "Minimum Value",
|
||||
"scope": "source.fortran"
|
||||
},
|
||||
"mp": {
|
||||
"prefix": "mp",
|
||||
"body": "module procedure ${0:name}",
|
||||
"description": "module procedure",
|
||||
"scope": "source.fortran"
|
||||
},
|
||||
"mod": {
|
||||
"prefix": "mod",
|
||||
"body": "module ${1:name}\n\n\timplicit none\n\t$0\n\nend module $1\n",
|
||||
"description": "module",
|
||||
"scope": "source.fortran"
|
||||
},
|
||||
"neqv": {
|
||||
"prefix": "neqv",
|
||||
"body": ".neqv.",
|
||||
"description": "Non-Equality",
|
||||
"scope": "source.fortran"
|
||||
},
|
||||
"not": {
|
||||
"prefix": "not",
|
||||
"body": ".not.",
|
||||
"description": "Not",
|
||||
"scope": "source.fortran"
|
||||
},
|
||||
"open1": {
|
||||
"prefix": "open",
|
||||
"body": "open(unit=${1:iounit}, file=${2:name}, iostat=${3:ios}, &\n status=\"${4:old/new/replace/scratch/unknown}\", action=\"${5:read/write/readwrite}\", access=\"${7:sequential/direct}\"${7/(direct)$|.*/(?1:, recl=)/}$0)\nif ($3 /= 0) stop \"Error opening file ${2/[\\\"\\'](.*)[\\\"\\']/$1/}\"",
|
||||
"description": "Open File",
|
||||
"scope": "source.fortran"
|
||||
},
|
||||
"or": {
|
||||
"prefix": "or",
|
||||
"body": ".or.",
|
||||
"description": "Or",
|
||||
"scope": "source.fortran"
|
||||
},
|
||||
"open2": {
|
||||
"prefix": "open",
|
||||
"body": "open(unit=${1:iounit}, file=${2:name}, iostat=${3:ios}, status=\"${4:new}\", action=\"${5:write}\")\nif ($3 /= 0) stop \"Error opening file ${2/[\\\"\\'](.*)[\\\"\\']/$1/}\"\n",
|
||||
"description": "Output File",
|
||||
"scope": "source.fortran"
|
||||
},
|
||||
"pack": {
|
||||
"prefix": "pack",
|
||||
"body": "pack(${1:array}, mask=(${2:$1>0})${3:, vector=${4:destination vector}})",
|
||||
"description": "pack",
|
||||
"scope": "source.fortran"
|
||||
},
|
||||
"pr": {
|
||||
"prefix": "pr",
|
||||
"body": "print*, ",
|
||||
"description": "Quick Print",
|
||||
"scope": "source.fortran"
|
||||
},
|
||||
"prod": {
|
||||
"prefix": "prod",
|
||||
"body": "product(${1:source}${2:, dim=${3:1}}${4:, mask=${5:($1>0)}})",
|
||||
"description": "Product of Elements",
|
||||
"scope": "source.fortran"
|
||||
},
|
||||
"prog": {
|
||||
"prefix": "prog",
|
||||
"body": "program ${1:name}\n\n\timplicit none\n\t$0\n\nend program $1\n",
|
||||
"description": "program",
|
||||
"scope": "source.fortran"
|
||||
},
|
||||
"c": {
|
||||
"prefix": "c",
|
||||
"body": "character(len=*) :: ",
|
||||
"description": "Quick Character",
|
||||
"scope": "source.fortran"
|
||||
},
|
||||
"t": {
|
||||
"prefix": "t",
|
||||
"body": "type(${1:type name}) :: ",
|
||||
"description": "Quick Custom Type",
|
||||
"scope": "source.fortran"
|
||||
},
|
||||
"i": {
|
||||
"prefix": "i",
|
||||
"body": "integer :: ",
|
||||
"description": "Quick Integer",
|
||||
"scope": "source.fortran"
|
||||
},
|
||||
"l": {
|
||||
"prefix": "l",
|
||||
"body": "logical :: ",
|
||||
"description": "Quick Logical",
|
||||
"scope": "source.fortran"
|
||||
},
|
||||
"op": {
|
||||
"prefix": "op",
|
||||
"body": "open(unit=${1:iounit}, file=${2:name}, iostat=${3:ios})\nif ($3 /= 0) stop \"Error opening file ${2/[\\\"\\'](.*)[\\\"\\']/$1/}\"",
|
||||
"description": "Quick Open",
|
||||
"scope": "source.fortran"
|
||||
},
|
||||
"re": {
|
||||
"prefix": "re",
|
||||
"body": "read*, ",
|
||||
"description": "Quick Read",
|
||||
"scope": "source.fortran"
|
||||
},
|
||||
"r": {
|
||||
"prefix": "r",
|
||||
"body": "real :: ",
|
||||
"description": "Quick Real",
|
||||
"scope": "source.fortran"
|
||||
},
|
||||
"wr": {
|
||||
"prefix": "wr",
|
||||
"body": "write(unit=${1:iounit}, fmt=*) ${0:variables}\n",
|
||||
"description": "Quick Write",
|
||||
"scope": "source.fortran"
|
||||
},
|
||||
"rn": {
|
||||
"prefix": "rn",
|
||||
"body": "call random_number($0)",
|
||||
"description": "Random Number",
|
||||
"scope": "source.fortran"
|
||||
},
|
||||
"rs": {
|
||||
"prefix": "rs",
|
||||
"body": "call random_seed(${1:size=${2:<int>}}${3:put=(/$4/)})",
|
||||
"description": "Random Seed",
|
||||
"scope": "source.fortran"
|
||||
},
|
||||
"read": {
|
||||
"prefix": "read",
|
||||
"body": "read(unit=${1:iounit}, fmt=\"(${2:format string})\", iostat=${3:istat}, advance='NO', size=${4:number of characters}) ${5:variables}\nif ($3 /= 0) stop \"Read error in file unit $1\"\n",
|
||||
"description": "Read (Non Advancing Mode)",
|
||||
"scope": "source.fortran"
|
||||
},
|
||||
"read1": {
|
||||
"prefix": "read",
|
||||
"body": "read(unit=${1:iounit}, fmt=\"(${2:format string})\", iostat=${3:istat}) ${4:variables}\nif ($3 /= 0) stop \"Read error in file unit $1\"\n",
|
||||
"description": "Read",
|
||||
"scope": "source.fortran"
|
||||
},
|
||||
"rea": {
|
||||
"prefix": "rea",
|
||||
"body": "real${1:(${2:kind})}${3:, ${4:attributes}} :: ${5:name}",
|
||||
"description": "Real",
|
||||
"scope": "source.fortran"
|
||||
},
|
||||
"resh": {
|
||||
"prefix": "resh",
|
||||
"body": "reshape(${1:source}${2:, shape=(/$3/)}${4:, pad=(/$5/)}${6:, order=(/${7:2,1}/)})",
|
||||
"description": "reshape",
|
||||
"scope": "source.fortran"
|
||||
},
|
||||
"open3": {
|
||||
"prefix": "open",
|
||||
"body": "open(unit=${1:iounit}, iostat=${3:ios}, status=\"${4:scratch}\", action=\"${5:readwrite}\")\nif ($3 /= 0) stop \"Error opening scratch file on unit $1\"\n",
|
||||
"description": "Scratch File",
|
||||
"scope": "source.fortran"
|
||||
},
|
||||
"sel": {
|
||||
"prefix": "sel",
|
||||
"body": "select case ($1:variable)\n\tcase ($2:values)\n\t\t$0\nend select",
|
||||
"description": "select case",
|
||||
"scope": "source.fortran"
|
||||
},
|
||||
"size": {
|
||||
"prefix": "size",
|
||||
"body": "size(${1:source}${2:, dim=${3:1}})",
|
||||
"description": "Size",
|
||||
"scope": "source.fortran"
|
||||
},
|
||||
"spread": {
|
||||
"prefix": "spread",
|
||||
"body": "spread(${1:source}, dim=${2:1}, ncopies=$3)",
|
||||
"description": "spread",
|
||||
"scope": "source.fortran"
|
||||
},
|
||||
"stop": {
|
||||
"prefix": "stop",
|
||||
"body": "stop \"${1:message}\"",
|
||||
"description": "stop",
|
||||
"scope": "source.fortran"
|
||||
},
|
||||
"sub": {
|
||||
"prefix": "sub",
|
||||
"body": "subroutine ${1:name}(${2:input})\n\t${3:argument type}, intent(${4:inout}) :: ${2/\\w+\\((.*)\\)|.*/$2/}\n\t$0\nend subroutine ${1/(\\w+).*/$1/}",
|
||||
"description": "subroutine",
|
||||
"scope": "source.fortran"
|
||||
},
|
||||
"sum": {
|
||||
"prefix": "sum",
|
||||
"body": "sum(${1:source}${2:, dim=${3:1}}${4:, mask=${5:($1>0)}})",
|
||||
"description": "Sum of Elements",
|
||||
"scope": "source.fortran"
|
||||
},
|
||||
"type": {
|
||||
"prefix": "type",
|
||||
"body": "type ${1:type name}\n\t$0\nend type $1",
|
||||
"description": "Type Definition",
|
||||
"scope": "source.fortran"
|
||||
},
|
||||
"unpack": {
|
||||
"prefix": "unpack",
|
||||
"body": "unpack(${1:vector}, mask=(${2:$1>0}), field=${3:destination array})",
|
||||
"description": "unpack",
|
||||
"scope": "source.fortran"
|
||||
},
|
||||
"ubound": {
|
||||
"prefix": "ubound",
|
||||
"body": "ubound(${1:source}${2:, dim=${3:1}})",
|
||||
"description": "Upper Bound",
|
||||
"scope": "source.fortran"
|
||||
},
|
||||
"wh": {
|
||||
"prefix": "wh",
|
||||
"body": "where ($1 ${2:==} $3) ",
|
||||
"description": "where (single line)",
|
||||
"scope": "source.fortran"
|
||||
},
|
||||
"whe": {
|
||||
"prefix": "whe",
|
||||
"body": "where ($1 ${2:==} $3)\n\t$0\nend where",
|
||||
"description": "where",
|
||||
"scope": "source.fortran"
|
||||
},
|
||||
"write": {
|
||||
"prefix": "write",
|
||||
"body": "write(unit=${1:iounit}, fmt=\"(${2:format string})\", iostat=${3:ios}${4:, advance='NO'}) ${5:variables}\nif ($3 /= 0) stop \"Write error in file unit $1\"\n",
|
||||
"description": "Write",
|
||||
"scope": "source.fortran"
|
||||
},
|
||||
"fa": {
|
||||
"prefix": "fa",
|
||||
"body": ".false.",
|
||||
"description": ".false.",
|
||||
"scope": "source.fortran"
|
||||
},
|
||||
"tr": {
|
||||
"prefix": "tr",
|
||||
"body": ".true.",
|
||||
"description": ".true.",
|
||||
"scope": "source.fortran"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,108 @@
|
||||
{
|
||||
"adminview": {
|
||||
"prefix": "adminview",
|
||||
"body": [
|
||||
"@admin.register(${1})",
|
||||
"class ${1}Admin(admin.ModelAdmin):",
|
||||
"\t'''Admin View for ${1}'''",
|
||||
"",
|
||||
"\tlist_display = ('${2}',)",
|
||||
"\tlist_filter = ('${3}',)",
|
||||
"\tinlines = [",
|
||||
"\t\t${4}Inline,",
|
||||
"\t]",
|
||||
"\traw_id_fields = ('${5}',)",
|
||||
"\treadonly_fields = ('${6}',)",
|
||||
"\tsearch_fields = ('${7}',)",
|
||||
"\tdate_hierarchy = '${8}'",
|
||||
"\tordering = ('${9}',)"
|
||||
],
|
||||
"description": "Model Admin View",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"stackedinline": {
|
||||
"prefix": "stackedinline",
|
||||
"body": [
|
||||
"class ${1}Inline(admin.StackedInline):",
|
||||
"\t'''Stacked Inline View for ${1}'''",
|
||||
"",
|
||||
"\tmodel = ${2:${1}}",
|
||||
"\tmin_num = ${3:3}",
|
||||
"\tmax_num = ${4:20}",
|
||||
"\textra = ${5:1}",
|
||||
"\traw_id_fields = (${6},)"
|
||||
],
|
||||
"description": "Stacked Inline",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"tabularinline": {
|
||||
"prefix": "tabularinline",
|
||||
"body": [
|
||||
"class ${1}Inline(admin.TabularInline):",
|
||||
"\t'''Tabular Inline View for ${1}'''",
|
||||
"",
|
||||
"\tmodel = ${2:${1}}",
|
||||
"\tmin_num = ${3:3}",
|
||||
"\tmax_num = ${4:20}",
|
||||
"\textra = ${5:1}",
|
||||
"\traw_id_fields = (${6},)"
|
||||
],
|
||||
"description": "Tabular Inline",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"simplelistfilter": {
|
||||
"prefix": "simplelistfilter",
|
||||
"body": [
|
||||
"class ${1:NAME}Filter(admin.SimpleListFilter):",
|
||||
"",
|
||||
"\ttitle = '$2'",
|
||||
"\tparameter_name = '$0'",
|
||||
"",
|
||||
"\tdef lookups(self, request, model_admin):",
|
||||
"\t\tpass",
|
||||
"",
|
||||
"\tdef queryset(self, request, queryset):",
|
||||
"\t\treturn queryset"
|
||||
],
|
||||
"description": "Admin SimpleList Filter",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"iadmin": {
|
||||
"prefix": "iadmin",
|
||||
"body": "from django.contrib import admin",
|
||||
"description": "from ... import admin",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"iadminsite": {
|
||||
"prefix": "iadminsite",
|
||||
"body": "from django.contrib.admin import AdminSite",
|
||||
"description": "from ... import AdminSite",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"register": {
|
||||
"prefix": "register",
|
||||
"body": "admin.site.register($1)",
|
||||
"description": "register the model class without providing a ModelAdmin description.",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"registermadmin": {
|
||||
"prefix": "registermadmin",
|
||||
"body": "admin.site.register($1, $1Admin)",
|
||||
"description": "register the model class providing a ModelAdmin description",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"fieldsets": {
|
||||
"prefix": "fieldsets",
|
||||
"body": [
|
||||
"fieldsets = (",
|
||||
"\t(None, {",
|
||||
"\t\t'fields': (",
|
||||
"\t\t\t$1",
|
||||
"\t\t),",
|
||||
"\t}),",
|
||||
")"
|
||||
],
|
||||
"description": "",
|
||||
"scope": "source.python"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,201 @@
|
||||
{
|
||||
"DRF Serializer (class)": {
|
||||
"prefix": "serializer",
|
||||
"body": [
|
||||
"class ${1:Name}Serializer(serializers.Serializer):",
|
||||
"\t${2}"
|
||||
],
|
||||
"description": "Django-rest Serializers ``Serializer`` Class"
|
||||
},
|
||||
"DRF ModelSerializer (class)": {
|
||||
"prefix": "modelserializer",
|
||||
"body": [
|
||||
"class ${1:Name}ModelSerializer(serializers.ModelSerializer):",
|
||||
"\t${2}",
|
||||
"\tclass Meta:",
|
||||
"\t\tmodel = ${3:$1}",
|
||||
"\t\tfields = \"${4:__all__}\""
|
||||
],
|
||||
"description": "Django-rest Serializers ``ModelSerializer`` Class"
|
||||
},
|
||||
"DRF Create (serializers-method)": {
|
||||
"prefix": "screate",
|
||||
"body": [
|
||||
"def create(self, validated_data):",
|
||||
"\treturn ${1:super().create(validated_data)}"
|
||||
],
|
||||
"description": "Django-rest Serializers ``Create`` Method"
|
||||
},
|
||||
"DRF Update (serializers-method)": {
|
||||
"prefix": "supdate",
|
||||
"body": [
|
||||
"def update(self, instance, validated_data):",
|
||||
"\treturn ${1:super().update(instance, validated_data)}"
|
||||
],
|
||||
"description": "Django-rest Serializers ``Update`` Method"
|
||||
},
|
||||
"DRF BooleanField": {
|
||||
"prefix": "sbool",
|
||||
"body": "${1:FIELDNAME} = serializers.BooleanField(${2})",
|
||||
"description": "Django-rest Serializers ``BooleanField``"
|
||||
},
|
||||
"DRF CharField": {
|
||||
"prefix": "schar",
|
||||
"body": "${1:FIELDNAME} = serializers.CharField(${2})",
|
||||
"description": "Django-rest Serializers ``CharField``"
|
||||
},
|
||||
"DRF DateField": {
|
||||
"prefix": "sdate",
|
||||
"body": "${1:FIELDNAME} = serializers.DateField(${2})",
|
||||
"description": "Django-rest Serializers ``DateField``"
|
||||
},
|
||||
"DRF DateTimeField": {
|
||||
"prefix": "sdatetime",
|
||||
"body": "${1:FIELDNAME} = serializers.DateTimeField(${2})",
|
||||
"description": "Django-rest Serializers ``DateTimeField``"
|
||||
},
|
||||
"DRF DecimalField": {
|
||||
"prefix": "sdecimal",
|
||||
"body": "${1:FIELDNAME} = serializers.DecimalField(max_digits=${2}, decimal_places=${3})",
|
||||
"description": "Django-rest Serializers ``DecimalField``"
|
||||
},
|
||||
"DRF DictField": {
|
||||
"prefix": "sdict",
|
||||
"body": "${1:FIELDNAME} = serializers.DictField(child=${2})",
|
||||
"description": "Django-rest Serializers ``DictField``"
|
||||
},
|
||||
"DRF DurationField": {
|
||||
"prefix": "sduration",
|
||||
"body": "${1:FIELDNAME} = serializers.DurationField(${2})",
|
||||
"description": "Django-rest Serializers ``DurationField``"
|
||||
},
|
||||
"DRF EmailField": {
|
||||
"prefix": "semail",
|
||||
"body": "${1:FIELDNAME} = serializers.EmailField(${2})",
|
||||
"description": "Django-rest Serializers ``EmailField``"
|
||||
},
|
||||
"DRF FileField": {
|
||||
"prefix": "sfile",
|
||||
"body": "${1:FIELDNAME} = serializers.FileField(${2})",
|
||||
"description": "Django-rest Serializers ``FileField``"
|
||||
},
|
||||
"DRF FilePathField": {
|
||||
"prefix": "sfilepath",
|
||||
"body": "${1:FIELDNAME} = serializers.FilePathField(path=${2})",
|
||||
"description": "Django-rest Serializers ``FilePathField``"
|
||||
},
|
||||
"DRF FloatField": {
|
||||
"prefix": "sfloat",
|
||||
"body": "${1:FIELDNAME} = serializers.FloatField(${2})",
|
||||
"description": "Django-rest Serializers ``FloatField``"
|
||||
},
|
||||
"DRF HiddenField": {
|
||||
"prefix": "shidden",
|
||||
"body": "${1:FIELDNAME} = serializers.HiddenField(${2})",
|
||||
"description": "Django-rest Serializers ``HiddenField``"
|
||||
},
|
||||
"DRF HyperlinkedRelatedField": {
|
||||
"prefix": "shyperlinkrelated",
|
||||
"body": "${1:FIELDNAME} = serializers.HyperlinkedRelatedField(${2})",
|
||||
"description": "Django-rest Serializers ``HyperlinkedRelatedField``"
|
||||
},
|
||||
"DRF ImageField": {
|
||||
"prefix": "simg",
|
||||
"body": "${1:FIELDNAME} = serializers.ImageField(${2})",
|
||||
"description": "Django-rest Serializers ``ImageField``"
|
||||
},
|
||||
"DRF IntegerField": {
|
||||
"prefix": "sint",
|
||||
"body": "${1:FIELDNAME} = serializers.IntegerField(${2})",
|
||||
"description": "Django-rest Serializers ``IntegerField``"
|
||||
},
|
||||
"DRF IPAddressField": {
|
||||
"prefix": "sip",
|
||||
"body": "${1:FIELDNAME} = serializers.IPAddressField(${2})",
|
||||
"description": "Django-rest Serializers ``IPAddressField``"
|
||||
},
|
||||
"DRF JSONField": {
|
||||
"prefix": "sjson",
|
||||
"body": "${1:FIELDNAME} = serializers.JSONField(binary=${2})",
|
||||
"description": "Django-rest Serializers ``JSONField``"
|
||||
},
|
||||
"DRF ListField": {
|
||||
"prefix": "slist",
|
||||
"body": "${1:FIELDNAME} = serializers.ListField(child=${2})",
|
||||
"description": "Django-rest Serializers ``ListField``"
|
||||
},
|
||||
"DRF ModelField": {
|
||||
"prefix": "smodel",
|
||||
"body": "${1:FIELDNAME} = serializers.ModelField(model_field=${2})",
|
||||
"description": "Django-rest Serializers `ModelField``"
|
||||
},
|
||||
"DRF ChoiceField": {
|
||||
"prefix": "schoice",
|
||||
"body": "${1:FIELDNAME} = serializers.ChoiceField(choices={${2}})",
|
||||
"description": "Django-rest Serializers ``ChoiceField``"
|
||||
},
|
||||
"DRF MultipleChoiceField": {
|
||||
"prefix": "smchoice",
|
||||
"body": "${1:FIELDNAME} = serializers.MultipleChoiceField(choices=${2})",
|
||||
"description": "Django-rest Serializers ``MultipleChoiceField``"
|
||||
},
|
||||
"DRF NullBooleanField": {
|
||||
"prefix": "snullbool",
|
||||
"body": "${1:FIELDNAME} = serializers.NullBooleanField(${2})",
|
||||
"description": "Django-rest Serializers ``NullBooleanField``"
|
||||
},
|
||||
"DRF PrimaryKeyRelatedField": {
|
||||
"prefix": "spkr",
|
||||
"body": "${1:FIELDNAME} = serializers.PrimaryKeyRelatedField(${2})",
|
||||
"description": "Django-rest Serializers ``PrimaryKeyRelatedField``"
|
||||
},
|
||||
"DRF ReadOnlyField": {
|
||||
"prefix": "sreadonly",
|
||||
"body": "${1:FIELDNAME} = serializers.ReadOnlyField(${2})",
|
||||
"description": "Django-rest Serializers ``ReadOnlyField``"
|
||||
},
|
||||
"DRF RegexField": {
|
||||
"prefix": "sregex",
|
||||
"body": "${1:FIELDNAME} = serializers.RegexField(regex=${2})",
|
||||
"description": "Django-rest Serializers `RegexField``"
|
||||
},
|
||||
"DRF SerializerMethodField": {
|
||||
"prefix": "ssmethod",
|
||||
"body": [
|
||||
"${1:FIELDNAME} = serializers.SerializerMethodField(${2})",
|
||||
"def get_$1(self, object):",
|
||||
"\treturn"
|
||||
],
|
||||
"description": "Django-rest Serializers ``SerializerMethodField``"
|
||||
},
|
||||
"DRF SlugField": {
|
||||
"prefix": "sslug",
|
||||
"body": "${1:FIELDNAME} = serializers.SlugField(${2})",
|
||||
"description": "Django-rest Serializers ``SlugField``"
|
||||
},
|
||||
"DRF SlugRelatedField": {
|
||||
"prefix": "sslugrelated",
|
||||
"body": "${1:FIELDNAME} = serializers.SlugRelatedField(${2})",
|
||||
"description": "Django-rest Serializers ``SlugRelatedField``"
|
||||
},
|
||||
"DRF StringRelatedField": {
|
||||
"prefix": "ssr",
|
||||
"body": "${1:FIELDNAME} = serializers.StringRelatedField(${2})",
|
||||
"description": "Django-rest Serializers ``StringRelatedField``"
|
||||
},
|
||||
"DRF TimeField": {
|
||||
"prefix": "stime",
|
||||
"body": "${1:FIELDNAME} = serializers.TimeField(${2})",
|
||||
"description": "Django-rest Serializers ``TimeField``"
|
||||
},
|
||||
"DRF URLField": {
|
||||
"prefix": "surl",
|
||||
"body": "${1:FIELDNAME} = serializers.URLField(${2})",
|
||||
"description": "Django-rest Serializers ``URLField``"
|
||||
},
|
||||
"DRF UUIDField": {
|
||||
"prefix": "suuid",
|
||||
"body": "${1:FIELDNAME} = serializers.UUIDField(${2})",
|
||||
"description": "Django-rest Serializers ``UUIDField``"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,153 @@
|
||||
{
|
||||
"DRF ApiView": {
|
||||
"prefix": "apiview",
|
||||
"body": [
|
||||
"class ${1:Name}APIView(APIView):",
|
||||
"\t${2}"
|
||||
],
|
||||
"description": "Django-rest Views ``ApiView`` Class"
|
||||
},
|
||||
"DRF CreateApiView": {
|
||||
"prefix": "createapiview",
|
||||
"body": [
|
||||
"class ${1:Name}CreateApiView(generics.CreateApiView):",
|
||||
"\tserializer_class = ${2:$1Serializer}"
|
||||
],
|
||||
"description": "Django-rest Views ``CreateApi`` Class"
|
||||
},
|
||||
"DRF DestoryApiView": {
|
||||
"prefix": "destoryapiview",
|
||||
"body": [
|
||||
"class ${1:Name}DestoryApiView(generics.DestoryApiView):",
|
||||
"\tserializer_class = ${2:$1Serializer}",
|
||||
"\tqueryset = $1.objects.filter(${3})"
|
||||
],
|
||||
"description": "Django-rest Views ``DestoryApiView`` Class"
|
||||
},
|
||||
"DRF ListApiView": {
|
||||
"prefix": "listapiview",
|
||||
"body": [
|
||||
"class ${1:Name}ListApiView(generics.ListApiView):",
|
||||
"\tserializer_class = ${2:$1Serializer}",
|
||||
"\tqueryset = $1.objects.filter(${3})"
|
||||
],
|
||||
"description": "Django-rest Views ``ListApiView`` Class"
|
||||
},
|
||||
"DRF ListCreateApiView": {
|
||||
"prefix": "listcreateapiview",
|
||||
"body": [
|
||||
"class ${1:Name}ListCreateApiView(generics.ListCreateApiView):",
|
||||
"\tserializer_class = ${2:$1Serializer}",
|
||||
"\tqueryset = $1.objects.filter(${3})"
|
||||
],
|
||||
"description": "Django-rest Views ``ListCreateApiView`` Class"
|
||||
},
|
||||
"DRF RetrieveAPIView": {
|
||||
"prefix": "retrieveapiview",
|
||||
"body": [
|
||||
"class ${1:Name}RetrieveAPIView(generics.RetrieveAPIView):",
|
||||
"\tserializer_class = ${2:$1Serializer}",
|
||||
"\tqueryset = $1.objects.filter(${3})"
|
||||
],
|
||||
"description": "Django-rest Views ``RetrieveAPIView`` Class"
|
||||
},
|
||||
"DRF RetrieveDestroyAPIView": {
|
||||
"prefix": "retrievedestoryapiview",
|
||||
"body": [
|
||||
"class ${1:Name}RetrieveDestroyAPIView(generics.RetrieveDestroyAPIView):",
|
||||
"\tserializer_class = ${2:$1Serializer}",
|
||||
"\tqueryset = $1.objects.filter(${3})"
|
||||
],
|
||||
"description": "Django-rest Views ``RetrieveDestroyAPIView`` Class"
|
||||
},
|
||||
"DRF RetrieveUpdateAPIView": {
|
||||
"prefix": "retrieveupdateapiview",
|
||||
"body": [
|
||||
"class ${1:Name}RetrieveUpdateAPIView(generics.RetrieveUpdateAPIView):",
|
||||
"\tserializer_class = ${2:$1Serializer}",
|
||||
"\tqueryset = $1.objects.filter(${3})"
|
||||
],
|
||||
"description": "Django-rest Views ``RetrieveUpdateAPIView`` Class"
|
||||
},
|
||||
"DRF RetrieveUpdateDestoryAPIView": {
|
||||
"prefix": "retrieveupdatedestoryapiview",
|
||||
"body": [
|
||||
"class ${1:Name}RetrieveUpdateDestoryAPIView(generics.RetrieveUpdateDestoryAPIView):",
|
||||
"\tserializer_class = ${2:$1Serializer}",
|
||||
"\tqueryset = $1.objects.filter(${3})"
|
||||
],
|
||||
"description": "Django-rest Views ``RetrieveUpdateDestoryAPIView`` Class"
|
||||
},
|
||||
"DRF UpdateApiView": {
|
||||
"prefix": "updateapiview",
|
||||
"body": [
|
||||
"class ${1:Name}UpdateApiView(generics.UpdateApiView):",
|
||||
"\tserializer_class = ${2:$1Serializer}",
|
||||
"\tqueryset = $1.objects.filter(${3})"
|
||||
],
|
||||
"description": "Django-rest Views ``UpdateApiView`` Class"
|
||||
},
|
||||
|
||||
"DRF perform_create": {
|
||||
"prefix": "performcreate",
|
||||
"body": [
|
||||
"def perform_create(self, serializer):",
|
||||
"\treturn ${1:super().perform_create(serializer)}"
|
||||
],
|
||||
"description": "Django-rest Views ``perform_create`` method"
|
||||
},
|
||||
"DRF perform_update": {
|
||||
"prefix": "perfromupdate",
|
||||
"body": [
|
||||
"def perform_create(self, serializer):",
|
||||
"\treturn ${1:super().perform_create(serializer)}"
|
||||
],
|
||||
"description": "Django-rest Views ``perform_create`` method"
|
||||
},
|
||||
"DRF perform_destory": {
|
||||
"prefix": "performdestory",
|
||||
"body": [
|
||||
"def perform_ddestory(self, instance):",
|
||||
"\treturn ${1:super().perform_destory(instance)}"
|
||||
],
|
||||
"description": "Django-rest Views ``perform_create`` method"
|
||||
},
|
||||
|
||||
"DRF ModelViewSet": {
|
||||
"prefix": "modelviewset",
|
||||
"body": [
|
||||
"class ${1:Name}ModelViewSet(viewsets.ModelViewSet):",
|
||||
"\tserializer_class = ${2:$1Serializer}",
|
||||
"\tqueryset = $1.objects.filter(${3})"
|
||||
],
|
||||
"description": "Django-rest Views ``ModelViewSet`` Class"
|
||||
},
|
||||
"DRF ReadOnlyModelViewSet": {
|
||||
"prefix": "readonlymodelviewset",
|
||||
"body": [
|
||||
"class ${1:Name}ReadOnlyModelViewSet(viewsets.ReadOnlyModelViewSet):",
|
||||
"\tserializer_class = ${2:$1Serializer}",
|
||||
"\tqueryset = $1.objects.filter(${3})"
|
||||
],
|
||||
"description": "Django-rest Views ``ReadOnlyModelViewSet`` Class"
|
||||
},
|
||||
"DRF ViewSet": {
|
||||
"prefix": "viewset",
|
||||
"body": [
|
||||
"class ${1:Name}ViewSet(viewsets.ViewSet):",
|
||||
"\tdef list(self, request):",
|
||||
"\t\tpass",
|
||||
"\tdef create(self, request):",
|
||||
"\t\tpass",
|
||||
"\tdef retrieve(self, request, pk=None):",
|
||||
"\t\tpass",
|
||||
"\tdef update(self, request, pk=None):",
|
||||
"\t\tpass",
|
||||
"\tdef partial_update(self, request, pk=None):",
|
||||
"\t\tpass",
|
||||
"\tdef destroy(self, request, pk=None):",
|
||||
"\t\tpass"
|
||||
],
|
||||
"description": "Django-rest Views ``ViewSet`` Class"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,287 @@
|
||||
{
|
||||
"Form": {
|
||||
"prefix": "Form",
|
||||
"body": [
|
||||
"class ${1:FORMNAME}(forms.Form):",
|
||||
"\t\"\"\"${2:$1 definition}.\"\"\"",
|
||||
"",
|
||||
"\t${3:# TODO: Define form fields here}",
|
||||
""
|
||||
],
|
||||
"description": "Form",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"ModelForm": {
|
||||
"prefix": "ModelForm",
|
||||
"body": [
|
||||
"class ${1:MODELNAME}Form(forms.ModelForm):",
|
||||
"\t\"\"\"${2:Form definition for $1}.\"\"\"",
|
||||
"",
|
||||
"\tclass Meta:",
|
||||
"\t\t\"\"\"Meta definition for ${1}form.\"\"\"",
|
||||
"",
|
||||
"\t\tmodel = $1",
|
||||
"\t\tfields = ('$3',)",
|
||||
""
|
||||
],
|
||||
"description": "ModelForm",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"fbool": {
|
||||
"prefix": "fbool",
|
||||
"body": "${1:FIELDNAME} = forms.BooleanField($2, required=${3:False})",
|
||||
"description": "BooleanField (fbool)",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"fchar": {
|
||||
"prefix": "fchar",
|
||||
"body": "${1:FIELDNAME} = forms.CharField($2,${3: max_length=$4,} required=${5:False})",
|
||||
"description": "CharField (fchar)",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"fchoice": {
|
||||
"prefix": "fchoice",
|
||||
"body": "${1:FIELDNAME} = forms.ChoiceField($2, choices=[${3:CHOICES}], required=${4:False})",
|
||||
"description": "ChoiceField (fchoice)",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"fcombo": {
|
||||
"prefix": "fcombo",
|
||||
"body": "${1:FIELDNAME} = forms.ComboField($2)",
|
||||
"description": "ComboField (fcombo)",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"fdate": {
|
||||
"prefix": "fdate",
|
||||
"body": "${1:FIELDNAME} = forms.DateField($2, required=${3:False})",
|
||||
"description": "DateField (fdate)",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"fdatetime": {
|
||||
"prefix": "fdatetime",
|
||||
"body": "${1:FIELDNAME} = forms.DateTimeField($2, required=${3:False})",
|
||||
"description": "DateTimeField (fdatetime)",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"fdecimal": {
|
||||
"prefix": "fdecimal",
|
||||
"body": "${1:FIELDNAME} = forms.DecimalField($2, required=${3:False})",
|
||||
"description": "DecimalField (fdecimal)",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"fduration": {
|
||||
"prefix": "fduration",
|
||||
"body": "${1:FIELDNAME} = forms.DurationField($2, required=${3:False})",
|
||||
"description": "DurationField (fduration)",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"femail": {
|
||||
"prefix": "femail",
|
||||
"body": "${1:FIELDNAME} = forms.EmailField($2, required=${3:False})",
|
||||
"description": "EmailField (femail)",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"ffile": {
|
||||
"prefix": "ffile",
|
||||
"body": "${1:FIELDNAME} = forms.FileField($2,${3: max_length=$4,} required=${5:False})",
|
||||
"description": "FileField (ffile)",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"ffilepath": {
|
||||
"prefix": "ffilepath",
|
||||
"body": "${1:FIELDNAME} = forms.FilePathField($2, path=${3:/absolute_path/}, required=${4:False})",
|
||||
"description": "FilePathField (ffilepath)",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"ffloat": {
|
||||
"prefix": "ffloat",
|
||||
"body": "${1:FIELDNAME} = forms.FloatField($2, required=${3:False})",
|
||||
"description": "FloatField (ffloat)",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"fip": {
|
||||
"prefix": "fip",
|
||||
"body": "${1:FIELDNAME} = forms.IPAddressField($2)",
|
||||
"description": "IPAddressField (fip).\n\nThis field has been deprecated since version 1.7 in favor of GenericIPAddressField.\n\n",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"fgenericip": {
|
||||
"prefix": "fip",
|
||||
"body": "${1:FIELDNAME} = forms.GenericIPAddressField($2)",
|
||||
"description": "IPAddressField (fgenericip)",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"fimg": {
|
||||
"prefix": "fimg",
|
||||
"body": "${1:FIELDNAME} = forms.ImageField($2, required=${3:False})",
|
||||
"description": "ImageField (fimg)",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"fint": {
|
||||
"prefix": "fint",
|
||||
"body": "${1:FIELDNAME} = forms.IntegerField($2, required=${3:False})",
|
||||
"description": "IntegerField (fint)",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"fmochoice": {
|
||||
"prefix": "fmochoice",
|
||||
"body": "${1:FIELDNAME} = forms.ModelChoiceField($2)",
|
||||
"description": "ModelChoiceField (fmochoice)",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"fmomuchoice": {
|
||||
"prefix": "fmomuchoice",
|
||||
"body": "${1:FIELDNAME} = forms.ModelMultipleChoiceField($2)",
|
||||
"description": "ModelMultipleChoiceField (fmomuchoice)",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"fmuval": {
|
||||
"prefix": "fmuval",
|
||||
"body": "${1:FIELDNAME} = forms.MultiValueField($2)",
|
||||
"description": "MultiValueField (fmuval)",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"fmuchoice": {
|
||||
"prefix": "fmuchoice",
|
||||
"body": "${1:FIELDNAME} = forms.MultipleChoiceField($2, choices=[${3:CHOICES}], required=${4:False})",
|
||||
"description": "MultipleChoiceField (fmuchoice)",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"ftypedmuchoice": {
|
||||
"prefix": "ftypedmuchoice",
|
||||
"body": "${1:FIELDNAME} = forms.TypedMultipleChoiceField($2, choices=[${3:CHOICES}], coerce=${4:TYPE}, required=${5:False})",
|
||||
"description": "TypedMultipleChoiceField (ftypedmuchoice)",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"fnullbool": {
|
||||
"prefix": "fnullbool",
|
||||
"body": "${1:FIELDNAME} = forms.NullBooleanField($2, required=${3:False})",
|
||||
"description": "NullBooleanField (fnullbool)",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"fregex": {
|
||||
"prefix": "fregex",
|
||||
"body": "${1:FIELDNAME} = forms.RegexField($2, regex=${3:REGEX}, required=${4:False})",
|
||||
"description": "RegexField (fregex)",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"fslug": {
|
||||
"prefix": "fslug",
|
||||
"body": "${1:FIELDNAME} = forms.SlugField($2, allow_unicode=${3:False}, required=${4:False})",
|
||||
"description": "SlugField (fslug)",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"fsdatetime": {
|
||||
"prefix": "fsdatetime",
|
||||
"body": "${1:FIELDNAME} = forms.SplitDateTimeField($2)",
|
||||
"description": "SplitDateTimeField (fsdatetime)",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"ftime": {
|
||||
"prefix": "ftime",
|
||||
"body": "${1:FIELDNAME} = forms.TimeField($2, required=${3:False})",
|
||||
"description": "TimeField (ftime)",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"ftchoice": {
|
||||
"prefix": "ftchoice",
|
||||
"body": "${1:FIELDNAME} = forms.TypedChoiceField($2, required=${3:False})",
|
||||
"description": "TypedChoiceField (ftchoice)",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"ftmuchoice": {
|
||||
"prefix": "ftmuchoice",
|
||||
"body": "${1:FIELDNAME} = forms.TypedMultipleChoiceField($2)",
|
||||
"description": "TypedMultipleChoiceField (ftmuchoice)",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"furl": {
|
||||
"prefix": "furl",
|
||||
"body": "${1:FIELDNAME} = forms.URLField($2, required=${3:False})",
|
||||
"description": "URLField (furl)",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"fuuid": {
|
||||
"prefix": "fuuid",
|
||||
"body": "${1:FIELDNAME} = forms.UUIDField($2, required=${3:False})",
|
||||
"description": "UUIDField (fuuid)",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"fsimplearray": {
|
||||
"prefix": "fsimplearray",
|
||||
"body": "${1:FIELDNAME} = SimpleArrayField()",
|
||||
"description": "SimpleArrayField (fsimplearray).\n\n*PostgreSQL specific form fields*.",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"fsplitarray": {
|
||||
"prefix": "fsplitarray",
|
||||
"body": "${1:FIELDNAME} = SplitArrayField()",
|
||||
"description": "SplitArrayField (fsplitarray).\n\n*PostgreSQL specific form fields*.",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"fhstore": {
|
||||
"prefix": "fhstore",
|
||||
"body": "${1:FIELDNAME} = HStoreField()",
|
||||
"description": "HStoreField (fhstore).\n\n*PostgreSQL specific form fields*.",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"fjson": {
|
||||
"prefix": "fjson",
|
||||
"body": "${1:FIELDNAME} = JSONField()",
|
||||
"description": "JSONField (fjson).\n\n*PostgreSQL specific form fields*.",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"fintrange": {
|
||||
"prefix": "fintrange",
|
||||
"body": "${1:FIELDNAME} = IntegerRangeField()",
|
||||
"description": "IntegerRangeField (fintrange).\n\n*PostgreSQL specific form fields*.",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"ffloatrange": {
|
||||
"prefix": "ffloatrange",
|
||||
"body": "${1:FIELDNAME} = FloatRangeField()",
|
||||
"description": "FloatRangeField (ffloatrange).\n\n*PostgreSQL specific form fields*.",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"fdatetimerange": {
|
||||
"prefix": "fdatetimerange",
|
||||
"body": "${1:FIELDNAME} = DateTimeRangeField()",
|
||||
"description": "DateTimeRangeField (fdatetimerange).\n\n*PostgreSQL specific form fields*.",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"fdaterange": {
|
||||
"prefix": "fdaterange",
|
||||
"body": "${1:FIELDNAME} = DateRangeField()",
|
||||
"description": "DateRangeField (fdaterange).\n\n*PostgreSQL specific form fields*.",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"ffi": {
|
||||
"prefix": "ffi",
|
||||
"body": "from .forms import $1",
|
||||
"description": "",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"iforms": {
|
||||
"prefix": "iforms",
|
||||
"body": "from django import forms",
|
||||
"description": "from ... import forms",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"ipostgresff": {
|
||||
"prefix": "ipostgresff",
|
||||
"body": "from django.contrib.postgres.forms import ${1|SimpleArrayField,SplitArrayField,HStoreField,JSONField,IntegerRangeField,FloatRangeField,DateTimeRangeField,DateRangeField|}",
|
||||
"description": "PostgreSQL specific forms fields",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"clean_data": {
|
||||
"prefix": "clean_data",
|
||||
"body": [
|
||||
"def clean_${1:FIELD}(self):",
|
||||
"\t${1:FIELD} = self.cleaned_data.get('${1:FIELD}')",
|
||||
"\n\n\t # TODO Validation\n",
|
||||
"\treturn ${1:FIELD}"
|
||||
],
|
||||
"description": "",
|
||||
"scope": "source.python"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,377 @@
|
||||
{
|
||||
"Model_full": {
|
||||
"prefix": "Model_full",
|
||||
"body": [
|
||||
"class ${1:MODELNAME}(models.Model):",
|
||||
"\t\"\"\"${2:Model definition for $1}.\"\"\"",
|
||||
"",
|
||||
"\t${3:# TODO: Define fields here}",
|
||||
"",
|
||||
"\tclass Meta:",
|
||||
"\t\t\"\"\"Meta definition for $1.\"\"\"",
|
||||
"",
|
||||
"\t\tverbose_name = '$1'",
|
||||
"\t\tverbose_name_plural = '$1s'",
|
||||
"",
|
||||
"\tdef ${4|__str__,__unicode__|}(self):",
|
||||
"\t\t\"\"\"Unicode representation of $1.\"\"\"",
|
||||
"\t\t${7|pass,return '{}'.format(self. ) # TODO,return f'{self. }' # TODO|}",
|
||||
"",
|
||||
"\tdef save(self):",
|
||||
"\t\t\"\"\"Save method for $1.\"\"\"",
|
||||
"\t\tpass",
|
||||
"",
|
||||
"\tdef get_absolute_url(self):",
|
||||
"\t\t\"\"\"Return absolute url for $1.\"\"\"",
|
||||
"\t\treturn ('')",
|
||||
"",
|
||||
"\t${6:# TODO: Define custom methods here}",
|
||||
""
|
||||
],
|
||||
"description": "Model (full)",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"Model": {
|
||||
"prefix": "Model",
|
||||
"body": [
|
||||
"class ${1:MODELNAME}(models.Model):",
|
||||
"\t\"\"\"${2:Model definition for $1}.\"\"\"",
|
||||
"",
|
||||
"\t${3:# TODO: Define fields here}",
|
||||
"",
|
||||
"\tclass Meta:",
|
||||
"\t\t\"\"\"Meta definition for $1.\"\"\"",
|
||||
"",
|
||||
"\t\tverbose_name = '$1'",
|
||||
"\t\tverbose_name_plural = '$1s'",
|
||||
"",
|
||||
"\tdef ${4|__str__,__unicode__|}(self):",
|
||||
"\t\t\"\"\"Unicode representation of $1.\"\"\"",
|
||||
"\t\t${5|pass,return '{}'.format(self. ) # TODO,return f'{self. }' # TODO|}",
|
||||
""
|
||||
],
|
||||
"description": "Model",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"modelmixin": {
|
||||
"prefix": "modelmixin",
|
||||
"body": [
|
||||
"class $1Mixin(models.Model):",
|
||||
"\t${2:# TODO}\r\n",
|
||||
"\tclass Meta:",
|
||||
"\t\tabstract = True"
|
||||
],
|
||||
"description": "",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"queryset": {
|
||||
"prefix": "qs",
|
||||
"body": ["class $1QuerySet(models.QuerySet):", "\tpass"],
|
||||
"description": "",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"manager": {
|
||||
"prefix": "mngr",
|
||||
"body": [
|
||||
"class $1Manager(models.Manager):",
|
||||
"\tdef get_queryset(self):",
|
||||
"\t\treturn super ($1Manager, self).get_queryset().${2|filter,exclude,order_by,distinct,reverse|}($3)"
|
||||
],
|
||||
"description": "Add extra Manager methods",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"queryset_from_manager": {
|
||||
"prefix": "qs_mngr",
|
||||
"body": [
|
||||
"class $1Manager(models.Manager):",
|
||||
"\tdef get_queryset(self):",
|
||||
"\t\treturn $1QuerySet(self.model, using=self._db)"
|
||||
],
|
||||
"description": "Modify the initial QuerySet the Manager returns.",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"mauto": {
|
||||
"prefix": "mauto",
|
||||
"body": "${1:FIELDNAME} = models.AutoField($2)",
|
||||
"description": "AutoField (mauto).\n\nAn IntegerField that automatically increments according to available IDs.\n\n",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"mbigauto": {
|
||||
"prefix": "mbigauto",
|
||||
"body": "${1:FIELDNAME} = models.BigAutoField($2)",
|
||||
"description": "BigAutoField (mbigauto).\n\n[New in Django 1.10.]\n\nA 64-bit integer, much like an AutoField.\n\n",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"mbigint": {
|
||||
"prefix": "mbigint",
|
||||
"body": "${1:FIELDNAME} = models.BigIntegerField($2)",
|
||||
"description": "BigIntegerField (mbigint).\n\nA 64-bit integer, much like an IntegerField.\n\n",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"mbinary": {
|
||||
"prefix": "mbinary",
|
||||
"body": "${1:FIELDNAME} = models.BinaryField($2)",
|
||||
"description": "BinaryField (mbinary).\n\nA field to store raw binary data.\n\n",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"mbool": {
|
||||
"prefix": "mbool",
|
||||
"body": "${1:FIELDNAME} = models.BooleanField($2)",
|
||||
"description": "BooleanField (mbool).\n\nA true/false field.\n\n",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"mchar": {
|
||||
"prefix": "mchar",
|
||||
"body": "${1:FIELDNAME} = models.CharField($2, max_length=${3:50})",
|
||||
"description": "CharField (mchar)",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"mcoseint": {
|
||||
"prefix": "mcoseint",
|
||||
"body": "${1:FIELDNAME} = models.CommaSeparatedIntegerField($2)",
|
||||
"description": "CommaSeparatedIntegerField (mcoseint).\n\nThis field is deprecated since 1.9 in favor of CharField with validators.\n\n",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"mdate": {
|
||||
"prefix": "mdate",
|
||||
"body": "${1:FIELDNAME} = models.DateField($2, auto_now=${3:False}, auto_now_add=${4:False})",
|
||||
"description": "DateField (mdate).\n\nA date, represented in Python by a datetime.date instance.\n\n",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"mdatetime": {
|
||||
"prefix": "mdatetime",
|
||||
"body": "${1:FIELDNAME} = models.DateTimeField($2, auto_now=${3:False}, auto_now_add=${4:False})",
|
||||
"description": "DateTimeField (mdatetime).\n\nA date, represented in Python by a datetime.datetime instance.\n\n",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"mdecimal": {
|
||||
"prefix": "mdecimal",
|
||||
"body": "${1:FIELDNAME} = models.DecimalField($2, max_digits=${3:5}, decimal_places=${4:2})",
|
||||
"description": "DecimalField (mdecimal).\n\nA fixed-precision decimal number, represented in Python by a Decimal instance.\n\n",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"mduration": {
|
||||
"prefix": "mduration",
|
||||
"body": "${1:FIELDNAME} = models.DurationField($2)",
|
||||
"description": "DurationField (mduration).\n\nA field for storing periods of time - modeled in Python by timedelta.\n\n",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"memail": {
|
||||
"prefix": "memail",
|
||||
"body": "${1:FIELDNAME} = models.EmailField($2, max_length=${3:254})",
|
||||
"description": "EmailField (memail).\n\nA CharField that checks that the value is a valid email address.\n\n",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"mfile": {
|
||||
"prefix": "mfile",
|
||||
"body": "${1:FIELDNAME} = models.FileField($2, upload_to=${3:None}, max_length=${4:100})",
|
||||
"description": "FileField (mfile).\n\nA file-upload field.\n\n",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"mfilepath": {
|
||||
"prefix": "mfilepath",
|
||||
"body": "${1:FIELDNAME} = models.FilePathField($2, path=${3:None}, match=${4:None}, recursive=${5:recursive}, max_length=${6:100})",
|
||||
"description": "FilePathField (mfilepath).\n\nA CharField whose choices are limited to the filenames in a certain directory on the filesystem.\n\n",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"mfloat": {
|
||||
"prefix": "mfloat",
|
||||
"body": "${1:FIELDNAME} = models.FloatField($2)",
|
||||
"description": "FloatField (mfloat).\n\nA floating-point number represented in Python by a float instance.\n\n",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"fk": {
|
||||
"prefix": "fk",
|
||||
"body": "${1:FIELDNAME} = models.ForeignKey(${2:OTHERMODEL}, on_delete=models.${3|CASCADE,PROTECT,SET_NULL,SET_DEFAULT,SET(),DO_NOTHING|})",
|
||||
"description": "ForeignKey (fk).\n\nA many-to-one relationship.\n\non_delete will become a required argument in Django 2.0. In older versions it defaults to CASCADE.\n\n",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"mip": {
|
||||
"prefix": "mip",
|
||||
"body": "${1:FIELDNAME} = models.IPAddressField($2)",
|
||||
"description": "IPAddressField (mip).\n\nThis field has been deprecated since version 1.7 in favor of GenericIPAddressField.\n\n",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"mimg": {
|
||||
"prefix": "mimg",
|
||||
"body": "${1:FIELDNAME} = models.ImageField($2, upload_to=${3:None}, height_field=${4:None}, width_field=${5:None}, max_length=${5:100})",
|
||||
"description": "ImageField (mimg).\n\nInherits all attributes and methods from FileField, but also validates that the uploaded object is a valid image.\n\n",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"mint": {
|
||||
"prefix": "mint",
|
||||
"body": "${1:FIELDNAME} = models.IntegerField($2)",
|
||||
"description": "IntegerField (mint).\n\nAn integer. Values from -2147483648 to 2147483647 are safe in all databases supported by Django.\n\n",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"mgenericip": {
|
||||
"prefix": "mgenericip",
|
||||
"body": "${1:FIELDNAME} = models.GenericIPAddressField($2, protocol=${3:'both'}, unpack_ipv4=${4:False})",
|
||||
"description": "GenericIPAddressField (mimg).\n\nAn IPv4 or IPv6 address, in string format.\n\n",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"m2m": {
|
||||
"prefix": "m2m",
|
||||
"body": "${1:FIELDNAME} = models.ManyToManyField(${2:OTHERMODEL})",
|
||||
"description": "ManyToManyField (m2m).\n\nA many-to-many relationship.\n\n",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"mnullbool": {
|
||||
"prefix": "mnullbool",
|
||||
"body": "${1:FIELDNAME} = models.NullBooleanField($2)",
|
||||
"description": "NullBooleanField (mnullbool).\n\nLike a BooleanField, but allows NULL as one of the options.\n\n",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"o2o": {
|
||||
"prefix": "o2o",
|
||||
"body": "${1:FIELDNAME} = models.OneToOneField(${2:OTHERMODEL}, on_delete=models.${3|CASCADE,PROTECT,SET_NULL,SET_DEFAULT,SET(),DO_NOTHING|})",
|
||||
"description": "OneToOneField (o2o).\n\nA one-to-one relationship.\n\non_delete will become a required argument in Django 2.0. In older versions it defaults to CASCADE.\n\n",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"mphone": {
|
||||
"prefix": "mphone",
|
||||
"body": "${1:FIELDNAME} = models.PhoneNumberField($2)",
|
||||
"description": "PhoneNumberField (mphone).\n\n*external package: django-phonenumber-field*\n\n",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"mposint": {
|
||||
"prefix": "mposint",
|
||||
"body": "${1:FIELDNAME} = models.PositiveIntegerField($2)",
|
||||
"description": "PositiveIntegerField (mposint).\n\nLike an IntegerField, but must be either positive or zero (0).\n\n",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"mpossmallint": {
|
||||
"prefix": "mpossmallint",
|
||||
"body": "${1:FIELDNAME} = models.PositiveSmallIntegerField($2)",
|
||||
"description": "PositiveSmallIntegerField (mpossmallint).\n\nLike a PositiveIntegerField, but only allows values under a certain (database-dependent) point.\n\n",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"mslug": {
|
||||
"prefix": "mslug",
|
||||
"body": "${1:FIELDNAME} = models.SlugField($2)",
|
||||
"description": "SlugField (mslug).\n\nA slug is a short label for something, containing only letters, numbers, underscores or hyphens. They’re generally used in URLs.\n\n",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"msmallint": {
|
||||
"prefix": "msmallint",
|
||||
"body": "${1:FIELDNAME} = models.SmallIntegerField($2)",
|
||||
"description": "SmallIntegerField (msmallint).\n\nLike an IntegerField, but only allows values under a certain (database-dependent) point.\n\n",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"mtext": {
|
||||
"prefix": "mtext",
|
||||
"body": "${1:FIELDNAME} = models.TextField($2)",
|
||||
"description": "TextField (mtext).\n\nA large text field.\n\n",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"mtime": {
|
||||
"prefix": "mtime",
|
||||
"body": "${1:FIELDNAME} = models.TimeField($2, auto_now=${4:False}, auto_now_add=${5:False})",
|
||||
"description": "TimeField (mtime).\n\nA time, represented in Python by a datetime.time instance.\n\n",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"murl": {
|
||||
"prefix": "murl",
|
||||
"body": "${1:FIELDNAME} = models.URLField($2, max_length=${3:200})",
|
||||
"description": "URLField (murl).\n\nA CharField for a URL.\n\n",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"musstate": {
|
||||
"prefix": "musstate",
|
||||
"body": "${1:FIELDNAME} = models.USStateField($2)",
|
||||
"description": "USStateField (musstate).\n\n*external package: django-localflavor*\n\n",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"muuid": {
|
||||
"prefix": "muuid",
|
||||
"body": "${1:FIELDNAME} = models.UUIDField($2)",
|
||||
"description": "UUIDField (muuid).\n\nA field for storing universally unique identifiers. Uses Python’s UUID class.\n\n",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"mxml": {
|
||||
"prefix": "mxml",
|
||||
"body": "${1:FIELDNAME} = models.XMLField($2)",
|
||||
"description": "XMLField (mxml).\n\n*All uses of XMLField can be replaced with TextField. This field has been deprecated since version 1.3*\n\n",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"mstore": {
|
||||
"prefix": "mstore",
|
||||
"body": "${1:FIELDNAME} = HStoreField()",
|
||||
"description": "HStoreField (mstore).\n\n*PostgreSQL specific model fields*.\n\nA field for storing key-value pairs. The Python data type used is a dict.\n\n",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"mjson": {
|
||||
"prefix": "mjson",
|
||||
"body": "${1:FIELDNAME} = JSONField()",
|
||||
"description": "JSONField (mjson).\n\n*PostgreSQL specific model fields*.\n\n[New in Django 1.11.]\n\nA field for storing JSON encoded data.\n\n",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"marray": {
|
||||
"prefix": "marray",
|
||||
"body": "${1:FIELDNAME} = ArrayField()",
|
||||
"description": "ArrayField (marray).\n\n*PostgreSQL specific model fields*.\n\nA field for storing lists of data\n\n",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"fmai": {
|
||||
"prefix": "fmai",
|
||||
"body": "from .managers import $1QuerySet",
|
||||
"description": "",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"fmi": {
|
||||
"prefix": "fmi",
|
||||
"body": "from .models import $1",
|
||||
"description": "",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"imodels": {
|
||||
"prefix": "imodels",
|
||||
"body": "from django.db import models",
|
||||
"description": "from ... import models",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"ipy2_unicode_compatible": {
|
||||
"prefix": "iuc",
|
||||
"body": "from django.utils.encoding import python_2_unicode_compatible",
|
||||
"description": "For forwards compatibility, this decorator is available as of Django 1.4.2.",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"ipostgresmf": {
|
||||
"prefix": "ipostgresmf",
|
||||
"body": "from django.contrib.postgres.fields import ${1|ArrayField,JSONField,HStoreField|}",
|
||||
"description": "PostgreSQL specific model fields",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"isignals": {
|
||||
"prefix": "isignals",
|
||||
"body": "from django.db.models.signals import ${1|pre_init,post_init,pre_save,post_save,pre_delete,post_delete,m2m_changed,class_prepared,Management signals,pre_migrate,post_migrate|}",
|
||||
"description": "Signals for Django Model",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"__str__": {
|
||||
"prefix": "str",
|
||||
"body": ["def __str__(self):", "\treturn self${1: # TODO}"],
|
||||
"description": "",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"get_absolute_url": {
|
||||
"prefix": "get_absolute_url",
|
||||
"body": [
|
||||
"def get_absolute_url(self):",
|
||||
"\tfrom django.core.urlresolvers import reverse",
|
||||
"\treturn reverse('$1', kwargs={'pk': self.pk})"
|
||||
],
|
||||
"description": "",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"receiver": {
|
||||
"prefix": "receiver",
|
||||
"body": [
|
||||
"def ${1:FUNCTIONNAME}_${2|pre_init,post_init,pre_save,post_save,pre_delete,post_delete,m2m_changed,class_prepared,Management signals,pre_migrate,post_migrate|}_receiver(sender, instance, *args, **kwargs):",
|
||||
"\tpass",
|
||||
"\n\n${2|pre_init,post_init,pre_save,post_save,pre_delete,post_delete,m2m_changed,class_prepared,Management signals,pre_migrate,post_migrate|}.connect(${1:name}_${2|pre_init,post_init,pre_save,post_save,pre_delete,post_delete,m2m_changed,class_prepared,Management signals,pre_migrate,post_migrate|}_receiver, sender=${3:MODELNAME})"
|
||||
],
|
||||
"description": "",
|
||||
"scope": "source.python"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
{
|
||||
"ilib": {
|
||||
"prefix": "ilib",
|
||||
"body": ["from django import template", "register = template.Library()"],
|
||||
"description": "",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"li18n": {
|
||||
"prefix": "li18n",
|
||||
"body": "{% load i18n %}",
|
||||
"description": "",
|
||||
"scope": "text.html.django"
|
||||
},
|
||||
"lstatic": {
|
||||
"prefix": "lstatic",
|
||||
"body": "{% load staticfiles %}",
|
||||
"description": "",
|
||||
"scope": "text.html.django"
|
||||
},
|
||||
"ltags": {
|
||||
"prefix": "ltags",
|
||||
"body": "{% load $SELECTION$1_tags %}",
|
||||
"description": "",
|
||||
"scope": "text.html.django"
|
||||
},
|
||||
"register_assignment_tag": {
|
||||
"prefix": "register_assignment_tag",
|
||||
"body": [
|
||||
"def get_$1(context):",
|
||||
"\trequest = context.get('request')",
|
||||
"\t$1 = ${2:[]}",
|
||||
"\treturn ${3:$1}"
|
||||
],
|
||||
"description": "",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"register_filter": {
|
||||
"prefix": "register_filter",
|
||||
"body": ["@register.filter", "def $1(value):", "\treturn value$2"],
|
||||
"description": "",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"register_inclusion_tag": {
|
||||
"prefix": "register_inclusion_tag",
|
||||
"body": [
|
||||
"@register.inclusion_tag(${2:'$1.html'}, takes_context=True)",
|
||||
"def $1(context):",
|
||||
"\trequest = context.get('request')",
|
||||
"\t$3",
|
||||
"\treturn {",
|
||||
"\t\t'request': request,",
|
||||
"\t\t$4",
|
||||
"\t}"
|
||||
],
|
||||
"description": "",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"register_simple_tag": {
|
||||
"prefix": "register_simple_tag",
|
||||
"body": [
|
||||
"@register.simple_tag(takes_context=True)",
|
||||
"def $1(context):",
|
||||
"\trequest = context.get('request')",
|
||||
"\treturn ${2:'It Works!'}"
|
||||
],
|
||||
"description": "",
|
||||
"scope": "source.python"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,94 @@
|
||||
{
|
||||
"urlresolvers": {
|
||||
"prefix": "iurlresolvers",
|
||||
"body": "from django.core.urlresolvers import ${1|reverse,reverse_lazy,resolve,get_script_prefix|}",
|
||||
"description": "*Deprecated since version 1.10*\n\nUtility functions.\n\n",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"urls (≥1.10 & ≤1.11)": {
|
||||
"prefix": "iurls",
|
||||
"body": "from django.urls import ${1|reverse,reverse_lazy,resolve,get_script_prefix|}",
|
||||
"description": "Utility functions for use in URLconfs.",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"conf.urls (≤1.11)": {
|
||||
"prefix": "iconf_urls",
|
||||
"body": "from django.conf.urls import ${1|static,url,include,handler400,handler403,handler404,handler500|}",
|
||||
"description": "Utility functions for use in URLconfs.",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"urls (≥2.0)": {
|
||||
"prefix": "iurls",
|
||||
"body": "from django.urls import ${1|path,re_path,include,reverse,reverse_lazy,register_converter|}",
|
||||
"description": "Utility functions for use in URLconfs.",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"conf.urls (≥2.0)": {
|
||||
"prefix": "iconf_urls",
|
||||
"body": "from django.conf.urls import ${1|static,url,handler400,handler403,handler404,handler500|}",
|
||||
"description": "Utilityfunctions for use in URLconfs.",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"url_stack": {
|
||||
"prefix": "url_stack",
|
||||
"body": [
|
||||
"${1|url,re_path|}(",
|
||||
"\tr'^${2:REGEX}/$',",
|
||||
"\t${3:VIEW}${4:.as_view()},",
|
||||
"\tname='$5'",
|
||||
"),"
|
||||
],
|
||||
"description": "url(regex, view, kwargs=None, name=None)\n\n*url is an alias to re_path*\n\n",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"url_inline": {
|
||||
"prefix": "url_inline",
|
||||
"body": [
|
||||
"${1|url,re_path|}(r'^${2:REGEX}/$', ${3:VIEW}${4:.as_view()}, name='$5'),"
|
||||
],
|
||||
"description": "url(regex, view, kwargs=None, name=None)\n\n*url is an alias to re_path*\n\n",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"path_stack": {
|
||||
"prefix": "path_stack",
|
||||
"body": [
|
||||
"path(",
|
||||
"\t'${1:ROUTE}/',",
|
||||
"\t${2:VIEW}${3:.as_view()},",
|
||||
"\tname='$4'",
|
||||
"),"
|
||||
],
|
||||
"description": "path(route, view, kwargs=None, name=None)",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"path_inline": {
|
||||
"prefix": "path_inline",
|
||||
"body": ["path('${1:ROUTE}/', ${2:VIEW}${3:.as_view()}, name='$4'),"],
|
||||
"description": "path(route, view, kwargs=None, name=None)",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"urlpatterns": {
|
||||
"prefix": "urlpatterns",
|
||||
"body": ["urlpatterns = [", "\t$0", "]"],
|
||||
"description": "",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"repk": {
|
||||
"prefix": "repk",
|
||||
"body": "r'^(?P<${1:pk}>d+)/$'",
|
||||
"description": "PK URL regex",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"reslug": {
|
||||
"prefix": "reslug",
|
||||
"body": "r'^(?P<${1:slug}>[-w]+)/$'",
|
||||
"description": "Slug URL regex",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"reusername": {
|
||||
"prefix": "reusername",
|
||||
"body": "r'^(?P<username>[w.@+-]+)/$'",
|
||||
"description": "Username regex",
|
||||
"scope": "source.python"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
{
|
||||
"createview": {
|
||||
"prefix": "createview",
|
||||
"body": "\r\nclass ${1:MODEL_NAME}CreateView(CreateView):\r\n model = ${1:MODEL_NAME}\r\n template_name = \"${2:TEMPLATE_NAME}\"\r\n",
|
||||
"description": "",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"deleteview": {
|
||||
"prefix": "deleteview",
|
||||
"body": "\r\nclass ${1:MODEL_NAME}DeleteView(DeleteView):\r\n model = ${1:MODEL_NAME}\r\n template_name = \"${2:TEMPLATE_NAME}\"\r\n",
|
||||
"description": "",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"detailview": {
|
||||
"prefix": "detailview",
|
||||
"body": "\r\nclass ${1:MODEL_NAME}DetailView(DetailView):\r\n model = ${1:MODEL_NAME}\r\n template_name = \"${2:TEMPLATE_NAME}\"\r\n",
|
||||
"description": "",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"listview": {
|
||||
"prefix": "listview",
|
||||
"body": "\r\nclass ${1:MODEL_NAME}ListView(ListView):\r\n model = ${1:MODEL_NAME}\r\n template_name = \"${2:TEMPLATE_NAME}\"\r\n",
|
||||
"description": "",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"templateview": {
|
||||
"prefix": "templateview",
|
||||
"body": "\r\nclass ${1:CLASS_NAME}(TemplateView):\r\n template_name = \"${2:TEMPLATE_NAME}\"\r\n",
|
||||
"description": "",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"updateview": {
|
||||
"prefix": "updateview",
|
||||
"body": "\r\nclass ${1:MODEL_NAME}UpdateView(UpdateView):\r\n model = ${1:MODEL_NAME}\r\n template_name = \"${2:TEMPLATE_NAME}\"\r\n",
|
||||
"description": "",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"from views import": {
|
||||
"prefix": "fvi",
|
||||
"body": "from .views import $1",
|
||||
"description": "",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"igenericviews": {
|
||||
"prefix": "igenericviews",
|
||||
"body": "from django.views.generic import ${1|CreateView,DetailView,FormView,ListView,TemplateView,UpdateView|}",
|
||||
"description": "Generic class-based views",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"isettings": {
|
||||
"prefix": "isettings",
|
||||
"body": "from django.conf import settings",
|
||||
"description": "from django.conf import settings",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"view": {
|
||||
"prefix": "view",
|
||||
"body": "def ${1:VIEWNAME}(request):",
|
||||
"description": "View",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"dispatch": {
|
||||
"prefix": "dispatch",
|
||||
"body": "\r\ndef dispatch(self, request, *args, **kwargs):\r\n return super(${1:CLASS_NAME}, self).dispatch(request, *args, **kwargs)\r\n",
|
||||
"description": "",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"context": {
|
||||
"prefix": "get_context_data",
|
||||
"body": "\r\ndef get_context_data(self, **kwargs):\r\n context = super(${1:CLASS_NAME}, self).get_context_data(**kwargs)\r\n return context\r\n",
|
||||
"description": "",
|
||||
"scope": "source.python"
|
||||
},
|
||||
"get_queryset": {
|
||||
"prefix": "get_queryset",
|
||||
"body": [
|
||||
"def get_queryset(self):",
|
||||
"\tqueryset = super(${1:CLASS_NAME}, self).get_queryset()",
|
||||
"\tqueryset = queryset${3: # TODO}",
|
||||
"\treturn queryset"
|
||||
],
|
||||
"description": "",
|
||||
"scope": "source.python"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,335 @@
|
||||
{
|
||||
"autoescape": {
|
||||
"prefix": "autoescape",
|
||||
"description": "autoescape tag django template",
|
||||
"body": [
|
||||
"{% autoescape ${off} %}",
|
||||
"$2",
|
||||
"{% autoescape %}"
|
||||
]
|
||||
},
|
||||
"block": {
|
||||
"prefix": "block",
|
||||
"description": "block tag django template",
|
||||
"body": [
|
||||
"{% block ${blockname} %}",
|
||||
"$2",
|
||||
"{% endblock ${blockname} %}"
|
||||
]
|
||||
},
|
||||
"comment": {
|
||||
"prefix": "comment",
|
||||
"description": "Comment tag django template",
|
||||
"body": [
|
||||
"{% comment %}",
|
||||
" $1",
|
||||
"{% endcomment %}"
|
||||
]
|
||||
},
|
||||
"csrf": {
|
||||
"prefix": "csrf",
|
||||
"description": "csrf token django template",
|
||||
"body": [
|
||||
"{% csrf_token %}"
|
||||
]
|
||||
},
|
||||
"cycle": {
|
||||
"prefix": "cycle",
|
||||
"description": "cycle tag django template",
|
||||
"body": [
|
||||
"{% cycle %}"
|
||||
]
|
||||
},
|
||||
"debug": {
|
||||
"prefix": "debug",
|
||||
"description": "debug tag django template",
|
||||
"body": [
|
||||
"{% debug %}"
|
||||
]
|
||||
},
|
||||
"ext": {
|
||||
"prefix": "ext",
|
||||
"description": "extends tag django template",
|
||||
"body": [
|
||||
"{% extends \"$1\" %}"
|
||||
]
|
||||
},
|
||||
"extends": {
|
||||
"prefix": "extends",
|
||||
"description": "extends tag django template",
|
||||
"body": [
|
||||
"{% extends \"$1\" %}"
|
||||
]
|
||||
},
|
||||
"filter": {
|
||||
"prefix": "filter",
|
||||
"description": "filter tag django template",
|
||||
"body": [
|
||||
"{% filter $1 %}",
|
||||
"$2",
|
||||
"{% endfilter %}"
|
||||
]
|
||||
},
|
||||
"firstof": {
|
||||
"prefix": "firstof",
|
||||
"description": "firstof tag django template",
|
||||
"body": [
|
||||
"{% firstof %}"
|
||||
]
|
||||
},
|
||||
"for": {
|
||||
"prefix": "for",
|
||||
"description": "for tag django template",
|
||||
"body": [
|
||||
"{% for $1 in $2 %}",
|
||||
"$3",
|
||||
"{% endfor %}"
|
||||
]
|
||||
},
|
||||
"fore": {
|
||||
"prefix": "fore",
|
||||
"description": "foreach with empty tag django template",
|
||||
"body": [
|
||||
"{% for $1 in $2 %}",
|
||||
"$3",
|
||||
"{% empty %}",
|
||||
"$4",
|
||||
"{% endfor %}"
|
||||
]
|
||||
},
|
||||
"if": {
|
||||
"prefix": "if",
|
||||
"description": "if tag django template",
|
||||
"body": [
|
||||
"{% if $1 %}",
|
||||
"$2",
|
||||
"{% endif %}"
|
||||
]
|
||||
},
|
||||
"ifchanged": {
|
||||
"prefix": "ifchanged",
|
||||
"description": "ifchanged tag django template",
|
||||
"body": [
|
||||
"{% ifchanged $1 %}",
|
||||
"$2",
|
||||
"{% endifchanged %}"
|
||||
]
|
||||
},
|
||||
"ife": {
|
||||
"prefix": "ife",
|
||||
"description": "if else tag django template",
|
||||
"body": [
|
||||
"{% if $1 %}",
|
||||
"$2",
|
||||
"{% else %}",
|
||||
"$3",
|
||||
"{% endif %}",
|
||||
""
|
||||
]
|
||||
},
|
||||
"ifelse": {
|
||||
"prefix": "ifelse",
|
||||
"description": "if else tag django template",
|
||||
"body": [
|
||||
"{% if $1 %}",
|
||||
"$2",
|
||||
"{% else %}",
|
||||
"$3",
|
||||
"{% endif %}",
|
||||
""
|
||||
]
|
||||
},
|
||||
"ifeq": {
|
||||
"prefix": "ifeq",
|
||||
"description": "ifequal tag django template",
|
||||
"body": [
|
||||
"{% ifequal $1 %}",
|
||||
"$2",
|
||||
"{% endifequal %}"
|
||||
]
|
||||
},
|
||||
"ifequal": {
|
||||
"prefix": "ifeq",
|
||||
"description": "ifequal tag django template",
|
||||
"body": [
|
||||
"{% ifequal $1 %}",
|
||||
"$2",
|
||||
"{% endifequal %}"
|
||||
]
|
||||
},
|
||||
"ifnotequal": {
|
||||
"prefix": "ifnotequal",
|
||||
"description": "ifnotequal tag django template",
|
||||
"body": [
|
||||
"{% ifnotequal $1 %}",
|
||||
"$2",
|
||||
"{% ifnotequal %}"
|
||||
]
|
||||
},
|
||||
"inc": {
|
||||
"prefix": "inc",
|
||||
"description": "include tag django template",
|
||||
"body": [
|
||||
"{% include \"$1\" %}"
|
||||
]
|
||||
},
|
||||
"include": {
|
||||
"prefix": "include",
|
||||
"description": "include tag django template",
|
||||
"body": [
|
||||
"{% include \"$1\" %}"
|
||||
]
|
||||
},
|
||||
"load": {
|
||||
"prefix": "load",
|
||||
"description": "load tag django template",
|
||||
"body": [
|
||||
"{% load $1 %}"
|
||||
]
|
||||
},
|
||||
"now": {
|
||||
"prefix": "now",
|
||||
"description": "now tag django template",
|
||||
"body": [
|
||||
"{% now \"$1\" %}"
|
||||
]
|
||||
},
|
||||
"regroup": {
|
||||
"prefix": "regroup",
|
||||
"description": "regroup tag django template",
|
||||
"body": [
|
||||
"{% regroup $1 by $2 as $3 %}"
|
||||
]
|
||||
},
|
||||
"spaceless": {
|
||||
"prefix": "spaceless",
|
||||
"description": "spaceless tag django template",
|
||||
"body": [
|
||||
"{% spaceless %}",
|
||||
" $1",
|
||||
"{% endspaceless %}"
|
||||
]
|
||||
},
|
||||
"ssi": {
|
||||
"prefix": "ssi",
|
||||
"description": "ssi tag django template",
|
||||
"body": [
|
||||
"{% ssi $1 parsed %}"
|
||||
]
|
||||
},
|
||||
"static": {
|
||||
"prefix": "static",
|
||||
"description": "static tag django template",
|
||||
"body": [
|
||||
"{% static \"$1\" %}"
|
||||
]
|
||||
},
|
||||
"templatetag": {
|
||||
"prefix": "templatetag",
|
||||
"description": "templatetag tag django template",
|
||||
"body": [
|
||||
"{% templatetag $1 %}"
|
||||
]
|
||||
},
|
||||
"url": {
|
||||
"prefix": "url",
|
||||
"description": "url tag django template",
|
||||
"body": [
|
||||
"{% url $1 %}"
|
||||
]
|
||||
},
|
||||
"verbatim": {
|
||||
"prefix": "verbatim",
|
||||
"description": "verbatim tag django template",
|
||||
"body": [
|
||||
"{% verbatim %}",
|
||||
" $1",
|
||||
"{% endverbatim %}"
|
||||
]
|
||||
},
|
||||
"widthratio": {
|
||||
"prefix": "widthratio",
|
||||
"description": "widthratio tag django template",
|
||||
"body": [
|
||||
"{% widthratio ${this_value} max_value 100 %}"
|
||||
]
|
||||
},
|
||||
"with": {
|
||||
"prefix": "with",
|
||||
"description": "with tag django template",
|
||||
"body": [
|
||||
"{% with $1 as $2 %}",
|
||||
"$3",
|
||||
"{% endwith %}"
|
||||
]
|
||||
},
|
||||
"trans": {
|
||||
"prefix": "trans",
|
||||
"description": "trans tag django template",
|
||||
"body": [
|
||||
"{% trans \"$1\" %}"
|
||||
]
|
||||
},
|
||||
"blocktrans": {
|
||||
"prefix": "blocktrans",
|
||||
"description": "blocktrans tag django template",
|
||||
"body": [
|
||||
"{% blocktrans %}",
|
||||
" $1",
|
||||
"{% endblocktrans %}"
|
||||
]
|
||||
},
|
||||
"super": {
|
||||
"prefix": "super",
|
||||
"description": "Block super",
|
||||
"body": [
|
||||
"{{ block.super }}"
|
||||
]
|
||||
},
|
||||
"extrahead": {
|
||||
"prefix": "extrahead",
|
||||
"description": "Extrahead no oficial tag",
|
||||
"body": [
|
||||
"{% block extrahead %}",
|
||||
" $1",
|
||||
"{% endblock extrahead %}"
|
||||
]
|
||||
},
|
||||
"extrastyle": {
|
||||
"prefix": "extrastyle",
|
||||
"description": "Extrastyle no oficial Tag",
|
||||
"body": [
|
||||
"{% block extrahead %}",
|
||||
" $1",
|
||||
"{% endblock extrahead %}"
|
||||
]
|
||||
},
|
||||
"var": {
|
||||
"prefix": "var",
|
||||
"description": "Variable autocomplete",
|
||||
"body": [
|
||||
"{{ $1 }}"
|
||||
]
|
||||
},
|
||||
"tag": {
|
||||
"prefix": "tag",
|
||||
"description": "tag autocomplete no oficial",
|
||||
"body": [
|
||||
"{% $1 %}"
|
||||
]
|
||||
},
|
||||
"staticurl": {
|
||||
"prefix": "staticurl",
|
||||
"description": "STATIC_URL no oficial var",
|
||||
"body": [
|
||||
"{{ STATIC_URL }}"
|
||||
]
|
||||
},
|
||||
"mediaurl": {
|
||||
"prefix": "mediaurl",
|
||||
"description": "",
|
||||
"body": [
|
||||
"{{ MEDIA_URL }}"
|
||||
]
|
||||
}
|
||||
}
|
||||
322
dot_vim/plugged/friendly-snippets/snippets/frameworks/edge.json
Normal file
322
dot_vim/plugged/friendly-snippets/snippets/frameworks/edge.json
Normal file
@@ -0,0 +1,322 @@
|
||||
{
|
||||
"edge: Block": {
|
||||
"prefix": "block",
|
||||
"body": ["{{ $1 }}"],
|
||||
"description": "Edge: block tag"
|
||||
},
|
||||
"edge: Comment": {
|
||||
"prefix": "comment",
|
||||
"body": ["{{-- $1 --}}"],
|
||||
"description": "Edge: comment tag"
|
||||
},
|
||||
"edge: Conditional": {
|
||||
"prefix": "@if",
|
||||
"body": ["@if($1)", " $2", "@end"],
|
||||
"description": "Edge: if tag accepts the expression to evaluate as the only argument."
|
||||
},
|
||||
"edge: Conditional with an else statement": {
|
||||
"prefix": "@ifelse",
|
||||
"body": ["@if($1)", " $2", "@else", " $3", "@end"],
|
||||
"description": "Edge: if else tag accepts the expression to evaluate as the only argument."
|
||||
},
|
||||
"edge: Conditional with else and elseif statement": {
|
||||
"prefix": "@ifelseif",
|
||||
"body": ["@if($1)", " $2", "@elseif($3)", " $4", "@else", " $5", "@end"],
|
||||
"description": "Edge: if else tag"
|
||||
},
|
||||
"edge: Inverse conditional": {
|
||||
"prefix": "@unless",
|
||||
"body": ["@unless($1)", " $2", "@else", " $3", "@end"],
|
||||
"description": "Edge: unless tag inverse if statement."
|
||||
},
|
||||
"edge: for each loop with index": {
|
||||
"prefix": "@each-index",
|
||||
"body": ["@each(${1:key}, ${2:value} in ${3:object})", " $3", "@end"],
|
||||
"description": "Edge: each index tag with key value"
|
||||
},
|
||||
"edge: For Each Loop": {
|
||||
"prefix": "@each-in",
|
||||
"body": ["@each(${1:item} in ${2:array})", " $3", "@end"],
|
||||
"description": "Edge: each in tag let you loop over an array or an object of values."
|
||||
},
|
||||
"edge: Component with body": {
|
||||
"prefix": "@component",
|
||||
"body": ["@component('${1:name}')", " $2", "@end"],
|
||||
"description": "Edge: component tag allows you to use an Edge template as a component."
|
||||
},
|
||||
"edge: Inline component": {
|
||||
"prefix": "@!component",
|
||||
"body": ["@!component('${1:name}')"],
|
||||
"description": "Edge: inline component tag allows you to use an Edge template as a component."
|
||||
},
|
||||
"edge: Component slot": {
|
||||
"prefix": "@slot",
|
||||
"body": ["@slot('${1:name}')", " $2", "@end"],
|
||||
"description": "Edge: slot tag allows you define the markup for the named slots. It accepts the slot name as the first argument and can also receive additional arguments from the component template."
|
||||
},
|
||||
"edge: Inject": {
|
||||
"prefix": "@inject",
|
||||
"body": ["@inject('${1:values}')"],
|
||||
"description": "Edge: inject tag allows the component template to inject data into the component tree. The tag accepts an object as the only argument."
|
||||
},
|
||||
"edge: Include partial": {
|
||||
"prefix": "@include",
|
||||
"body": ["@include('${1:name}')"],
|
||||
"description": "Edge: include tag allows you include a partial to a given template"
|
||||
},
|
||||
"edge: Include conditional partial": {
|
||||
"prefix": "@includeIf",
|
||||
"body": ["@includeIf(${1:condition}, '${2:name}')"],
|
||||
"description": "Edge: includeif tag to include a partial conditionally. The first argument is the condition to evaluate before including the partial."
|
||||
},
|
||||
"edge: Layout": {
|
||||
"prefix": "@layout",
|
||||
"body": ["@layout('${1:name}')"],
|
||||
"description": "Edge: layout tag allows you define the layout template for the current template."
|
||||
},
|
||||
"edge: Section block": {
|
||||
"prefix": "@section",
|
||||
"body": ["@section('${1:name}')", " $2", "@end"],
|
||||
"description": "Edge: section tag use the layout must define all the markup inside the sections exported by the layout"
|
||||
},
|
||||
"edge: Inline section": {
|
||||
"prefix": "@!section",
|
||||
"body": ["@!section('${1:name}')"],
|
||||
"description": "Edge: section inline tag use the layout must define all the markup inside the sections exported by the layout"
|
||||
},
|
||||
"edge: Super": {
|
||||
"prefix": "@super",
|
||||
"body": ["@super"],
|
||||
"description": "Edge: super tag allows you to inherit the existing content of the section. It is an inline tag and does not accept any arguments."
|
||||
},
|
||||
"edge: Bouncer can guard": {
|
||||
"prefix": "@can",
|
||||
"body": ["@can('${1:ability}', ${2:args})", " $3", "@end"],
|
||||
"description": "Edge: can tag from @adonisjs/bouncer allows you write conditionals around the bouncer permissions."
|
||||
},
|
||||
"edge: Bouncer cannot guard": {
|
||||
"prefix": "@cannot",
|
||||
"body": ["@cannot('${1:ability}', ${2:args})", " $3", "@end"],
|
||||
"description": "Edge: cannot tag from @adonisjs/bouncer allows you write conditionals around the bouncer permissions."
|
||||
},
|
||||
"edge: Debugger": {
|
||||
"prefix": "@debugger",
|
||||
"body": ["@debugger"],
|
||||
"description": "Edge: debugger tag is an inline tag. It drops the debugger keyword to the template output. You can use the chrome devtools to debug the compiled templates."
|
||||
},
|
||||
"edge: Define local variable": {
|
||||
"prefix": "@set",
|
||||
"body": ["@set('$1', $2)"],
|
||||
"description": "Edge: set tag is an inline tag. That allows you to define local variables within the template scope or mutate the value of an existing variable."
|
||||
},
|
||||
"edge: Entry point scripts": {
|
||||
"prefix": "@entryPointScripts",
|
||||
"body": ["@entryPointScripts('$1')"],
|
||||
"description": "Edge: entryPointScripts tag is an inline tag. Renders the required script for a given entrypoint."
|
||||
},
|
||||
"edge: Entry point styles": {
|
||||
"prefix": "@entryPointStyles",
|
||||
"body": ["@entryPointStyles('$1')"],
|
||||
"description": "Edge: entryPointStyles tag is an inline tag. Renders the required link for a given entrypoint."
|
||||
},
|
||||
"edge: app": {
|
||||
"prefix": "app",
|
||||
"body": "app",
|
||||
"description": "Reference to application instance"
|
||||
},
|
||||
"edge: asset": {
|
||||
"prefix": "asset",
|
||||
"body": "asset('${1:filePath}')",
|
||||
"description": "Get path to a frontend asset"
|
||||
},
|
||||
"edge: auth.isLoggedIn": {
|
||||
"prefix": "auth.isLoggedIn",
|
||||
"body": "auth.isLoggedIn",
|
||||
"description": "Find if user is loggedin"
|
||||
},
|
||||
"edge: auth.user": {
|
||||
"prefix": "auth.user",
|
||||
"body": "auth.user",
|
||||
"description": "Get auth user"
|
||||
},
|
||||
"edge: camelCase": {
|
||||
"prefix": "camelCase",
|
||||
"body": "camelCase(${1:'${2:value}'})",
|
||||
"description": "Convert a string to camelcase"
|
||||
},
|
||||
"edge: capitalCase": {
|
||||
"prefix": "capitalCase",
|
||||
"body": "capitalCase(${1:'${2:value}'})",
|
||||
"description": "Convert a string to capitalCase"
|
||||
},
|
||||
"edge: config": {
|
||||
"prefix": "config",
|
||||
"body": "config('${1:key}')",
|
||||
"description": "Get config value"
|
||||
},
|
||||
"edge: cspNonce": {
|
||||
"prefix": "cspNonce",
|
||||
"body": "cspNonce",
|
||||
"description": "Use csp nonce on script tag"
|
||||
},
|
||||
"edge: csrfField": {
|
||||
"prefix": "csrfField()",
|
||||
"body": "csrfField()",
|
||||
"description": "Add csrfField input field to form"
|
||||
},
|
||||
"edge: dashCase": {
|
||||
"prefix": "dashCase",
|
||||
"body": "dashCase(${1:'${2:value}'})",
|
||||
"description": "Convert a string to dashCase"
|
||||
},
|
||||
"edge: dotCase": {
|
||||
"prefix": "dotCase",
|
||||
"body": "dotCase(${1:'${2:value}'})",
|
||||
"description": "Convert a string to dotCase"
|
||||
},
|
||||
"edge: driveSignedUrl": {
|
||||
"prefix": "driveSignedUrl",
|
||||
"body": "await driveSignedUrl('${1:location}'${2:, 'optionalDiskName'})",
|
||||
"description": "Get signed URL to a file using AdonisJS drive"
|
||||
},
|
||||
"edge: driveUrl": {
|
||||
"prefix": "driveUrl",
|
||||
"body": "await driveUrl('${1:location}'${2:, 'optionalDiskName'})",
|
||||
"description": "Get URL to a file using AdonisJS drive"
|
||||
},
|
||||
"edge: e": {
|
||||
"prefix": "e",
|
||||
"body": "e(${1:'${2:markup}'})",
|
||||
"description": "Escape HTML markup"
|
||||
},
|
||||
"edge: env": {
|
||||
"prefix": "env",
|
||||
"body": "env('${1:key}')",
|
||||
"description": "Get environment variable value"
|
||||
},
|
||||
"edge: excerpt": {
|
||||
"prefix": "excerpt",
|
||||
"body": "excerpt(${1:value}, ${2:100})",
|
||||
"description": "Generate plain text excerpt and truncate after given characters count"
|
||||
},
|
||||
"edge: flashMessages.all": {
|
||||
"prefix": "inspect(flashMessages.all())",
|
||||
"body": "inspect(flashMessages.all())",
|
||||
"description": "Inspect all messages"
|
||||
},
|
||||
"edge: flashMessages.get": {
|
||||
"prefix": "flashMessages.get",
|
||||
"body": "flashMessages.get('$1', $2)",
|
||||
"description": "Get flash message value"
|
||||
},
|
||||
"edge: flashMessages.has": {
|
||||
"prefix": "flashMessages.has",
|
||||
"body": "flashMessages.has('$1')",
|
||||
"description": "Check if a flash message exists"
|
||||
},
|
||||
"edge: inspect": {
|
||||
"body": "inspect($1)",
|
||||
"prefix": "inspect",
|
||||
"description": "inspect global helper to inspect a value or the entire state of the template. The helper method can pretty print the following JavaScript primitives."
|
||||
},
|
||||
"edge: nl2br": {
|
||||
"prefix": "nl2br",
|
||||
"body": "nl2br(e(${1:'${2:body}'}))",
|
||||
"description": "Convert new line to br tags"
|
||||
},
|
||||
"edge: noCase": {
|
||||
"prefix": "noCase",
|
||||
"body": "noCase(${1:'${2:value}'})",
|
||||
"description": "Remove all sort of casing from a string"
|
||||
},
|
||||
"edge: ordinalize": {
|
||||
"prefix": "ordinalize",
|
||||
"body": "ordinalize(${1:value})",
|
||||
"description": "Ordinalize a string or a number value"
|
||||
},
|
||||
"edge: pascalCase": {
|
||||
"prefix": "pascalCase",
|
||||
"body": "pascalCase(${1:'${2:value}'})",
|
||||
"description": "Convert a string to pascalCase"
|
||||
},
|
||||
"edge: pluralize": {
|
||||
"prefix": "pluralize",
|
||||
"body": "pluralize(${1:value}${2:, optionalCount})",
|
||||
"description": "Pluralize a word"
|
||||
},
|
||||
"edge: prettyBytes": {
|
||||
"prefix": "prettyBytes",
|
||||
"body": "prettyBytes(${1:1024})",
|
||||
"description": "Pretty print bytes to human readable string"
|
||||
},
|
||||
"edge: prettyMs": {
|
||||
"prefix": "prettyMs",
|
||||
"body": "prettyMs(${1:60000})",
|
||||
"description": "Pretty print milliseconds to human readable string"
|
||||
},
|
||||
"edge: props.serialize": {
|
||||
"prefix": "psl",
|
||||
"body": "\\$props.serialize(${1:optionalObjectToMerge})",
|
||||
"description": "Serialize component props to HTML attributes"
|
||||
},
|
||||
"edge: props.serializeExcept": {
|
||||
"prefix": "psle",
|
||||
"body": "\\$props.serializeExcept([$1], ${2:optionalObjectToMerge})",
|
||||
"description": "Serialize selected component props to HTML attributes"
|
||||
},
|
||||
"edge: props.serializeOnly": {
|
||||
"prefix": "pslo",
|
||||
"body": "\\$props.serializeOnly([$1], ${2:optionalObjectToMerge})",
|
||||
"description": "Serialize selected component props to HTML attributes"
|
||||
},
|
||||
"edge: route": {
|
||||
"prefix": "route",
|
||||
"body": "route('${1:routeName}', ${2:[args]})",
|
||||
"description": "Make URL for a route"
|
||||
},
|
||||
"edge: safe": {
|
||||
"prefix": "safe",
|
||||
"body": "safe(${1:'${2: markup}'})",
|
||||
"description": "Render HTML markup without escaping it"
|
||||
},
|
||||
"edge: sentenceCase": {
|
||||
"prefix": "sentenceCase",
|
||||
"body": "sentenceCase(${1:'${2:value}'})",
|
||||
"description": "Convert a string to sentenceCase"
|
||||
},
|
||||
"edge: signedRoute": {
|
||||
"prefix": "signedRoute",
|
||||
"body": "signedRoute('${1:routeName}', ${2:[args]})",
|
||||
"description": "Make signed URL for a route"
|
||||
},
|
||||
"edge: snakeCase": {
|
||||
"prefix": "snakeCase",
|
||||
"body": "snakeCase(${1:'${2:value}'})",
|
||||
"description": "Convert a string to snakeCase"
|
||||
},
|
||||
"edge: titleCase": {
|
||||
"prefix": "titleCase",
|
||||
"body": "titleCase(${1:'${2:value}'})",
|
||||
"description": "Convert a string to titleCase"
|
||||
},
|
||||
"edge: toBytes": {
|
||||
"prefix": "toBytes",
|
||||
"body": "toBytes(${1:'1MB'})",
|
||||
"description": "Convert human readable expression to bytes"
|
||||
},
|
||||
"edge: toMs": {
|
||||
"prefix": "toMs",
|
||||
"body": "toMs(${1:'1min'})",
|
||||
"description": "Convert human readable expression to milliseconds"
|
||||
},
|
||||
"edge: toSentence": {
|
||||
"prefix": "toSentence",
|
||||
"body": "toSentence([${1:'car'}, ${2: 'truck'}, ${3: 'van'}], { separator: ', ', lastSeparator: ', or ' })",
|
||||
"description": "Convert an array to a sentence"
|
||||
},
|
||||
"edge: truncate": {
|
||||
"prefix": "truncate",
|
||||
"body": "truncate(${1:value}, ${2:100})",
|
||||
"description": "Truncate string after given characters count"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
{
|
||||
"EJS No Output": {
|
||||
"prefix": "ejs",
|
||||
"body": [
|
||||
"<% $1 %> $2"
|
||||
],
|
||||
"description": "EJS No Output"
|
||||
},
|
||||
"EJS Output Value": {
|
||||
"prefix": "ejsout",
|
||||
"body": [
|
||||
"<%= $1 %> $2"
|
||||
],
|
||||
"description": "EJS outputs no value"
|
||||
},
|
||||
"EJS Output Escaped": {
|
||||
"prefix": "ejsesc",
|
||||
"body": [
|
||||
"<%- $1 %> $2"
|
||||
],
|
||||
"description": "EJS outputs value"
|
||||
},
|
||||
"EJS Comment": {
|
||||
"prefix": "ejscom",
|
||||
"body": [
|
||||
"<%# $1 %> $2"
|
||||
],
|
||||
"description": "EJS comment tag with no output"
|
||||
},
|
||||
"EJS Literal": {
|
||||
"prefix": "ejslit",
|
||||
"body": [
|
||||
"<%% $1 %> $2"
|
||||
],
|
||||
"description": "EJS outputs a literal '<%'"
|
||||
},
|
||||
"EJS Include": {
|
||||
"prefix": "ejsinc",
|
||||
"body": [
|
||||
"<% include $1 %> $2"
|
||||
],
|
||||
"description": "EJS include statement"
|
||||
},
|
||||
"EJS For Loop": {
|
||||
"prefix": "ejsfor",
|
||||
"body": [
|
||||
"<% for( let ${1:index} = 0; ${1:index} < ${2:array}.length; ${1:index}++ ) { %>",
|
||||
"$3",
|
||||
"<% } %>"
|
||||
],
|
||||
"description": "EJS For Loop"
|
||||
},
|
||||
"EJS ForEach": {
|
||||
"prefix": "ejseach",
|
||||
"body": [
|
||||
"<% ${1:array}.forEach(${2:element} => { %>",
|
||||
" $3",
|
||||
"<% }) %>"
|
||||
],
|
||||
"description": "EJS ForEach Loop"
|
||||
},
|
||||
"EJS If Statement": {
|
||||
"prefix": "ejsif",
|
||||
"body": [
|
||||
"<% if (${1:condition}) { %>",
|
||||
" $2",
|
||||
"<% } %>"
|
||||
],
|
||||
"description": "EJS if statement"
|
||||
},
|
||||
"EJS Else Statement": {
|
||||
"prefix": "ejselse",
|
||||
"body": [
|
||||
"<% } else { %>",
|
||||
" $1"
|
||||
],
|
||||
"description": "EJS if statement"
|
||||
},
|
||||
"EJS Else If Statement": {
|
||||
"prefix": "ejselif",
|
||||
"body": [
|
||||
"<% } else if ({$1:condition}) { %>",
|
||||
" $2"
|
||||
],
|
||||
"description": "EJS if statement"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,498 @@
|
||||
{
|
||||
"Stateless Widget": {
|
||||
"prefix": "statelessW",
|
||||
"body": [
|
||||
"class ${1:name} extends StatelessWidget {",
|
||||
" const ${1:name}({super.key});\n",
|
||||
" @override",
|
||||
" Widget build(BuildContext context) {",
|
||||
" return Container(",
|
||||
" child: ${2:null},",
|
||||
" );",
|
||||
" }",
|
||||
"}"
|
||||
],
|
||||
"description": "Create a Stateless widget"
|
||||
},
|
||||
"Stateful Widget": {
|
||||
"prefix": "statefulW",
|
||||
"body": [
|
||||
"class ${1:name} extends StatefulWidget {",
|
||||
" ${1:name}({super.key});\n",
|
||||
" @override",
|
||||
" State<${1:WidgetName}> createState() => _${1:WidgetName}State();",
|
||||
"}\n",
|
||||
"class _${1:index}State extends State<${1:index}> {",
|
||||
" @override",
|
||||
" Widget build(BuildContext context) {",
|
||||
" return Container(",
|
||||
" child: ${2:null},",
|
||||
" );",
|
||||
" }",
|
||||
"}"
|
||||
],
|
||||
"description": "Create a Stateful widget"
|
||||
},
|
||||
"Build Method": {
|
||||
"prefix": "build",
|
||||
"body": [
|
||||
"@override",
|
||||
"Widget build(BuildContext context) {",
|
||||
" return ${0:};",
|
||||
"}"
|
||||
],
|
||||
"description": "Describes the part of the user interface represented by this widget."
|
||||
},
|
||||
"Custom Painter ": {
|
||||
"prefix": "customPainter",
|
||||
"body": [
|
||||
"class ${0:name}Painter extends CustomPainter {",
|
||||
"",
|
||||
" @override",
|
||||
" void paint(Canvas canvas, Size size) {",
|
||||
" }",
|
||||
"",
|
||||
" @override",
|
||||
" bool shouldRepaint(${0:name}Painter oldDelegate) => false;",
|
||||
"",
|
||||
" @override",
|
||||
" bool shouldRebuildSemantics(${0:name}Painter oldDelegate) => false;",
|
||||
"}"
|
||||
],
|
||||
"description": "Used for creating custom paint"
|
||||
},
|
||||
"Custom Clipper ": {
|
||||
"prefix": "customClipper",
|
||||
"body": [
|
||||
"class ${0:name}Clipper extends CustomClipper<Path> {",
|
||||
"",
|
||||
" @override",
|
||||
" Path getClip(Size size) {",
|
||||
" }",
|
||||
"",
|
||||
" @override",
|
||||
" bool shouldReclip(CustomClipper<Path> oldClipper) => false;",
|
||||
"}"
|
||||
],
|
||||
"description": "Used for creating custom shapes"
|
||||
},
|
||||
"InitState ": {
|
||||
"prefix": "initS",
|
||||
"body": [
|
||||
"@override",
|
||||
"void initState() { ",
|
||||
" super.initState();",
|
||||
" ${0:}",
|
||||
"}"
|
||||
],
|
||||
"description": "Called when this object is inserted into the tree. The framework will call this method exactly once for each State object it creates."
|
||||
},
|
||||
"Dispose": {
|
||||
"prefix": "dis",
|
||||
"body": [
|
||||
"@override",
|
||||
"void dispose() { ",
|
||||
" ${0:}",
|
||||
" super.dispose();",
|
||||
"}"
|
||||
],
|
||||
"description": "Called when this object is removed from the tree permanently. The framework calls this method when this State object will never build again."
|
||||
},
|
||||
"Reassemble": {
|
||||
"prefix": "reassemble",
|
||||
"body": [
|
||||
"@override",
|
||||
"void reassemble(){",
|
||||
" super.reassemble();",
|
||||
" ${0:}",
|
||||
"}"
|
||||
],
|
||||
"description": "Called whenever the application is reassembled during debugging, for example during hot reload."
|
||||
},
|
||||
"didChangeDependencies": {
|
||||
"prefix": "didChangeD",
|
||||
"body": [
|
||||
"@override",
|
||||
"void didChangeDependencies() {",
|
||||
" super.didChangeDependencies();",
|
||||
" ${0:}",
|
||||
"}"
|
||||
],
|
||||
"description": "Called when a dependency of this State object changes"
|
||||
},
|
||||
"didUpdateWidget": {
|
||||
"prefix": "didUpdateW",
|
||||
"body": [
|
||||
"@override",
|
||||
"void didUpdateWidget (${1:Type} ${2:oldWidget}) {",
|
||||
" super.didUpdateWidget(${2:oldWidget});",
|
||||
" ${0:}",
|
||||
"}"
|
||||
],
|
||||
"description": "Called whenever the widget configuration changes."
|
||||
},
|
||||
"ListView.Builder": {
|
||||
"prefix": "listViewB",
|
||||
"body": [
|
||||
"ListView.builder(",
|
||||
" itemCount: ${1:1},",
|
||||
" itemBuilder: (BuildContext context, int index) {",
|
||||
" return ${2:};",
|
||||
" },",
|
||||
"),"
|
||||
],
|
||||
"description": "Creates a scrollable, linear array of widgets that are created on demand.Providing a non-null `itemCount` improves the ability of the [ListView] to estimate the maximum scroll extent."
|
||||
},
|
||||
"ListView.Separated": {
|
||||
"prefix": "listViewS",
|
||||
"body": [
|
||||
"ListView.separated(",
|
||||
" itemCount: ${1:1},",
|
||||
" separatorBuilder: (BuildContext context, int index) {",
|
||||
" return ${2:};",
|
||||
" },",
|
||||
" itemBuilder: (BuildContext context, int index) {",
|
||||
" return ${3:};",
|
||||
" },",
|
||||
"),"
|
||||
],
|
||||
"description": "Creates a fixed-length scrollable linear array of list 'items' separated by list item 'separators'."
|
||||
},
|
||||
"GridView.Builder": {
|
||||
"prefix": "gridViewB",
|
||||
"body": [
|
||||
"GridView.builder(",
|
||||
" gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(",
|
||||
" crossAxisCount: ${1:2},",
|
||||
" ),",
|
||||
" itemCount: ${2:2},",
|
||||
" itemBuilder: (BuildContext context, int index) {",
|
||||
" return ${3:};",
|
||||
" },",
|
||||
"),"
|
||||
],
|
||||
"description": "Creates a scrollable, 2D array of widgets that are created on demand. Providing a non-null `itemCount` improves the ability of the [GridView] to estimate the maximum scroll extent."
|
||||
},
|
||||
"GridView.Count": {
|
||||
"prefix": "gridViewC",
|
||||
"body": [
|
||||
"GridView.count(",
|
||||
" crossAxisSpacing: ${1:1},",
|
||||
" mainAxisSpacing: ${2:2},",
|
||||
" crossAxisCount: ${3:2},",
|
||||
" children: <Widget> [",
|
||||
" ${4:}",
|
||||
" ],",
|
||||
"),"
|
||||
],
|
||||
"description": "Creates a scrollable, 2D array of widgets with a fixed number of tiles in the cross axis."
|
||||
},
|
||||
"GridView.Extent": {
|
||||
"prefix": "gridViewE",
|
||||
"body": [
|
||||
"GridView.extent(",
|
||||
" maxCrossAxisExtent: ${1:2},",
|
||||
" children: <Widget> [",
|
||||
" ${2:}",
|
||||
" ],",
|
||||
"),"
|
||||
],
|
||||
"description": "Creates a scrollable, 2D array of widgets with tiles that each have a maximum cross-axis extent."
|
||||
},
|
||||
"Custom Scroll View": {
|
||||
"prefix": "customScrollV",
|
||||
"body": [
|
||||
"CustomScrollView(",
|
||||
" slivers: <Widget>[",
|
||||
" ${0:}",
|
||||
" ],",
|
||||
"),"
|
||||
],
|
||||
"description": "Creates a `ScrollView` that creates custom scroll effects using slivers. If the `primary` argument is true, the `controller` must be null."
|
||||
},
|
||||
"Stream Builder": {
|
||||
"prefix": "streamBldr",
|
||||
"body": [
|
||||
"StreamBuilder(",
|
||||
" stream: ${1:stream},",
|
||||
" initialData: ${2:initialData},",
|
||||
" builder: (BuildContext context, AsyncSnapshot snapshot) {",
|
||||
" return Container(",
|
||||
" child: ${3:child},",
|
||||
" );",
|
||||
" },",
|
||||
"),"
|
||||
],
|
||||
"description": "Creates a new `StreamBuilder` that builds itself based on the latest snapshot of interaction with the specified `stream`"
|
||||
},
|
||||
"Animated Builder": {
|
||||
"prefix": "animatedBldr",
|
||||
"body": [
|
||||
"AnimatedBuilder(",
|
||||
" animation: ${1:animation},",
|
||||
" child: ${2:child},",
|
||||
" builder: (BuildContext context, Widget child) {",
|
||||
" return ${3:};",
|
||||
" },",
|
||||
"),"
|
||||
],
|
||||
"description": "Creates an Animated Builder. The widget specified to `child` is passed to the `builder` "
|
||||
},
|
||||
"Stateful Builder": {
|
||||
"prefix": "statefulBldr",
|
||||
"body": [
|
||||
"StatefulBuilder(",
|
||||
" builder: (BuildContext context, setState) {",
|
||||
" return ${0:};",
|
||||
" },",
|
||||
"),"
|
||||
],
|
||||
"description": "Creates a widget that both has state and delegates its build to a callback. Useful for rebuilding specific sections of the widget tree."
|
||||
},
|
||||
"Orientation Builder": {
|
||||
"prefix": "orientationBldr",
|
||||
"body": [
|
||||
"OrientationBuilder(",
|
||||
" builder: (BuildContext context, Orientation orientation) {",
|
||||
" return Container(",
|
||||
" child: ${3:child},",
|
||||
" );",
|
||||
" },",
|
||||
"),"
|
||||
],
|
||||
"description": "Creates a builder which allows for the orientation of the device to be specified and referenced"
|
||||
},
|
||||
"Layout Builder": {
|
||||
"prefix": "layoutBldr",
|
||||
"body": [
|
||||
"LayoutBuilder(",
|
||||
" builder: (BuildContext context, BoxConstraints constraints) {",
|
||||
" return ${0:};",
|
||||
" },",
|
||||
"),"
|
||||
],
|
||||
"description": "Similar to the Builder widget except that the framework calls the builder function at layout time and provides the parent widget's constraints."
|
||||
},
|
||||
"Single Child ScrollView": {
|
||||
"prefix": "singleChildSV",
|
||||
"body": [
|
||||
"SingleChildScrollView(",
|
||||
" controller: ${1:controller,}",
|
||||
" child: Column(",
|
||||
" ${0:}",
|
||||
" ),",
|
||||
"),"
|
||||
],
|
||||
"description": "Creates a scroll view with a single child"
|
||||
},
|
||||
"Future Builder": {
|
||||
"prefix": "futureBldr",
|
||||
"body": [
|
||||
"FutureBuilder(",
|
||||
" future: ${1:Future},",
|
||||
" initialData: ${2:InitialData},",
|
||||
" builder: (BuildContext context, AsyncSnapshot snapshot) {",
|
||||
" return ${3:};",
|
||||
" },",
|
||||
"),"
|
||||
],
|
||||
"description": "Creates a Future Builder. This builds itself based on the latest snapshot of interaction with a Future."
|
||||
},
|
||||
"No Such Method": {
|
||||
"prefix": "nosm",
|
||||
"body": [
|
||||
"@override",
|
||||
"dynamic noSuchMethod(Invocation invocation) {",
|
||||
" ${1:}",
|
||||
"}"
|
||||
],
|
||||
"description": "This method is invoked when a non-existent method or property is accessed."
|
||||
},
|
||||
"Inherited Widget": {
|
||||
"prefix": "inheritedW",
|
||||
"body": [
|
||||
"class ${1:Name} extends InheritedWidget {",
|
||||
" ${1:Name}({Key? key, required this.child}) : super(key: key, child: child);",
|
||||
"",
|
||||
" final Widget child;",
|
||||
"",
|
||||
" static ${1:Name}? of(BuildContext context) {",
|
||||
" return context.dependOnInheritedWidgetOfExactType<${1:Name}>();",
|
||||
" }",
|
||||
"",
|
||||
" @override",
|
||||
" bool updateShouldNotify(${1:Name} oldWidget) {",
|
||||
" return ${2:true};",
|
||||
" }",
|
||||
"}"
|
||||
],
|
||||
"description": "Class used to propagate information down the widget tree"
|
||||
},
|
||||
"Mounted": {
|
||||
"prefix": "mounted",
|
||||
"body": [
|
||||
"@override",
|
||||
"bool get mounted {",
|
||||
" ${0:}",
|
||||
"}"
|
||||
],
|
||||
"description": "Whether this State object is currently in a tree."
|
||||
},
|
||||
"Sink": {
|
||||
"prefix": "snk",
|
||||
"body": [
|
||||
"Sink<${1:type}> get ${2:name} => _${2:name}Controller.sink;",
|
||||
"final _${2:name}Controller = StreamController<${1:type}>();"
|
||||
],
|
||||
"description": "A Sink is the input of a stream."
|
||||
},
|
||||
"Stream": {
|
||||
"prefix": "strm",
|
||||
"body": [
|
||||
"Stream<${1:type}> get ${2:name} => _${2:name}Controller.stream;",
|
||||
"final _${2:name}Controller = StreamController<${1:type}>();"
|
||||
],
|
||||
"description": "A source of asynchronous data events. A stream can be of any data type <T>"
|
||||
},
|
||||
"Subject": {
|
||||
"prefix": "subj",
|
||||
"body": [
|
||||
"Stream<${1:type}> get ${2:name} => _${2:name}Subject.stream;",
|
||||
"final _${2:name}Subject = BehaviorSubject<${1:type}>();"
|
||||
],
|
||||
"description": "A BehaviorSubject is also a broadcast StreamController which returns an Observable rather than a Stream."
|
||||
},
|
||||
"toString": {
|
||||
"prefix": "toStr",
|
||||
"body": [
|
||||
"@override",
|
||||
"String toString() {",
|
||||
"return ${1:toString};",
|
||||
" }"
|
||||
],
|
||||
"description": "Returns a string representation of this object."
|
||||
},
|
||||
"debugPrint": {
|
||||
"prefix": "debugP",
|
||||
"body": [
|
||||
"debugPrint(${1:statement});"
|
||||
],
|
||||
"description": "Prints a message to the console, which you can access using the flutter tool's `logs` command (flutter logs)."
|
||||
},
|
||||
"Material Package": {
|
||||
"prefix": "importM",
|
||||
"body": "import 'package:flutter/material.dart';",
|
||||
"description": "Import flutter material package"
|
||||
},
|
||||
"Cupertino Package": {
|
||||
"prefix": "importC",
|
||||
"body": "import 'package:flutter/cupertino.dart';",
|
||||
"description": "Import Flutter Cupertino package"
|
||||
},
|
||||
"flutter_test Package": {
|
||||
"prefix": "importFT",
|
||||
"body": "import 'package:flutter_test/flutter_test.dart';",
|
||||
"description": "Import flutter_test package"
|
||||
},
|
||||
"Material App": {
|
||||
"prefix": "mateapp",
|
||||
"description": "Create a MaterialApp",
|
||||
"body": [
|
||||
"import 'package:flutter/material.dart';",
|
||||
" ",
|
||||
"void main() => runApp(MyApp());",
|
||||
" ",
|
||||
"class MyApp extends StatelessWidget {",
|
||||
" @override",
|
||||
" Widget build(BuildContext context) {",
|
||||
" return MaterialApp(",
|
||||
" title: 'Material App',",
|
||||
" home: Scaffold(",
|
||||
" appBar: AppBar(",
|
||||
" title: Text('Material App Bar'),",
|
||||
" ),",
|
||||
" body: Center(",
|
||||
" child: Container(",
|
||||
" child: Text('Hello World'),",
|
||||
" ),",
|
||||
" ),",
|
||||
" ),",
|
||||
" );",
|
||||
" }",
|
||||
"}"
|
||||
]
|
||||
},
|
||||
"Cupertino App": {
|
||||
"prefix": "cupeapp",
|
||||
"description": "Create a CupertinoApp",
|
||||
"body": [
|
||||
"import 'package:flutter/cupertino.dart';",
|
||||
" ",
|
||||
"void main() => runApp(MyApp());",
|
||||
" ",
|
||||
"class MyApp extends StatelessWidget {",
|
||||
" @override",
|
||||
" Widget build(BuildContext context) {",
|
||||
" return CupertinoApp(",
|
||||
" title: 'Cupertino App',",
|
||||
" home: CupertinoPageScaffold(",
|
||||
" navigationBar: CupertinoNavigationBar(",
|
||||
" middle: Text('Cupertino App Bar'),",
|
||||
" ),",
|
||||
" child: Center(",
|
||||
" child: Container(",
|
||||
" child: Text('Hello World'),",
|
||||
" ),",
|
||||
" ),",
|
||||
" ),",
|
||||
" );",
|
||||
" }",
|
||||
"}"
|
||||
]
|
||||
},
|
||||
"Tween Animation Builder": {
|
||||
"prefix": "tweenAnimationBuilder",
|
||||
"body": [
|
||||
"TweenAnimationBuilder(",
|
||||
" duration: ${1:const Duration(),}",
|
||||
" tween: ${2:Tween(),}",
|
||||
" builder: (BuildContext context, ${3:dynamic} value, Widget? child) {",
|
||||
" return ${4:Container();}",
|
||||
" },",
|
||||
" ), "
|
||||
],
|
||||
"description": "Widget builder that animates a property of a Widget to a target value whenever the target value changes."
|
||||
},
|
||||
"Value Listenable Builder": {
|
||||
"prefix": "valueListenableBuilder",
|
||||
"body": [
|
||||
"ValueListenableBuilder(",
|
||||
" valueListenable: ${1: null},",
|
||||
" builder: (BuildContext context, ${2:dynamic} value, Widget? child) {",
|
||||
" return ${3: Container();}",
|
||||
" },",
|
||||
" ),"
|
||||
],
|
||||
"description": "Given a ValueListenable<T> and a builder which builds widgets from concrete values of T, this class will automatically register itself as a listener of the ValueListenable and call the builder with updated values when the value changes."
|
||||
},
|
||||
"Test": {
|
||||
"prefix": "f-test",
|
||||
"body": [
|
||||
"test(",
|
||||
" \"${1:test description}\",",
|
||||
" () {},",
|
||||
");"
|
||||
],
|
||||
"description": "Create a test function"
|
||||
},
|
||||
"Test Widgets": {
|
||||
"prefix": "widgetTest",
|
||||
"body": [
|
||||
"testWidgets(",
|
||||
" \"${1:test description}\",",
|
||||
" (WidgetTester tester) async {},",
|
||||
");"
|
||||
],
|
||||
"description": "Create a testWidgets function"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,526 @@
|
||||
{
|
||||
"Show": {
|
||||
"prefix": "show",
|
||||
"description": "Output markup: {{ }}",
|
||||
"body": "{{ $1 }}"
|
||||
},
|
||||
|
||||
"Execute": {
|
||||
"prefix": "execute",
|
||||
"description": "Tag markup: {%- -%}",
|
||||
"body": "{%- $1 -%}"
|
||||
},
|
||||
|
||||
"Tag assign": {
|
||||
"prefix": "assign",
|
||||
"description": "Variable tag: assign",
|
||||
"body": [
|
||||
"{%- assign ${variable} = ${value} -%}"
|
||||
]
|
||||
},
|
||||
|
||||
"Tag break": {
|
||||
"prefix": "break",
|
||||
"description": "Iteration tag: break",
|
||||
"body": [
|
||||
"{%- break -%}"
|
||||
]
|
||||
},
|
||||
|
||||
"Tag capture": {
|
||||
"prefix": "capture",
|
||||
"description": "Variable tag: capture",
|
||||
"body": [
|
||||
"{%- capture ${variable} -%}${code:}{%- endcapture -%}"
|
||||
]
|
||||
},
|
||||
|
||||
"Tag case": {
|
||||
"prefix": "case",
|
||||
"description": "Control flow tag: case",
|
||||
"body": [
|
||||
"{%- case ${variable} -%}",
|
||||
"\t{%- when ${condition} -%}",
|
||||
"\t\t${code1:}",
|
||||
"\t{%- else -%}",
|
||||
"\t\t${code2:}",
|
||||
"{%- endcase -%}"
|
||||
]
|
||||
},
|
||||
|
||||
"Tag comment": {
|
||||
"prefix": "comment",
|
||||
"description": "Control flow tag: case",
|
||||
"body": [
|
||||
"{%- comment -%}${description:}{%- endcomment -%}"
|
||||
]
|
||||
},
|
||||
|
||||
"Tag context variable": {
|
||||
"prefix": "convar",
|
||||
"description": "Context Variable",
|
||||
"body": [
|
||||
"{{ ${variable:} }}"
|
||||
]
|
||||
},
|
||||
|
||||
"Tag continue": {
|
||||
"prefix": "continue",
|
||||
"description": "Iteration tag: continue",
|
||||
"body": [
|
||||
"{%- continue -%}"
|
||||
]
|
||||
},
|
||||
|
||||
"Tag cycle": {
|
||||
"prefix": "cycle",
|
||||
"description": "Iteration tag: cycle",
|
||||
"body": [
|
||||
"{%- cycle '${0:odd}', '${1:even}' -%}"
|
||||
]
|
||||
},
|
||||
|
||||
"Tag collection directory": {
|
||||
"prefix": "cdirp",
|
||||
"description": "The full path to the collection's source direcotry",
|
||||
"body": [
|
||||
"{{ site.${my_collection}.directory }}"
|
||||
]
|
||||
},
|
||||
|
||||
"Tag collection relative path": {
|
||||
"prefix": "crelp",
|
||||
"description": "The path to the document's source file realtive to the site source",
|
||||
"body": [
|
||||
"{{ site.collections.${my_collection}.relative_path }}"
|
||||
]
|
||||
},
|
||||
|
||||
"Tag decrement": {
|
||||
"prefix": "decrement",
|
||||
"description": "Variable tag: decrement",
|
||||
"body": [
|
||||
"{%- decrement ${variable} -%}"
|
||||
]
|
||||
},
|
||||
|
||||
"Tag for": {
|
||||
"prefix": "for",
|
||||
"description": "Iteration tag: for",
|
||||
"body": [
|
||||
"{%- for ${item} in ${collection} -%}",
|
||||
"\t${code:}",
|
||||
"{%- endfor -%}"
|
||||
]
|
||||
},
|
||||
|
||||
"Tag increment": {
|
||||
"prefix": "increment",
|
||||
"description": "Variable tag: increment",
|
||||
"body": [
|
||||
"{%- increment ${variable} -%}"
|
||||
]
|
||||
},
|
||||
|
||||
"Tag if": {
|
||||
"prefix": "if",
|
||||
"description": "Control flow tag: if",
|
||||
"body": [
|
||||
"{%- if ${condition} -%}",
|
||||
"\t${code:}",
|
||||
"{%- endif -%}"
|
||||
]
|
||||
},
|
||||
|
||||
"Tag else": {
|
||||
"prefix": "else",
|
||||
"description": "Control flow tag: else",
|
||||
"body": [
|
||||
"{%- else -%}"
|
||||
]
|
||||
},
|
||||
|
||||
"Tag elsif": {
|
||||
"prefix": "elsif",
|
||||
"description": "Control flow tag: elsif",
|
||||
"body": [
|
||||
"{%- elsif ${condition} -%}"
|
||||
]
|
||||
},
|
||||
|
||||
"Tag if else": {
|
||||
"prefix": "ifelse",
|
||||
"description": "Control flow tag: if else",
|
||||
"body": [
|
||||
"{%- if ${condition} -%}",
|
||||
"\t${code1:}",
|
||||
"{%- else -%}",
|
||||
"\t${code2:}",
|
||||
"{%- endif -%}"
|
||||
]
|
||||
},
|
||||
|
||||
"Tag gist": {
|
||||
"prefix": "gist",
|
||||
"description": "Add a gist code block",
|
||||
"body": [
|
||||
"{%- gist ${gist:user/gist-id} -%}"
|
||||
]
|
||||
},
|
||||
|
||||
"Tag highlight": {
|
||||
"prefix": "highlight",
|
||||
"description": "Syntax tag: highlight",
|
||||
"body": [
|
||||
"{%- highlight ${lang:javascript} -%}",
|
||||
"\t\t${code:}",
|
||||
"{%- endhighlight -%}"
|
||||
]
|
||||
},
|
||||
|
||||
"Tag include": {
|
||||
"prefix": "include",
|
||||
"description": "Tag: include",
|
||||
"body": [
|
||||
"{%- include ${snippet} -%}"
|
||||
]
|
||||
},
|
||||
|
||||
"Site Vairable Date": {
|
||||
"prefix": "date",
|
||||
"description": "Tag: site.date",
|
||||
"body": [
|
||||
"{{ site.date | date: '${format: %b %d, %Y}' }}"
|
||||
]
|
||||
},
|
||||
|
||||
"Tag include relative": {
|
||||
"prefix": "increl",
|
||||
"description": "Tag: include relative",
|
||||
"body": [
|
||||
"{%- include_relative '${file:}' -%}"
|
||||
]
|
||||
},
|
||||
|
||||
"Tag Post URL": {
|
||||
"prefix": "posturl",
|
||||
"description": "Tag: post_url",
|
||||
"body": [
|
||||
"{%- post_url ${url:} -%}"
|
||||
]
|
||||
},
|
||||
|
||||
"Tag unless": {
|
||||
"prefix": "unless",
|
||||
"description": "Control flow tag: unless",
|
||||
"body": [
|
||||
"{%- unless ${condition} -%}",
|
||||
"\t${code:}",
|
||||
"{%- endunless -%}"
|
||||
]
|
||||
},
|
||||
|
||||
"Tag when": {
|
||||
"prefix": "when",
|
||||
"description": "Control flow tag: when",
|
||||
"body": [
|
||||
"{%- when ${condition} -%}",
|
||||
"${code:}"
|
||||
]
|
||||
},
|
||||
|
||||
"Tag Option limit": {
|
||||
"prefix": "limit",
|
||||
"description": "For loops option",
|
||||
"body": [
|
||||
"limit: ${limit:5}"
|
||||
]
|
||||
},
|
||||
|
||||
"Tag Option offset": {
|
||||
"prefix": "offset",
|
||||
"description": "For loops option",
|
||||
"body": [
|
||||
"offset: ${offset:0}"
|
||||
]
|
||||
},
|
||||
|
||||
"Tag Option reversed": {
|
||||
"prefix": "reversed",
|
||||
"description": "For loops option",
|
||||
"body": [
|
||||
"reversed"
|
||||
]
|
||||
},
|
||||
|
||||
"Tag raw": {
|
||||
"prefix": "raw",
|
||||
"description": "Tag: raw",
|
||||
"body": [
|
||||
"{%- raw -%}${code:}{%- endraw -%}"
|
||||
]
|
||||
},
|
||||
|
||||
"Tag paginate next or previous page": {
|
||||
"prefix": "paginate",
|
||||
"description": "Tag: paginate next or previous page",
|
||||
"body": [
|
||||
"{{ paginator.${next:previous}_page }}"
|
||||
]
|
||||
},
|
||||
|
||||
"Filter jsonify": {
|
||||
"prefix": "json",
|
||||
"description": "Array filter: jsonify",
|
||||
"body": "| jsonify }}'"
|
||||
},
|
||||
|
||||
"Filter join": {
|
||||
"prefix": "join",
|
||||
"description": "Array filter: join",
|
||||
"body": "| join: '${seperator:, }}'"
|
||||
},
|
||||
|
||||
"Filter first": {
|
||||
"prefix": "first",
|
||||
"description": "Array filter: first",
|
||||
"body": "| first"
|
||||
},
|
||||
|
||||
"Filter last": {
|
||||
"prefix": "last",
|
||||
"description": "Array filter: last",
|
||||
"body": "| last"
|
||||
},
|
||||
|
||||
"Filter map": {
|
||||
"prefix": "map",
|
||||
"description": "Array filter: map",
|
||||
"body": "| map: '${key}'"
|
||||
},
|
||||
|
||||
"Filter size": {
|
||||
"prefix": "size",
|
||||
"description": "Array filter: size",
|
||||
"body": "| size"
|
||||
},
|
||||
|
||||
"Filter sort": {
|
||||
"prefix": "sort",
|
||||
"description": "Array filter: sort",
|
||||
"body": "| sort"
|
||||
},
|
||||
|
||||
"Filter uniq": {
|
||||
"prefix": "uniq",
|
||||
"description": "Array filter: uniq",
|
||||
"body": "| uniq"
|
||||
},
|
||||
|
||||
"Filter ceil": {
|
||||
"prefix": "ceil",
|
||||
"description": "Math filter: ceil",
|
||||
"body": "| ceil"
|
||||
},
|
||||
|
||||
"Filter divided by": {
|
||||
"prefix": "divided_by",
|
||||
"description": "Math filter: divided by",
|
||||
"body": "| divided_by: ${divided_by:2}"
|
||||
},
|
||||
|
||||
"Filter floor": {
|
||||
"prefix": "floor",
|
||||
"description": "Math filter: floor",
|
||||
"body": "| floor"
|
||||
},
|
||||
|
||||
"Filter minus": {
|
||||
"prefix": "minus",
|
||||
"description": "Math filter: minus",
|
||||
"body": "| minus: ${minus:1}"
|
||||
},
|
||||
|
||||
"Filter modulo": {
|
||||
"prefix": "modulo",
|
||||
"description": "Math filter: modulo",
|
||||
"body": "| modulo: ${modulo:2}"
|
||||
},
|
||||
|
||||
"Filter plus": {
|
||||
"prefix": "plus",
|
||||
"description": "Math filter: plus",
|
||||
"body": "| plus: ${plus:1}"
|
||||
},
|
||||
|
||||
"Filter round": {
|
||||
"prefix": "round",
|
||||
"description": "Math filter: round",
|
||||
"body": "| round: ${round:0}"
|
||||
},
|
||||
|
||||
"Filter times": {
|
||||
"prefix": "times",
|
||||
"description": "Math filter: times",
|
||||
"body": "| times: ${times:1}"
|
||||
},
|
||||
|
||||
"Filter append": {
|
||||
"prefix": "append",
|
||||
"description": "String filter: append",
|
||||
"body": "| append: '${string}' }}"
|
||||
},
|
||||
|
||||
"Filter capitalize": {
|
||||
"prefix": "capitalize",
|
||||
"description": "String filter: capitalize",
|
||||
"body": "| capitalize }}"
|
||||
},
|
||||
|
||||
"Filter downcase": {
|
||||
"prefix": "downcase",
|
||||
"description": "String filter: downcase",
|
||||
"body": "| downcase }}"
|
||||
},
|
||||
|
||||
"Filter escape": {
|
||||
"prefix": "escape",
|
||||
"description": "String filter: escape",
|
||||
"body": "| escape }}"
|
||||
},
|
||||
|
||||
"Filter markdownify": {
|
||||
"prefix": "markdown",
|
||||
"description": "String filter: markdownify",
|
||||
"body": "| markdownify }}"
|
||||
},
|
||||
|
||||
"Filter prepend": {
|
||||
"prefix": "prepend",
|
||||
"description": "String filter: prepend",
|
||||
"body": "| prepend: '${string}' }}"
|
||||
},
|
||||
|
||||
"Filter remove": {
|
||||
"prefix": "remove",
|
||||
"description": "String filter: remove",
|
||||
"body": "| remove: '${string}' }}"
|
||||
},
|
||||
|
||||
"Filter remove first": {
|
||||
"prefix": "remove_first",
|
||||
"description": "String filter: remove first",
|
||||
"body": "| remove_first: '${string}' }}"
|
||||
},
|
||||
|
||||
"Filter replace": {
|
||||
"prefix": "replace",
|
||||
"description": "String filter: replace",
|
||||
"body": "| replace: '${target}', '${replace}' }}"
|
||||
},
|
||||
|
||||
"Filter replace first": {
|
||||
"prefix": "replace_first",
|
||||
"description": "String filter: replace first",
|
||||
"body": "| replace_first: '${target}', '${replace}' }}"
|
||||
},
|
||||
|
||||
"Filter slice": {
|
||||
"prefix": "slice",
|
||||
"description": "String filter: slice",
|
||||
"body": "| slice: ${from:0}, ${to:5} }}"
|
||||
},
|
||||
|
||||
"Filter slice single character": {
|
||||
"prefix": "slice_single",
|
||||
"description": "String filter: slice with single parameter",
|
||||
"body": "| slice: ${at} }}"
|
||||
},
|
||||
|
||||
"Filter split": {
|
||||
"prefix": "split",
|
||||
"description": "String filter: split",
|
||||
"body": "| split: '${splitter:,}' }}"
|
||||
},
|
||||
|
||||
"Filter strip": {
|
||||
"prefix": "strip",
|
||||
"description": "String filter: strip",
|
||||
"body": "| strip }}"
|
||||
},
|
||||
|
||||
"Filter lstrip": {
|
||||
"prefix": "lstrip",
|
||||
"description": "String filter: lstrip",
|
||||
"body": "| lstrip }}"
|
||||
},
|
||||
|
||||
"Filter rstrip": {
|
||||
"prefix": "rstrip",
|
||||
"description": "String filter: rstrip",
|
||||
"body": "| rstrip }}"
|
||||
},
|
||||
|
||||
"Filter strip html": {
|
||||
"prefix": "strip_html",
|
||||
"description": "String filter: strip html",
|
||||
"body": "| strip_html }}"
|
||||
},
|
||||
|
||||
"Filter strip newlines": {
|
||||
"prefix": "strip_newlines",
|
||||
"description": "String filter: strip newlines",
|
||||
"body": "| strip_newlines }}"
|
||||
},
|
||||
|
||||
"Filter truncate": {
|
||||
"prefix": "truncate",
|
||||
"description": "String filter: truncate",
|
||||
"body": "| truncate: ${length:20}, '${ellipsis:...}' }}"
|
||||
},
|
||||
|
||||
"Filter truncatewords": {
|
||||
"prefix": "truncatewords",
|
||||
"description": "String filter: truncatewords",
|
||||
"body": "| truncatewords: ${length:5}, '${ellipsis:...}' }}"
|
||||
},
|
||||
|
||||
"Filter upcase": {
|
||||
"prefix": "upcase",
|
||||
"description": "String filter: upcase }}",
|
||||
"body": "| upcase }}"
|
||||
},
|
||||
|
||||
"Filter url encode": {
|
||||
"prefix": "url_encode",
|
||||
"description": "String filter: url encode",
|
||||
"body": "| url_encode }}"
|
||||
},
|
||||
|
||||
"Filter uri escape": {
|
||||
"prefix": "uri_escape",
|
||||
"description": "String filter: uri escape",
|
||||
"body": "| uri_escape }}"
|
||||
},
|
||||
|
||||
"Filter xml escape": {
|
||||
"prefix": "xml_escape",
|
||||
"description": "String filter: xml escape",
|
||||
"body": "| xml_escape }}"
|
||||
},
|
||||
|
||||
"Front Matter": {
|
||||
"prefix": "fm",
|
||||
"description": "Add front matter",
|
||||
"body": [
|
||||
"---",
|
||||
"layout: ${layout:default}",
|
||||
"title: ${title}",
|
||||
"categories: ${category}",
|
||||
"permalink: ${path}",
|
||||
"tags: ${tag}",
|
||||
"excerpt: ${description}",
|
||||
"---"
|
||||
]
|
||||
}
|
||||
}
|
||||
301
dot_vim/plugged/friendly-snippets/snippets/frameworks/rails.json
Normal file
301
dot_vim/plugged/friendly-snippets/snippets/frameworks/rails.json
Normal file
@@ -0,0 +1,301 @@
|
||||
{
|
||||
"Before action": {
|
||||
"prefix": "ba",
|
||||
"body": [
|
||||
"before_action :${0:method}"
|
||||
],
|
||||
"description": "before_action"
|
||||
},
|
||||
"Before validation": {
|
||||
"prefix": "bv",
|
||||
"body": [
|
||||
"before_validation :${0:method}"
|
||||
],
|
||||
"description": "before_validation"
|
||||
},
|
||||
"Before create": {
|
||||
"prefix": "bc",
|
||||
"body": [
|
||||
"before_create :${0:method}"
|
||||
],
|
||||
"description": "before_create"
|
||||
},
|
||||
"Before update": {
|
||||
"prefix": "bu",
|
||||
"body": [
|
||||
"before_update :${0:method}"
|
||||
],
|
||||
"description": "before_update"
|
||||
},
|
||||
"Before save": {
|
||||
"prefix": "bs",
|
||||
"body": [
|
||||
"before_save :${0:method}"
|
||||
],
|
||||
"description": "before_save"
|
||||
},
|
||||
"Before destroy": {
|
||||
"prefix": "bd",
|
||||
"body": [
|
||||
"before_destroy :${0:method}"
|
||||
],
|
||||
"description": "before_destroy"
|
||||
},
|
||||
"After create": {
|
||||
"prefix": "ac",
|
||||
"body": [
|
||||
"after_create :${0:method}"
|
||||
],
|
||||
"description": "after_create"
|
||||
},
|
||||
"After validation": {
|
||||
"prefix": "av",
|
||||
"body": [
|
||||
"after_validation :${0:method}"
|
||||
],
|
||||
"description": "after_validation"
|
||||
},
|
||||
" update": {
|
||||
"prefix": "au",
|
||||
"body": [
|
||||
"after_update :${0:method}"
|
||||
],
|
||||
"description": "after_update"
|
||||
},
|
||||
" save": {
|
||||
"prefix": "as",
|
||||
"body": [
|
||||
"after_save :${0:method}"
|
||||
],
|
||||
"description": "after_create"
|
||||
},
|
||||
" destroy": {
|
||||
"prefix": "ad",
|
||||
"body": [
|
||||
"after_destroy :${0:method}"
|
||||
],
|
||||
"description": "after_destroy"
|
||||
},
|
||||
"Belongs to": {
|
||||
"prefix": "bt",
|
||||
"body": [
|
||||
"belongs_to :${0:association}"
|
||||
],
|
||||
"description": "belongs_to assocation"
|
||||
},
|
||||
"Belongs to polymorphic": {
|
||||
"prefix": "btp",
|
||||
"body": [
|
||||
"belongs_to :${0:association}, polymorphic: true"
|
||||
],
|
||||
"description": "belongs_to polymorphic assocation"
|
||||
},
|
||||
"Create action": {
|
||||
"prefix": "create",
|
||||
"body": [
|
||||
"def create",
|
||||
"\t@${1:model_class_name} = ${2:ModelClassName}.new($1_params)",
|
||||
"\trespond_to do |format|",
|
||||
"\t\tif @$1.save",
|
||||
"\t\t\tformat.html { redirect_to @$1, notice: '$2 created' }",
|
||||
"\t\telse",
|
||||
"\t\t\tformat.html { render :new, status: :unprocessable_entity }",
|
||||
"\t\tend",
|
||||
"\tend",
|
||||
"end"
|
||||
],
|
||||
"description": "def create"
|
||||
},
|
||||
"Destroy action": {
|
||||
"prefix": "destroy",
|
||||
"body": [
|
||||
"def destroy",
|
||||
"\t@${1:model_class_name} = ${2:ModelClassName}.find(params[:id])",
|
||||
"\t@$1.destroy!",
|
||||
"\tredirect_to $1s_path, notice: '$2 removed'",
|
||||
"end"
|
||||
],
|
||||
"description": "def destroy"
|
||||
},
|
||||
"Edit action": {
|
||||
"prefix": "edit",
|
||||
"body": [
|
||||
"def edit",
|
||||
"\t@${1:model_class_name} = ${2:ModelClassName}.find(params[:id])",
|
||||
"end"
|
||||
],
|
||||
"description": "def edit"
|
||||
},
|
||||
"Index action": {
|
||||
"prefix": "index",
|
||||
"body": [
|
||||
"def index",
|
||||
"\t@${1:model_class_name} = ${2:ModelClassName}.all",
|
||||
"end"
|
||||
],
|
||||
"description": "def index"
|
||||
},
|
||||
"New action": {
|
||||
"prefix": "new",
|
||||
"body": [
|
||||
"def new",
|
||||
"\t@${1:model_class_name} = ${2:ModelClassName}.new",
|
||||
"end"
|
||||
],
|
||||
"description": "def new"
|
||||
},
|
||||
"Show action": {
|
||||
"prefix": "show",
|
||||
"body": [
|
||||
"def show",
|
||||
"\t@${1:model_class_name} = ${2:ModelClassName}.find(params[:id])",
|
||||
"end"
|
||||
],
|
||||
"description": "def show"
|
||||
},
|
||||
"Update action": {
|
||||
"prefix": "update",
|
||||
"body": [
|
||||
"def update",
|
||||
"\t@${1:model_class_name} = ${2:ModelClassName}.find(params[:id])",
|
||||
"\trespond_to do |format|",
|
||||
"\t\tif @$1.update($1_params)",
|
||||
"\t\t\tformat.html { redirect_to @$1, notice: '$2 updated' }",
|
||||
"\t\telse",
|
||||
"\t\t\tformat.html { render :edit, status: :unprocessable_entity }",
|
||||
"\t\tend",
|
||||
"\tend",
|
||||
"end"
|
||||
],
|
||||
"description": "def update"
|
||||
},
|
||||
"Model Params": {
|
||||
"prefix": "params",
|
||||
"body": [
|
||||
"def ${1:model_class_name}_params",
|
||||
"\tparams.require(:$1).permit(${2:attributes})",
|
||||
"end"
|
||||
],
|
||||
"description": "def model_params"
|
||||
},
|
||||
"Getting Params": {
|
||||
"prefix": "pa",
|
||||
"body": [
|
||||
"params[:${1:id}]"
|
||||
],
|
||||
"description": "getting params using attribute"
|
||||
},
|
||||
"Delegate to": {
|
||||
"prefix": "dt",
|
||||
"body": [
|
||||
"delegate: :${1:method}, to: :${0:object}"
|
||||
],
|
||||
"description": "delegate to"
|
||||
},
|
||||
"Delegate to with prefix": {
|
||||
"prefix": "dtp",
|
||||
"body": [
|
||||
"delegate: :${1:method}, to: :${2:object}, prefix: :${3:prefix}, allow_nil: ${0:allow_nil}"
|
||||
],
|
||||
"description": "delegate to"
|
||||
},
|
||||
"Scope": {
|
||||
"prefix": "scope",
|
||||
"body": [
|
||||
"scope :${1:name}, -> { where(${2:field}: ${0:value}) }"
|
||||
],
|
||||
"description": "AR scope"
|
||||
},
|
||||
"Validate presence": {
|
||||
"prefix": "vp",
|
||||
"body": [
|
||||
"validates :${1:attribute}, presence: true"
|
||||
],
|
||||
"description": "validates presence"
|
||||
},
|
||||
"Validate uniqueness": {
|
||||
"prefix": "vu",
|
||||
"body": [
|
||||
"validates :${1:attribute}, uniqueness: true"
|
||||
],
|
||||
"description": "validates presence"
|
||||
},
|
||||
"Migration add column": {
|
||||
"prefix": "mac",
|
||||
"body": [
|
||||
"add_column :${1:table_name}, :${2:column_name}, :${0:data_type}"
|
||||
],
|
||||
"description": "Migration add column"
|
||||
},
|
||||
"Migration add index": {
|
||||
"prefix": "mai",
|
||||
"body": [
|
||||
"add_index :${1:table_name}, :${0:column_name}"
|
||||
],
|
||||
"description": "Migration add index"
|
||||
},
|
||||
"Migration remove column": {
|
||||
"prefix": "mrc",
|
||||
"body": [
|
||||
"remove_column :${1:table_name}, :${0:column_name}"
|
||||
],
|
||||
"description": "Migration remove column"
|
||||
},
|
||||
"Migration rename column": {
|
||||
"prefix": "mrnc",
|
||||
"body": [
|
||||
"rename_column :${1:table_name}, :${2:old_column_name}, :${0:new_column_name}"
|
||||
],
|
||||
"description": "Migration rename column"
|
||||
},
|
||||
"Migration change column": {
|
||||
"prefix": "mcc",
|
||||
"body": [
|
||||
"change_column :${1:table_name}, :${2:old_column_name}, :${0:data_type}"
|
||||
],
|
||||
"description": "Migration change column"
|
||||
},
|
||||
"Has many dependent": {
|
||||
"prefix": "hmd",
|
||||
"body": [
|
||||
"has_many :${1:object}, dependent: :${0:destroy}"
|
||||
],
|
||||
"description": "has_many dependent"
|
||||
},
|
||||
"Has many": {
|
||||
"prefix": "hm",
|
||||
"body": [
|
||||
"has_many :${0:object}"
|
||||
],
|
||||
"description": "has_many association"
|
||||
},
|
||||
"Has many through": {
|
||||
"prefix": "hmt",
|
||||
"body": [
|
||||
"has_many :${1:object}, through: :${0:object}"
|
||||
],
|
||||
"description": "has_many through association"
|
||||
},
|
||||
"Has one": {
|
||||
"prefix": "ho",
|
||||
"body": [
|
||||
"has_one :${0:object}"
|
||||
],
|
||||
"description": "has_one association"
|
||||
},
|
||||
"Has one dependent": {
|
||||
"prefix": "hod",
|
||||
"body": [
|
||||
"has_one :${1:object}, dependent: :${0:destroy}"
|
||||
],
|
||||
"description": "has_one dependent"
|
||||
},
|
||||
"Save and open screenshot": {
|
||||
"prefix": "saos",
|
||||
"body": [
|
||||
"save_and_open_screenshot${0}"
|
||||
],
|
||||
"description": "save_and_open_screenshot"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,192 @@
|
||||
{
|
||||
"Relm4 Component": {
|
||||
"prefix": "relm-component",
|
||||
"description": "Relm4 Component Widget",
|
||||
"body": [
|
||||
"use relm4::{gtk, Component, ComponentSender, ComponentParts};",
|
||||
"",
|
||||
"pub struct ComponentModel {}",
|
||||
"",
|
||||
"#[derive(Debug)]",
|
||||
"pub enum ComponentInput {}",
|
||||
"",
|
||||
"#[derive(Debug)]",
|
||||
"pub enum ComponentOutput {}",
|
||||
"",
|
||||
"pub struct ComponentInit {}",
|
||||
"",
|
||||
"#[relm4::component(pub)]",
|
||||
"impl Component for ComponentModel {",
|
||||
" type CommandOutput = ();",
|
||||
" type Input = ComponentInput;",
|
||||
" type Output = ComponentOutput;",
|
||||
" type Init = ComponentInit;",
|
||||
"",
|
||||
" view! {",
|
||||
" #[root]",
|
||||
" gtk::Box {",
|
||||
"",
|
||||
" }",
|
||||
" }",
|
||||
"",
|
||||
" fn init(",
|
||||
" init: Self::Init,",
|
||||
" root: &Self::Root,",
|
||||
" sender: ComponentSender<Self>,",
|
||||
" ) -> ComponentParts<Self> {",
|
||||
" let model = ComponentModel {};",
|
||||
" let widgets = view_output!();",
|
||||
" ComponentParts { model, widgets }",
|
||||
" }",
|
||||
"",
|
||||
" fn update(&mut self, message: Self::Input, sender: ComponentSender<Self>, root: &Self::Root) {",
|
||||
" match message {",
|
||||
"",
|
||||
" }",
|
||||
" }",
|
||||
"}"
|
||||
]
|
||||
},
|
||||
"Relm4 Simple Component": {
|
||||
"prefix": "relm-simple-component",
|
||||
"description": "Relm4 SimpleComponent Widget",
|
||||
"body": [
|
||||
"use relm4::{gtk, SimpleComponent, ComponentSender, ComponentParts};",
|
||||
"",
|
||||
"pub struct ComponentModel {}",
|
||||
"",
|
||||
"#[derive(Debug)]",
|
||||
"pub enum ComponentInput {}",
|
||||
"",
|
||||
"#[derive(Debug)]",
|
||||
"pub enum ComponentOutput {}",
|
||||
"",
|
||||
"pub struct ComponentInit {}",
|
||||
"",
|
||||
"#[relm4::component(pub)]",
|
||||
"impl SimpleComponent for ComponentModel {",
|
||||
" type Input = ComponentInput;",
|
||||
" type Output = ComponentOutput;",
|
||||
" type Init = ComponentInit;",
|
||||
"",
|
||||
" view! {",
|
||||
" #[root]",
|
||||
" gtk::Box {",
|
||||
"",
|
||||
" }",
|
||||
" }",
|
||||
"",
|
||||
" fn init(",
|
||||
" init: Self::Init,",
|
||||
" root: &Self::Root,",
|
||||
" sender: ComponentSender<Self>,",
|
||||
" ) -> ComponentParts<Self> {",
|
||||
" let model = ComponentModel {};",
|
||||
" let widgets = view_output!();",
|
||||
" ComponentParts { model, widgets }",
|
||||
" }",
|
||||
"",
|
||||
" fn update(&mut self, message: Self::Input, sender: ComponentSender<Self>) {",
|
||||
" match message {",
|
||||
"",
|
||||
" }",
|
||||
" }",
|
||||
"}"
|
||||
]
|
||||
},
|
||||
"Relm4 Async Component": {
|
||||
"prefix": "relm-async-component",
|
||||
"description": "Relm4 Component Widget",
|
||||
"body": [
|
||||
"use relm4::{gtk, component::{AsyncComponent, AsyncComponentParts}, AsyncComponentSender};",
|
||||
"",
|
||||
"pub struct AsyncComponentModel {}",
|
||||
"",
|
||||
"#[derive(Debug)]",
|
||||
"pub enum AsyncComponentInput {}",
|
||||
"",
|
||||
"#[derive(Debug)]",
|
||||
"pub enum AsyncComponentOutput {}",
|
||||
"",
|
||||
"pub struct AsyncComponentInit {}",
|
||||
"",
|
||||
"#[relm4::component(pub async)]",
|
||||
"impl AsyncComponent for AsyncComponentModel {",
|
||||
" type CommandOutput = ();",
|
||||
" type Input = AsyncComponentInput;",
|
||||
" type Output = AsyncComponentOutput;",
|
||||
" type Init = AsyncComponentInit;",
|
||||
"",
|
||||
" view! {",
|
||||
" #[root]",
|
||||
" gtk::Box {",
|
||||
"",
|
||||
" }",
|
||||
" }",
|
||||
"",
|
||||
" async fn init(",
|
||||
" init: Self::Init,",
|
||||
" root: Self::Root,",
|
||||
" sender: AsyncComponentSender<Self>,",
|
||||
" ) -> AsyncComponentParts<Self> {",
|
||||
" let model = AsyncComponentModel {};",
|
||||
" let widgets = view_output!();",
|
||||
" AsyncComponentParts { model, widgets }",
|
||||
" }",
|
||||
"",
|
||||
" async fn update(&mut self, message: Self::Input, sender: AsyncComponentSender<Self>, _root: &Self::Root) {",
|
||||
" match message {",
|
||||
"",
|
||||
" }",
|
||||
" }",
|
||||
"}"
|
||||
]
|
||||
},
|
||||
"Relm4 Async Simple Component": {
|
||||
"prefix": "relm-simple-async-component",
|
||||
"description": "Relm4 SimpleAsyncComponent Widget",
|
||||
"body": [
|
||||
"use relm4::{gtk, component::{SimpleAsyncComponent, AsyncComponentParts}, AsyncComponentSender};",
|
||||
"",
|
||||
"pub struct AsyncComponentModel {}",
|
||||
"",
|
||||
"#[derive(Debug)]",
|
||||
"pub enum AsyncComponentInput {}",
|
||||
"",
|
||||
"#[derive(Debug)]",
|
||||
"pub enum AsyncComponentOutput {}",
|
||||
"",
|
||||
"pub struct AsyncComponentInit {}",
|
||||
"",
|
||||
"#[relm4::component(pub async)]",
|
||||
"impl SimpleAsyncComponent for AsyncComponentModel {",
|
||||
" type Input = AsyncComponentInput;",
|
||||
" type Output = AsyncComponentOutput;",
|
||||
" type Init = AsyncComponentInit;",
|
||||
"",
|
||||
" view! {",
|
||||
" #[root]",
|
||||
" gtk::Box {",
|
||||
"",
|
||||
" }",
|
||||
" }",
|
||||
"",
|
||||
" async fn init(",
|
||||
" init: Self::Init,",
|
||||
" root: Self::Root,",
|
||||
" sender: AsyncComponentSender<Self>,",
|
||||
" ) -> AsyncComponentParts<Self> {",
|
||||
" let model = AsyncComponentModel {};",
|
||||
" let widgets = view_output!();",
|
||||
" AsyncComponentParts { model, widgets }",
|
||||
" }",
|
||||
"",
|
||||
" async fn update(&mut self, message: Self::Input, sender: AsyncComponentSender<Self>) {",
|
||||
" match message {",
|
||||
"",
|
||||
" }",
|
||||
" }",
|
||||
"}"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,157 @@
|
||||
{
|
||||
"Relm4 Factory Component": {
|
||||
"prefix": "relm-factory",
|
||||
"description": "Relm4 Factory Component",
|
||||
"body": [
|
||||
"use relm4::{",
|
||||
" factory::FactoryView,",
|
||||
" gtk,",
|
||||
" prelude::{DynamicIndex, FactoryComponent},",
|
||||
" FactorySender,",
|
||||
"};",
|
||||
"",
|
||||
"pub struct FactoryModel {}",
|
||||
"",
|
||||
"#[derive(Debug)]",
|
||||
"pub enum FactoryInput {}",
|
||||
"",
|
||||
"#[derive(Debug)]",
|
||||
"pub enum FactoryOutput {}",
|
||||
"",
|
||||
"pub struct FactoryInit {}",
|
||||
"",
|
||||
"#[relm4::factory(pub)]",
|
||||
"impl FactoryComponent for FactoryModel {",
|
||||
" type ParentWidget = gtk::Box;",
|
||||
" type ParentInput = ();",
|
||||
" type Input = FactoryInput;",
|
||||
" type Output = FactoryOutput;",
|
||||
" type Init = FactoryInit;",
|
||||
" type CommandOutput = ();",
|
||||
"",
|
||||
" view! {",
|
||||
" #[root]",
|
||||
" gtk::Box {",
|
||||
"",
|
||||
" }",
|
||||
" }",
|
||||
"",
|
||||
" fn init_model(",
|
||||
" init: Self::Init,",
|
||||
" index: &DynamicIndex,",
|
||||
" sender: FactorySender<Self>,",
|
||||
" ) -> Self {",
|
||||
" Self {}",
|
||||
" }",
|
||||
"",
|
||||
" fn init_widgets(",
|
||||
" &mut self,",
|
||||
" _index: &DynamicIndex,",
|
||||
" root: &Self::Root,",
|
||||
" _returned_widget: &<Self::ParentWidget as FactoryView>::ReturnedWidget,",
|
||||
" sender: FactorySender<Self>,",
|
||||
" ) -> Self::Widgets {",
|
||||
" let widgets = view_output!();",
|
||||
" widgets",
|
||||
" }",
|
||||
"",
|
||||
" fn update(&mut self, message: Self::Input, sender: FactorySender<Self>) {",
|
||||
" match message {}",
|
||||
" }",
|
||||
"",
|
||||
" fn output_to_parent_input(output: Self::Output) -> Option<Self::ParentInput> {",
|
||||
" let output = match output {};",
|
||||
" Some(output)",
|
||||
" }",
|
||||
"}"
|
||||
]
|
||||
},
|
||||
"Relm4 Async Factory Component": {
|
||||
"prefix": "relm-async-factory",
|
||||
"description": "Relm4 Async Factory Component",
|
||||
"body": [
|
||||
"use relm4::{",
|
||||
" factory::{FactoryView, AsyncFactoryComponent},",
|
||||
" gtk,",
|
||||
" prelude::{DynamicIndex}, ",
|
||||
" AsyncFactorySender, loading_widgets::LoadingWidgets,",
|
||||
"};",
|
||||
"",
|
||||
"pub struct FactoryModel {}",
|
||||
"",
|
||||
"#[derive(Debug)]",
|
||||
"pub enum FactoryInput {}",
|
||||
"",
|
||||
"#[derive(Debug)]",
|
||||
"pub enum FactoryOutput {}",
|
||||
"",
|
||||
"pub struct FactoryInit {}",
|
||||
"",
|
||||
"#[relm4::factory(pub async)]",
|
||||
"impl AsyncFactoryComponent for FactoryModel {",
|
||||
" type ParentWidget = gtk::Box;",
|
||||
" type ParentInput = ();",
|
||||
" type Input = FactoryInput;",
|
||||
" type Output = FactoryOutput;",
|
||||
" type Init = FactoryInit;",
|
||||
" type CommandOutput = ();",
|
||||
"",
|
||||
" view! {",
|
||||
" #[root]",
|
||||
" gtk::Box {",
|
||||
"",
|
||||
" }",
|
||||
" }",
|
||||
"",
|
||||
" fn init_loading_widgets(",
|
||||
" root: &mut Self::Root,",
|
||||
" ) -> Option<LoadingWidgets> {",
|
||||
" relm4::view! {",
|
||||
" #[local_ref]",
|
||||
" root {",
|
||||
" #[name(spinner)]",
|
||||
" gtk::Spinner {",
|
||||
" start: ()",
|
||||
" }",
|
||||
" }",
|
||||
" }",
|
||||
" Some(LoadingWidgets::new(root, spinner))",
|
||||
" }",
|
||||
"",
|
||||
" async fn init_model(",
|
||||
" init: Self::Init,",
|
||||
" _index: &DynamicIndex,",
|
||||
" _sender: AsyncFactorySender<Self>,",
|
||||
" ) -> Self {",
|
||||
" Self {",
|
||||
" ",
|
||||
" }",
|
||||
" }",
|
||||
"",
|
||||
" fn init_widgets(",
|
||||
" &mut self,",
|
||||
" _index: &DynamicIndex,",
|
||||
" root: &Self::Root,",
|
||||
" _returned_widget: &<Self::ParentWidget as FactoryView>::ReturnedWidget,",
|
||||
" sender: AsyncFactorySender<Self>,",
|
||||
" ) -> Self::Widgets {",
|
||||
" let widgets = view_output!();",
|
||||
" widgets",
|
||||
" }",
|
||||
"",
|
||||
" async fn update(",
|
||||
" &mut self,",
|
||||
" message: Self::Input,",
|
||||
" sender: AsyncFactorySender<Self>,",
|
||||
" ) {",
|
||||
" match message {}",
|
||||
" }",
|
||||
"",
|
||||
" fn output_to_parent_input(output: Self::Output) -> Option<Self::ParentInput> {",
|
||||
" let output = match output {};",
|
||||
" Some(output)",
|
||||
" }",
|
||||
"}"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"Relm4 Widget Template": {
|
||||
"prefix": "relm-template",
|
||||
"description": "Relm4 Widget Template",
|
||||
"body": [
|
||||
"use relm4::{gtk, WidgetTemplate};",
|
||||
"",
|
||||
"#[relm4::widget_template]",
|
||||
"impl WidgetTemplate for Widget {",
|
||||
" view! {",
|
||||
" gtk::Box {",
|
||||
" // Customize your widget",
|
||||
" }",
|
||||
" }",
|
||||
"}"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"Relm4 Worker": {
|
||||
"prefix": "relm-worker",
|
||||
"description": "Relm4 Worker",
|
||||
"body": [
|
||||
"use relm4::{ComponentSender, Worker};",
|
||||
"",
|
||||
"pub struct AsyncHandler;",
|
||||
"",
|
||||
"#[derive(Debug)]",
|
||||
"pub enum AsyncHandlerInput {}",
|
||||
"",
|
||||
"impl Worker for AsyncHandler {",
|
||||
" type Init = ();",
|
||||
" type Input = AsyncHandlerInput;",
|
||||
" type Output = ();",
|
||||
"",
|
||||
" fn init(_init: Self::Init, _sender: ComponentSender<Self>) -> Self {",
|
||||
" Self",
|
||||
" }",
|
||||
"",
|
||||
" fn update(&mut self, msg: AsyncHandlerInput, sender: ComponentSender<Self>) {",
|
||||
" match msg {}",
|
||||
" }",
|
||||
"}"
|
||||
]
|
||||
}
|
||||
}
|
||||
536
dot_vim/plugged/friendly-snippets/snippets/frameworks/twig.json
Normal file
536
dot_vim/plugged/friendly-snippets/snippets/frameworks/twig.json
Normal file
@@ -0,0 +1,536 @@
|
||||
{
|
||||
"asset": {
|
||||
"prefix": "asset",
|
||||
"body":
|
||||
"{% set asset = ${1:entry.assetFieldHandle}.one() %}\n\n{% if asset %}\n\t<img src=\"{{ asset.getUrl(\"${2:thumb}\") }}\" width=\"{{ asset.getWidth(\"${2:thumb}\") }}\" height=\"{{ asset.getHeight(\"${2:thumb}\") }}\" alt=\"{{ asset.title }}\">\n{% endif %}",
|
||||
"description": "asset"
|
||||
},
|
||||
"assets": {
|
||||
"prefix": "assets",
|
||||
"body":
|
||||
"{% for image in craft.assets.\n\t.sourceId(\"${1:1}\")\n\t.kind(\"${2:image}\")\n\t.limit(${3:10})\n}).all() %}\n\t<img src=\"{{ image.url${4:(\"${5:thumb}\")} }}\" width=\"${6:200}\" height=\"${7:200}\" alt=\"{{ image.title }}\">\n{% endfor %}\n$0",
|
||||
"description": "craft.assets"
|
||||
},
|
||||
"autoescape": {
|
||||
"prefix": "autoescape",
|
||||
"body": "{% autoescape \"${1:type}\" %}\n\t$0\n{% endautoescape %}",
|
||||
"description": "autoescape"
|
||||
},
|
||||
"blockb": {
|
||||
"prefix": "blockb",
|
||||
"body": "{% block ${1:name} %}\n\t$0\n{% endblock %}",
|
||||
"description": "block (block)"
|
||||
},
|
||||
"block": {
|
||||
"prefix": "block",
|
||||
"body": "{% block ${1:name} %}$0{% endblock %}",
|
||||
"description": "block"
|
||||
},
|
||||
"blockf": {
|
||||
"prefix": "blockf",
|
||||
"body": "{{ block(\"${1:name}\") }}$0",
|
||||
"description": "blockf"
|
||||
},
|
||||
"cache": {
|
||||
"prefix": "cache",
|
||||
"body": "{% cache %}\n\t$1\n{% endcache %}\n$0",
|
||||
"description": "cache"
|
||||
},
|
||||
"case": {
|
||||
"prefix": "case",
|
||||
"body": "{% case \"${1:value}\" %}\n\t$0",
|
||||
"description": "case"
|
||||
},
|
||||
"children": {
|
||||
"prefix": "children",
|
||||
"body": "{% children %}$0",
|
||||
"description": "children"
|
||||
},
|
||||
"ceil": {
|
||||
"prefix": "ceil",
|
||||
"body": "ceil($1)$0",
|
||||
"description": "ceil"
|
||||
},
|
||||
"assetso": {
|
||||
"prefix": "assetso",
|
||||
"body":
|
||||
"{% set assets = craft.assets({\n\tsourceId: \"${1:1}\",\n\tkind: \"${2:image}\",\n\tlimit: ${3:10}\n}).all() %}\n\n{% for image in assets %}\n\t<img src=\"{{ image.url${4:(\"${5:thumb}\")} }}\" width=\"${6:200}\" height=\"${7:200}\" alt=\"{{ image.title }}\">\n{% endfor %}\n$0",
|
||||
"description": "craft.assets - object syntax"
|
||||
},
|
||||
"categorieso": {
|
||||
"prefix": "categorieso",
|
||||
"body":
|
||||
"{% set categories = craft.categories({\n\tgroup: \"${1:categoryGroupHandle}\",\n\tlimit: \"${2:11}\"\n}).all() %}\n\n<ul>\n\t{% nav category in categories %}\n\t\t<li>\n\t\t\t<a href=\"{{ category.url }}\">{{ category.title }}</a>\n\t\t\t{% ifchildren %}\n\t\t\t\t<ul>\n\t\t\t\t\t{% children %}\n\t\t\t\t</ul>\n\t\t\t{% endifchildren %}\n\t\t</li>\n\t{% endnav %}\n</ul>",
|
||||
"description": "craft.categories - object syntax"
|
||||
},
|
||||
"categories": {
|
||||
"prefix": "categories",
|
||||
"body":
|
||||
"<ul>\n\t{% nav category in craft.categories\n\t\t.group(\"${1:categoryGroupHandle}\")\n\t\t.limit(${2:11})\n\t\t.all()\n\t%}\n\t\t<li>\n\t\t\t<a href=\"{{ category.url }}\">{{ category.title }}</a>\n\t\t\t{% ifchildren %}\n\t\t\t\t<ul>\n\t\t\t\t\t{% children %}\n\t\t\t\t</ul>\n\t\t\t{% endifchildren %}\n\t\t</li>\n\t{% endnav %}\n</ul>",
|
||||
"description": "craft.categories"
|
||||
},
|
||||
"entrieso": {
|
||||
"prefix": "entrieso",
|
||||
"body":
|
||||
"{% set entries = craft.entries({\n\tsection: \"${1:sectionName}\",\n\tlimit: \"${2:10}\"\n}).all() %}\n\n{% for entry in entries %}\n\t<a href=\"{{ entry.url }}\">{{ entry.title }}</a>\n{% endfor %}\n$0",
|
||||
"description": "craft.entries - object syntax"
|
||||
},
|
||||
"entries": {
|
||||
"prefix": "entries",
|
||||
"body":
|
||||
"{% for entry in craft.entries\n\t.section(\"${1:sectionName}\")\n\t.limit(${2:10})\n\t.all()\n%}\n\t<a href=\"{{ entry.url }}\">{{ entry.title }}</a>\n{% endfor %}\n$0",
|
||||
"description": "craft.entries"
|
||||
},
|
||||
"t": {
|
||||
"prefix": "t",
|
||||
"body": "{{ $1 | t }}$0",
|
||||
"description": "translate with | t"
|
||||
},
|
||||
"replace": {
|
||||
"prefix": "replace",
|
||||
"body": "{{ ${1:$TM_SELECTED_TEXT} | replace(\"search\", \"replace\") }}$0",
|
||||
"description": "replace with | replace(\"search\", \"replace\")"
|
||||
},
|
||||
"replacex": {
|
||||
"prefix": "replacex",
|
||||
"body":
|
||||
"{{ ${1:$TM_SELECTED_TEXT} | replace(\"/(search)/i\", \"replace\") }}$0",
|
||||
"description": "replace regex with | replace(\"/(search)/i\", \"replace\")"
|
||||
},
|
||||
"split": {
|
||||
"prefix": "split",
|
||||
"body": "{{ ${1:$TM_SELECTED_TEXT} | split(\"\\n\") }}$0",
|
||||
"description": "split on | split (\"\\n\")"
|
||||
},
|
||||
"tagso": {
|
||||
"prefix": "tagso",
|
||||
"body":
|
||||
"{% set tags = craft.tags({\n\tgroup: \"${1:tagGroupHandle}\"\n}).all() %}\n\n<ul>\n\t{% for tag in tags %}\n\t\t<li>{{ tag }}</a></li>\n\t{% endfor %}\n</ul>\n$0",
|
||||
"description": "craft.tags - object syntax"
|
||||
},
|
||||
"tags": {
|
||||
"prefix": "tags",
|
||||
"body":
|
||||
"<ul>\n\t{% for tag in craft.tags.group(\"${1:tagGroupHandle}\").all() %}\n\t\t<li>{{ tag }}</li>\n\t{% endfor %}\n</ul>\n$0",
|
||||
"description": "craft.tags"
|
||||
},
|
||||
"userso": {
|
||||
"prefix": "userso",
|
||||
"body":
|
||||
"{% set users = craft.users({\n\tgroup: \"${1:userGroupHandle}\"\n}).all() %}\n\n{% for user in users %}\n\t{{ user.firstName }} {{ user.lastName }}\n{% endfor %}\n$0",
|
||||
"description": "craft.users - object syntax"
|
||||
},
|
||||
"users": {
|
||||
"prefix": "users",
|
||||
"body":
|
||||
"{% for user in craft.users.group(\"${1:userGroupHandle}\").all() %}\n\t{{ user.firstName }} {{ user.lastName }}\n{% endfor %}\n$0",
|
||||
"description": "craft.users"
|
||||
},
|
||||
"csrf": {
|
||||
"prefix": "csrf",
|
||||
"body": "{{ csrfInput() }}\n$0",
|
||||
"description": "csrf"
|
||||
},
|
||||
"dd": {
|
||||
"prefix": "dd",
|
||||
"body": "<pre>\n\t{{ dump($1) }}\n</pre>\n{% exit %}$0",
|
||||
"description": "dump and die"
|
||||
},
|
||||
"do": {
|
||||
"prefix": "do",
|
||||
"body": "{% do $1 %}$0",
|
||||
"description": "do"
|
||||
},
|
||||
"dojs": {
|
||||
"prefix": "dojs",
|
||||
"body": "{% do view.registerJsFile \"${1:url}\" %}$0",
|
||||
"description": "do js"
|
||||
},
|
||||
"docss": {
|
||||
"prefix": "docss",
|
||||
"body": "{% do view.registerCssFile \"${1:url}\" %}$0",
|
||||
"description": "do css"
|
||||
},
|
||||
"dump": {
|
||||
"prefix": "dump",
|
||||
"body": "<pre>\n\t{{ dump($1) }}\n</pre>",
|
||||
"description": "dump"
|
||||
},
|
||||
"else": {
|
||||
"prefix": "else",
|
||||
"body": "{% else %}\n\t$0",
|
||||
"description": "else"
|
||||
},
|
||||
"embed": {
|
||||
"prefix": "embed",
|
||||
"body": "{% embed \"${1:template}\" %}\n\t$0\n{% endembed %}",
|
||||
"description": "embed"
|
||||
},
|
||||
"endautoescape": {
|
||||
"prefix": "endautoescape",
|
||||
"body": "{% endautoescape %}$0",
|
||||
"description": "endautoescape"
|
||||
},
|
||||
"endblock": {
|
||||
"prefix": "endblock",
|
||||
"body": "{% endblock %}$0",
|
||||
"description": "endblock"
|
||||
},
|
||||
"endcache": {
|
||||
"prefix": "endcache",
|
||||
"body": "{% endcache %}$0",
|
||||
"description": "endcache"
|
||||
},
|
||||
"endembed": {
|
||||
"prefix": "endembed",
|
||||
"body": "{% endembed %}$0",
|
||||
"description": "endembed"
|
||||
},
|
||||
"endfilter": {
|
||||
"prefix": "endfilter",
|
||||
"body": "{% endfilter %}$0",
|
||||
"description": "endfilter"
|
||||
},
|
||||
"endfor": {
|
||||
"prefix": "endfor",
|
||||
"body": "{% endfor %}$0",
|
||||
"description": "endfor"
|
||||
},
|
||||
"endif": {
|
||||
"prefix": "endif",
|
||||
"body": "{% endif %}$0",
|
||||
"description": "endif"
|
||||
},
|
||||
"endifchildren": {
|
||||
"prefix": "endifchildren",
|
||||
"body": "{% endifchildren %}$0",
|
||||
"description": "endifchildren"
|
||||
},
|
||||
"endcss": {
|
||||
"prefix": "endcss",
|
||||
"body": "{% endcss %}$0",
|
||||
"description": "endcss"
|
||||
},
|
||||
"endjs": {
|
||||
"prefix": "endjs",
|
||||
"body": "{% endjs %}$0",
|
||||
"description": "endjs"
|
||||
},
|
||||
"endmacro": {
|
||||
"prefix": "endmacro",
|
||||
"body": "{% endmacro %}$0",
|
||||
"description": "endmacro"
|
||||
},
|
||||
"endnav": {
|
||||
"prefix": "endnav",
|
||||
"body": "{% endnav %}$0",
|
||||
"description": "endnav"
|
||||
},
|
||||
"endset": {
|
||||
"prefix": "endset",
|
||||
"body": "{% endset %}$0",
|
||||
"description": "endset"
|
||||
},
|
||||
"endspaceless": {
|
||||
"prefix": "endspaceless",
|
||||
"body": "{% endspaceless %}$0",
|
||||
"description": "endspaceless"
|
||||
},
|
||||
"endswitch": {
|
||||
"prefix": "endswitch",
|
||||
"body": "{% endswitch %}$0",
|
||||
"description": "endswitch"
|
||||
},
|
||||
"endtrans": {
|
||||
"prefix": "endtrans",
|
||||
"body": "{% endtrans %}$0",
|
||||
"description": "endtrans"
|
||||
},
|
||||
"endverbatim": {
|
||||
"prefix": "endverbatim",
|
||||
"body": "{% endverbatim %}$0",
|
||||
"description": "endverbatim"
|
||||
},
|
||||
"exit": {
|
||||
"prefix": "exit",
|
||||
"body": "{% exit ${1:404} %}",
|
||||
"description": "exit"
|
||||
},
|
||||
"extends": {
|
||||
"prefix": "extends",
|
||||
"body": "{% extends \"${1:template}\" %}$0",
|
||||
"description": "extends"
|
||||
},
|
||||
"filterb": {
|
||||
"prefix": "filterb",
|
||||
"body": "{% filter ${1:name} %}\n\t$0\n{% endfilter %}",
|
||||
"description": "filter (block)"
|
||||
},
|
||||
"filter": {
|
||||
"prefix": "filter",
|
||||
"body": "{% filter ${1:name} %}$0{% endfilter %}",
|
||||
"description": "filter"
|
||||
},
|
||||
"floor": {
|
||||
"prefix": "floor",
|
||||
"body": "floor($1)$0",
|
||||
"description": "floor"
|
||||
},
|
||||
"fore": {
|
||||
"prefix": "fore",
|
||||
"body":
|
||||
"{% for ${1:item} in ${2:items} %}\n\t$3\n{% else %}\n\t$0\n{% endfor %}",
|
||||
"description": "for ... else"
|
||||
},
|
||||
"for": {
|
||||
"prefix": "for",
|
||||
"body": "{% for ${1:item} in ${2:items} %}\n\t$0\n{% endfor %}",
|
||||
"description": "for"
|
||||
},
|
||||
"from": {
|
||||
"prefix": "from",
|
||||
"body": "{% from \"${1:template}\" import \"${2:macro}\" %}$0",
|
||||
"description": "from"
|
||||
},
|
||||
"endbody": {
|
||||
"prefix": "endbody",
|
||||
"body": "{{ endBody() }}\n$0",
|
||||
"description": "endBody"
|
||||
},
|
||||
"head": {
|
||||
"prefix": "head",
|
||||
"body": "{{ head() }}\n$0",
|
||||
"description": "head"
|
||||
},
|
||||
"if": {
|
||||
"prefix": "if",
|
||||
"body": "{% if ${1:condition} %}$2{% endif %}\n$0",
|
||||
"description": "if"
|
||||
},
|
||||
"ifb": {
|
||||
"prefix": "ifb",
|
||||
"body": "{% if ${1:condition} %}\n\t$0\n{% endif %}",
|
||||
"description": "if (block)"
|
||||
},
|
||||
"ife": {
|
||||
"prefix": "ife",
|
||||
"body": "{% if ${1:condition} %}\n\t$2\n{% else %}\n\t$0\n{% endif %}",
|
||||
"description": "if ... else"
|
||||
},
|
||||
"if1": {
|
||||
"prefix": "if",
|
||||
"body": "{% if ${1:condition} %}$0{% endif %}",
|
||||
"description": "if"
|
||||
},
|
||||
"ifchildren": {
|
||||
"prefix": "ifchildren",
|
||||
"body": "{% ifchildren %}\n\t$1\n{% endifchildren %}\n$0",
|
||||
"description": "ifchildren"
|
||||
},
|
||||
"import": {
|
||||
"prefix": "import",
|
||||
"body": "{% import \"${1:template}\" as ${2:name} %}$0",
|
||||
"description": "import"
|
||||
},
|
||||
"importself": {
|
||||
"prefix": "importself",
|
||||
"body": "{% import _self as ${1:name} %}$0",
|
||||
"description": "importself"
|
||||
},
|
||||
"inckv": {
|
||||
"prefix": "inckv",
|
||||
"body":
|
||||
"{% include \"${1:template}\" with {\n\t${2:key}: ${3:\"${4:value}\"}\n} %}\n$0",
|
||||
"description": "include w/ key/value"
|
||||
},
|
||||
"include": {
|
||||
"prefix": "include",
|
||||
"body": "{% include \"${1:template}\" %}$0",
|
||||
"description": "include"
|
||||
},
|
||||
"inc": {
|
||||
"prefix": "inc",
|
||||
"body": "{% include \"${1:template}\" %}$0",
|
||||
"description": "inc"
|
||||
},
|
||||
"incp": {
|
||||
"prefix": "incp",
|
||||
"body": "{% include \"${1:template}\"${2: with ${3:params} }%}$0",
|
||||
"description": "include w/ params"
|
||||
},
|
||||
"css1": {
|
||||
"prefix": "css",
|
||||
"body": "{% do view.registerCssFile(\"${1:/resources/css/global.css}\") %}\n$0",
|
||||
"description": "registerCssFile"
|
||||
},
|
||||
"js": {
|
||||
"prefix": "js",
|
||||
"body": "{% js %}\n\t$1\n{% endjs %}\n$0",
|
||||
"description": "js"
|
||||
},
|
||||
"js1": {
|
||||
"prefix": "js",
|
||||
"body": "{% do view.registerJsFile(\"${1:/resources/js/global.js}\") %}\n$0",
|
||||
"description": "registerJsFile"
|
||||
},
|
||||
"css": {
|
||||
"prefix": "css",
|
||||
"body": "{% css %}\n\t$1\n{% endcss %}\n$0",
|
||||
"description": "css"
|
||||
},
|
||||
"macro": {
|
||||
"prefix": "macro",
|
||||
"body": "{% macro ${1:name}(${2:params}) %}\n\t$0\n{% endmacro %}",
|
||||
"description": "macro"
|
||||
},
|
||||
"matrix": {
|
||||
"prefix": "matrix",
|
||||
"body":
|
||||
"{% for block in ${1:entry.matrixFieldHandle}.all() %}\n\n\t{% if block.type == \"${2:blockHandle}\" %}\n\t\t{{ block.${3:fieldHandle} }}\n\t{% endif %}\n\n\t{% if block.type == \"${4:blockHandle}\" %}\n\t\t{{ block.${5:fieldHandle} }}\n\t{% endif %}\n\n{% endfor %}\n$0",
|
||||
"description": "matrix"
|
||||
},
|
||||
"matrixif": {
|
||||
"prefix": "matrixif",
|
||||
"body":
|
||||
"{% for block in ${1:entry.matrixFieldHandle}.all() %}\n\n\t{% if block.type == \"${2:blockHandle}\" %}\n\t\t{{ block.${3:fieldHandle} }}\n\t{% endif %}\n\n\t{% if block.type == \"${4:blockHandle}\" %}\n\t\t{{ block.${5:fieldHandle} }}\n\t{% endif %}\n\n{% endfor %}\n$0",
|
||||
"description": "matrixif"
|
||||
},
|
||||
"matrixifelse": {
|
||||
"prefix": "matrixifelse",
|
||||
"body":
|
||||
"{% for block in ${1:entry.matrixFieldHandle}.all() %}\n\n\t{% if block.type == \"${2:blockHandle}\" %}\n\n\t\t{{ block.${3:fieldHandle} }}\n\n\t{% elseif block.type == \"${4:blockHandle}\" %}\n\n\t\t$0\n\t\n\t{% endif %}\n\n{% endfor %}",
|
||||
"description": "matrixifelse"
|
||||
},
|
||||
"matrixswitch": {
|
||||
"prefix": "matrixswitch",
|
||||
"body":
|
||||
"{% for block in ${1:entry.matrixFieldHandle}.all() %}\n\n\t{% switch block.type %}\n\n\t\t{% case \"${2:blockHandle}\" %}\n\n\t\t\t{{ block.${3:fieldHandle} }}\n\n\t\t{% case \"${4:blockHandle}\" %}\n\n\t\t\t$0\n\n\t{% endswitch %}\n\n{% endfor %}",
|
||||
"description": "matrixswitch"
|
||||
},
|
||||
"max": {
|
||||
"prefix": "max",
|
||||
"body": "max(${1:$2, $3})$0",
|
||||
"description": "max"
|
||||
},
|
||||
"min": {
|
||||
"prefix": "min",
|
||||
"body": "min(${1:$2, $3})$0",
|
||||
"description": "min"
|
||||
},
|
||||
"nav": {
|
||||
"prefix": "nav",
|
||||
"body": "{% nav ${1:item} in ${2:items} %}\n\t$3\n{% endnav %}\n$0",
|
||||
"description": "nav"
|
||||
},
|
||||
"paginate": {
|
||||
"prefix": "paginate",
|
||||
"body":
|
||||
"{% paginate ${1:elements} as ${2:pageInfo}, ${3:pageEntries} %}\n\n{% for item in ${3:pageEntries} %}\n\t$0\n{% endfor %}\n\n{% if ${2:pageInfo}.prevUrl %}<a href=\"{{ ${2:pageInfo}.prevUrl }}\">Previous Page</a>{% endif %}\n{% if ${2:pageInfo}.nextUrl %}<a href=\"{{ ${2:pageInfo}.nextUrl }}\">Next Page</a>{% endif %}",
|
||||
"description": "paginate simple"
|
||||
},
|
||||
"paginate1": {
|
||||
"prefix": "paginate",
|
||||
"body":
|
||||
"{# PAGINATION\n\t\t\nFor this pagination to work properly, we need to be sure to set\nthe paginateBase variable in the template we are including the \npagination in.\n\n{% set paginateBase = \"/blog/p\" %}\n#}\n\n{% if pageInfo.totalPages > 1 %}\n<ul>\n\t{% if pageInfo.currentPage != \"1\" %}\n\t\t<li><a href=\"{{ paginateBase ~ \"1\" }}\">First Page</a></li>\n\t{% endif %}\n\n\t{% if pageInfo.prevUrl %}\n\t\t<li><a href=\"{{ pageInfo.prevUrl }}\">Previous Page</a></li>\n\t{% endif %}\n\n\t{% for pageNumber in 1..pageInfo.totalPages %}\n\t\t<li {% if pageInfo.currentPage == pageNumber %}class=\"active-page\"{% endif %}>\n\t\t\t<a href=\"{{ paginateBase ~ pageNumber }}\">{{ pageNumber }}</a>\n\t\t</li>\n\t{% endfor %}\n\n\t{% if pageInfo.nextUrl %}\n\t\t<li><a href=\"{{ pageInfo.nextUrl }}\">Next Page</a></li>\n\t{% endif %}\n\n\t{% if pageInfo.currentPage != pageInfo.total %}\n\t\t<li><a href=\"{{ paginateBase ~ pageInfo.total }}\">Last Page</a></li>\n\t{% endif %}\n</ul>\n{% endif %}\n$0",
|
||||
"description": "paginate advanced"
|
||||
},
|
||||
"redirect": {
|
||||
"prefix": "redirect",
|
||||
"body":
|
||||
"{% redirect \"${1:template/path or http://straightupcraft.com}\" %}\n$0",
|
||||
"description": "redirect"
|
||||
},
|
||||
"getparam": {
|
||||
"prefix": "getparam",
|
||||
"body":
|
||||
"craft.app.request.getParam(${1:\"Query String or Post Variable Name\"})\n$0",
|
||||
"description": "request getParam"
|
||||
},
|
||||
"getbodyparam": {
|
||||
"prefix": "getbodyparam",
|
||||
"body": "craft.app.request.getBodyParam(${1:\"postVariableName\"})\n$0",
|
||||
"description": "request getBodyParam"
|
||||
},
|
||||
"getqueryparam": {
|
||||
"prefix": "getqueryparam",
|
||||
"body": "craft.app.request.getQueryParam(${1:\"queryStringName\"})\n$0",
|
||||
"description": "request getQueryParam"
|
||||
},
|
||||
"getsegment": {
|
||||
"prefix": "getsegment",
|
||||
"body": "craft.app.request.getSegment(${1:2})\n$0",
|
||||
"description": "request getSegment"
|
||||
},
|
||||
"requirelogin": {
|
||||
"prefix": "requirelogin",
|
||||
"body": "{% requireLogin %}\n$0",
|
||||
"description": "requireLogin"
|
||||
},
|
||||
"requirepermission": {
|
||||
"prefix": "requirepermission",
|
||||
"body": "{% requirePermission \"${1:spendTheNight}\" %}\n$0",
|
||||
"description": "requirePermission"
|
||||
},
|
||||
"round": {
|
||||
"prefix": "round",
|
||||
"body": "{{ $1 | round(1, 'floor') }}$0",
|
||||
"description": "round"
|
||||
},
|
||||
"setb": {
|
||||
"prefix": "setb",
|
||||
"body": "{% set ${1:var} %}\n\t$0\n{% endset %}",
|
||||
"description": "set (block)"
|
||||
},
|
||||
"set": {
|
||||
"prefix": "set",
|
||||
"body": "{% set ${1:var} = ${2:value} %}$0",
|
||||
"description": "set"
|
||||
},
|
||||
"shuffle": {
|
||||
"prefix": "shuffle",
|
||||
"body": "shuffle($1)$0",
|
||||
"description": "shuffle"
|
||||
},
|
||||
"random": {
|
||||
"prefix": "random",
|
||||
"body": "random($1)$0",
|
||||
"description": "random"
|
||||
},
|
||||
"spaceless": {
|
||||
"prefix": "spaceless",
|
||||
"body": "{% spaceless %}\n\t$0\n{% endspaceless %}",
|
||||
"description": "spaceless"
|
||||
},
|
||||
"switch": {
|
||||
"prefix": "switch",
|
||||
"body":
|
||||
"{% switch ${1:variable} %}\n\n\t{% case \"${2:value1}\" %}\n\t\n\n\t{% case \"${3:value2}\" %}\n\t\n\n\t{% default %}\n\t\n\n{% endswitch %}\n$0",
|
||||
"description": "switch"
|
||||
},
|
||||
"trans": {
|
||||
"prefix": "trans",
|
||||
"body": "{% trans %}$0{% endtrans %}",
|
||||
"description": "trans"
|
||||
},
|
||||
"urla": {
|
||||
"prefix": "urla",
|
||||
"body":
|
||||
"url(\"${1:path}\", ${2:{foo:\"1\", bar:\"2\"\\}}, ${3:\"http\"}, ${4:false})$0",
|
||||
"description": "url w/ arguments"
|
||||
},
|
||||
"url": {
|
||||
"prefix": "url",
|
||||
"body": "url(\"${1:path}\")$0",
|
||||
"description": "url"
|
||||
},
|
||||
"use": {
|
||||
"prefix": "use",
|
||||
"body": "{% use \"${1:template}\" %}$0",
|
||||
"description": "use"
|
||||
},
|
||||
"verbatim": {
|
||||
"prefix": "verbatim",
|
||||
"body": "{% verbatim %}\n\t$0\n{% endverbatim %}",
|
||||
"description": "verbatim"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,434 @@
|
||||
{
|
||||
"Unreal Print String": {
|
||||
"prefix": "uprintstring",
|
||||
"body": "GEngine->AddOnScreenDebugMessage(0, ${1:0.f}, FColor::${2|Red,Green,Blue,Cyan,Magenta,Yellow,Purple,Orange|}, FString::Printf(TEXT(\"${3:TEXT}\")));",
|
||||
"description": "Print a string to screen ingame (duration, color, text)"
|
||||
},
|
||||
"Write to Log": {
|
||||
"prefix": "ulog",
|
||||
"body": "UE_LOG(LogTemp, ${1|Display,Warning,Error,Fatal|}, TEXT(\"${2:Your message}\"));",
|
||||
"description": "Write a message to the log"
|
||||
},
|
||||
"Write to Log (with fn helper)": {
|
||||
"prefix": "ulogfn",
|
||||
"body": "UE_LOG(LogTemp, ${1|Display,Warning,Error,Fatal|}, TEXT(\"$2%s\"), ANSI_TO_TCHAR(__FUNCTION__));",
|
||||
"description": "Write a message to the log"
|
||||
},
|
||||
"Unreal Enum": {
|
||||
"prefix": "uenum",
|
||||
"body": [
|
||||
"UENUM(BlueprintType)",
|
||||
"enum class ${1:EName} : ${2:uint8}",
|
||||
"{",
|
||||
"\t${3:N_Name1} UMETA(DisplayName=\"${4:DisplayName}\")",
|
||||
"};"
|
||||
],
|
||||
"description": "Generate an Enum ready for Unreal Engine"
|
||||
},
|
||||
"Unreal Struct": {
|
||||
"prefix": "ustruct",
|
||||
"body": [
|
||||
"USTRUCT(BlueprintType)",
|
||||
"struct ${1:FMyStruct}",
|
||||
"{",
|
||||
"\tGENERATED_USTRUCT_BODY()\n",
|
||||
"\tUPROPERTY(EditAnywhere, BlueprintReadWrite, Category=${2:MyCategory})",
|
||||
"\t${3:float test};",
|
||||
"};"
|
||||
],
|
||||
"description": "Generate a Struct ready for Unreal Engine"
|
||||
},
|
||||
"Unreal Struct with header": {
|
||||
"prefix": "uhstruct",
|
||||
"body": [
|
||||
"#pragma once",
|
||||
"",
|
||||
"#include \"CoreMinimal.h\"",
|
||||
"",
|
||||
"#include \"$2${TM_FILENAME_BASE:StructName}.generated.h\"",
|
||||
|
||||
"USTRUCT(BlueprintType)",
|
||||
"struct F$1${TM_FILENAME_BASE:StructName}",
|
||||
"{",
|
||||
"\tGENERATED_BODY()\n",
|
||||
"public:",
|
||||
"\tUPROPERTY(EditAnywhere, BlueprintReadWrite, Category=\"${3:MyCategory}\")",
|
||||
"\t${4:float test};",
|
||||
"};"
|
||||
],
|
||||
"description": "Generate a Struct ready for Unreal Engine"
|
||||
},
|
||||
"Unreal DataTable Struct": {
|
||||
"prefix": "ustruct_datatable",
|
||||
"body": [
|
||||
"USTRUCT(BlueprintType)",
|
||||
"struct ${1:FMyStruct} : public FTableRowBase",
|
||||
"{",
|
||||
"\tGENERATED_USTRUCT_BODY()\n",
|
||||
"\tUPROPERTY(EditAnywhere, BlueprintReadWrite, Category=${2:MyCategory})",
|
||||
"\t${3:float test};",
|
||||
"};"
|
||||
],
|
||||
"description": "Generate a Struct ready for Unreal Engine DataTables"
|
||||
},
|
||||
"Unreal Class": {
|
||||
"prefix": "uclass",
|
||||
"body": [
|
||||
"UCLASS()",
|
||||
"class ${1:PROJECTNAME}_API ${2:ClassName} : public ${3:ParentClass}",
|
||||
"{",
|
||||
"\tGENERATED_BODY()",
|
||||
"public:",
|
||||
"\t${2:ClassName}();",
|
||||
"protected:",
|
||||
"private:",
|
||||
"};"
|
||||
],
|
||||
"description": "Generate a Class ready for Unreal Engine"
|
||||
},
|
||||
"Unreal Class with header": {
|
||||
"prefix": "uhclass",
|
||||
"body": [
|
||||
"#pragma once",
|
||||
"",
|
||||
"#include \"CoreMinimal.h\"",
|
||||
"#include \"$4${3:ParentClass}.h\"",
|
||||
"",
|
||||
"#include \"${TM_FILENAME_BASE:ClassName}.generated.h\"",
|
||||
"",
|
||||
"UCLASS()",
|
||||
"class ${1:PROJECTNAME}_API $2${TM_FILENAME_BASE:ClassName} : public ${3:ParentClass}",
|
||||
"{",
|
||||
"\tGENERATED_BODY()",
|
||||
"public:",
|
||||
"\t$2${TM_FILENAME_BASE:ClassName}();",
|
||||
"$5",
|
||||
"protected:",
|
||||
"private:",
|
||||
"};"
|
||||
],
|
||||
"description": "Generate a Class ready for Unreal Engine (include headers details)"
|
||||
},
|
||||
"Unreal Interface": {
|
||||
"prefix": "uinterface",
|
||||
"body": [
|
||||
"UINTERFACE()",
|
||||
"class ${1:PROJECTNAME}_API U${2:ClassName} : public UInterface",
|
||||
"{",
|
||||
"\tGENERATED_BODY()",
|
||||
"};",
|
||||
"",
|
||||
"class ${1:PROJECTNAME}_API I${2:ClassName}",
|
||||
"{",
|
||||
"\tGENERATED_BODY()",
|
||||
"public:",
|
||||
"$3",
|
||||
"};"
|
||||
],
|
||||
"description": "Generate an Interface ready for Unreal Engine"
|
||||
},
|
||||
"Unreal Interface with header": {
|
||||
"prefix": "uhinterface",
|
||||
"body": [
|
||||
"#pragma once",
|
||||
"",
|
||||
"#include \"CoreMinimal.h\"",
|
||||
"",
|
||||
"#include \"${TM_FILENAME_BASE:ClassName}.generated.h\"",
|
||||
"",
|
||||
"UINTERFACE()",
|
||||
"class ${1:PROJECTNAME}_API U$2${TM_FILENAME_BASE:ClassName} : public UInterface",
|
||||
"{",
|
||||
"\tGENERATED_BODY()",
|
||||
"};",
|
||||
"",
|
||||
"class ${1:PROJECTNAME}_API I$2${TM_FILENAME_BASE:ClassName}",
|
||||
"{",
|
||||
"\tGENERATED_BODY()",
|
||||
"public:",
|
||||
"$3",
|
||||
"};"
|
||||
],
|
||||
"description": "Generate an Interface ready for Unreal Engine (include headers details)"
|
||||
},
|
||||
"Unreal GetLifeTimeReplicates": {
|
||||
"prefix": ["ugetlifetimereplicatedprops", "usetupreplicatedproperties"],
|
||||
"body": [
|
||||
"void ${1:ClassName}::GetLifetimeReplicatedProps(TArray<FLifetimeProperty>& OutLifetimeProps) const",
|
||||
"{",
|
||||
"\tSuper::GetLifetimeReplicatedProps(OutLifetimeProps);",
|
||||
"\t//DON'T FORGET TO #include \"Net/UnrealNetwork.h\"",
|
||||
"\tDOREPLIFETIME(${1:ClassName}, ${2:ClassProperty});",
|
||||
"}"
|
||||
],
|
||||
"description": "Creates the Function in which you setup replicated properties"
|
||||
},
|
||||
"Unreal Cast": {
|
||||
"prefix": "ucast",
|
||||
"body": "${1:AMyClass}* ${2:MyCastActor} = Cast<${1:AMyClass}>(${3:MyActor});",
|
||||
"description": "Cast from-to any UObject"
|
||||
},
|
||||
"Unreal Property": {
|
||||
"prefix": "uproperty",
|
||||
"body": "UPROPERTY(${1|AdvancedDisplay,AssetRegistrySearchable,BlueprintAssignable,BlueprintAuthorityOnly,BlueprintCallable,BlueprintGetter=GetterFunctionName,BlueprintReadOnly,BlueprintReadWrite,BlueprintSetter=SetterFunctionName,Category=\"MyCategory\",Config,DuplicateTransient,EditAnywhere,EditDefaultsOnly,EditFixedSize,EditInline,EditInstanceOnly,Export,GlobalConfig,Instanced,Interp,Localized,Native,NoClear,NoExport,NonPIEDuplicateTransient,NonTransactional,NotReplicated,Replicated,ReplicatedUsing=FunctionName,RepRetry,SaveGame,SerializeText,SkipSerialization,SimpleDisplay,TextExportTransient,Transient,VisibleAnywhere,VisibleDefaultsOnly,VisibleInstanceOnly|})",
|
||||
"description": "UPROPERTY macro for Unreal Engine"
|
||||
},
|
||||
"Unreal Function": {
|
||||
"prefix": "ufunction",
|
||||
"body": "UFUNCTION($1)",
|
||||
"description": "UFUNCTION macro for Unreal Engine"
|
||||
},
|
||||
"Unreal Server Function": {
|
||||
"prefix": "ufunction_server",
|
||||
"body": [
|
||||
"UFUNCTION(Server, Reliable, WithValidation)",
|
||||
"void ${1:FunctionName}(${2:FunctionParameters});"
|
||||
],
|
||||
"description": "Setup Function run only on Server"
|
||||
},
|
||||
"Unreal Multicast Function": {
|
||||
"prefix": "ufunction_multicast",
|
||||
"body": [
|
||||
"UFUNCTION(NetMulticast, Reliable, WithValidation)",
|
||||
"void ${1:FunctionName}(${2:FunctionParameters});"
|
||||
],
|
||||
"description": "Setup Function called on all Clients"
|
||||
},
|
||||
"Unreal Client Function": {
|
||||
"prefix": "ufunction_client",
|
||||
"body": [
|
||||
"UFUNCTION(Client, Unreliable)",
|
||||
"void ${1:FunctionName}(${2:FunctionParameters});"
|
||||
],
|
||||
"description": "Setup Function run only on owning Client"
|
||||
},
|
||||
"Unreal Subclass": {
|
||||
"prefix": "usubclassof",
|
||||
"body": "TSubclassOf<class ${1:ClassName}> ${2:VarName};",
|
||||
"description": "Reference to Class (assign using \"AMyClass::StaticClass()\")"
|
||||
},
|
||||
"Unreal DefaultSubobject": {
|
||||
"prefix": "ucreatedefaultsubobject",
|
||||
"body": "${1:ObjectName} = CreateDefaultSubobject<${2:ObjectClass}>(TEXT(\"${1:ObjectName}\"));",
|
||||
"description": "Creates Subobject (component)"
|
||||
},
|
||||
"Unreal GetWorldSafe": {
|
||||
"prefix": "ugetworldsafe",
|
||||
"body": ["UWorld* World = GetWorld();", "if(World)", "{", "\t$1", "}"],
|
||||
"description": "Get World (safe with if check)"
|
||||
},
|
||||
"Unreal GetGamemode": {
|
||||
"prefix": "ugetgamemode",
|
||||
"body": "${1:GameModeClass}* ${2:gm} = GetWorld()->GetAuthGameMode<${1:GameModeClass}>();",
|
||||
"description": "Get Game Mode (only on server!)"
|
||||
},
|
||||
"Unreal Linetrace Single Channel": {
|
||||
"prefix": "ulinetrace_single_channel",
|
||||
"body": "GetWorld()->LineTraceSingleByChannel(${1:Hit}, ${2:Start}, ${3:End}, ${4|ECC_Visibility,ECC_Camera,ECC_GameTraceChannel1|}, ${5:TraceParams});",
|
||||
"description": "Single Line Trace by Channel"
|
||||
},
|
||||
"Unreal Linetrace Single Object": {
|
||||
"prefix": "ulinetrace_single_object",
|
||||
"body": "GetWorld()->LineTraceSingleByObjectType(${1:Hit}, ${2:Start}, ${3:End}, ${4:ObjectQueryParams}, ${5:TraceParams});",
|
||||
"description": "Single Line Trace by Object Type"
|
||||
},
|
||||
"Unreal Linetrace Single Profile": {
|
||||
"prefix": "ulinetrace_single_profile",
|
||||
"body": "GetWorld()->LineTraceSingleByProfile(${1:Hit}, ${2:Start}, ${3:End}, \"${4:ProfileName}\", ${5:TraceParams});",
|
||||
"description": "Single Line Trace by Profile"
|
||||
},
|
||||
"Unreal Linetrace Multi Channel": {
|
||||
"prefix": "ulinetrace_multi_channel",
|
||||
"body": "GetWorld()->LineTraceMultiByChannel(${1:HitsArray}, ${2:Start}, ${3:End}, ${4|ECC_Visibility,ECC_Camera,ECC_GameTraceChannel1|}, ${5:TraceParams});",
|
||||
"description": "Multi Line Trace by Channel"
|
||||
},
|
||||
"Unreal Linetrace Multi Object": {
|
||||
"prefix": "ulinetrace_multi_object",
|
||||
"body": "GetWorld()->LineTraceMultiByObjectType(${1:HitsArray}, ${2:Start}, ${3:End}, ${4:ObjectQueryParams}, ${5:TraceParams});",
|
||||
"description": "Single Line Trace by Object Type"
|
||||
},
|
||||
"Unreal Linetrace Multi Profile": {
|
||||
"prefix": "ulinetrace_multi_profile",
|
||||
"body": "GetWorld()->LineTraceMultiByProfile(${1:HitsArray}, ${2:Start}, ${3:End}, \"${4:ProfileName}\", ${5:TraceParams});",
|
||||
"description": "Single Line Trace by Profile"
|
||||
},
|
||||
"Unreal Sweep Single Channel": {
|
||||
"prefix": "usweep_single_channel",
|
||||
"body": "GetWorld()->SweepSingleByChannel(${1:Hit}, ${2:Start}, ${3:End}, ${4:FQuat::Identity}, ${5|ECC_Visibility,ECC_Camera,ECC_GameTraceChannel1|}, FCollisionShape::${6:MakeSphere(Radius)}, ${7:TraceParams});",
|
||||
"description": "Trace a Shape against the world and return first blocking hit using Collision Channel."
|
||||
},
|
||||
"Unreal Sweep Single Object": {
|
||||
"prefix": "usweep_single_object",
|
||||
"body": "GetWorld()->SweepSingleByObjectType(${1:Hit}, ${2:Start}, ${3:End}, ${4:FQuat::Identity}, ${5:ObjectQueryParams}, FCollisionShape::${6:MakeSphere(Radius)}, ${7:TraceParams});",
|
||||
"description": "Trace a Shape against the world and return first blocking hit using Object Type."
|
||||
},
|
||||
"Unreal Sweep Single Profile": {
|
||||
"prefix": "usweep_single_profile",
|
||||
"body": "GetWorld()->SweepSingleByProfile(${1:Hit}, ${2:Start}, ${3:End}, ${4:FQuat::Identity}, \"${5:ProfileName}\", FCollisionShape::${6:MakeSphere(Radius)}, ${7:TraceParams});",
|
||||
"description": "Trace a Shape against the world and return first blocking hit using Collision Profile."
|
||||
},
|
||||
"Unreal Sweep Multi Channel": {
|
||||
"prefix": "usweep_multi_channel",
|
||||
"body": "GetWorld()->SweepMultiByChannel(${1:HitsArray}, ${2:Start}, ${3:End}, ${4:FQuat::Identity}, ${5|ECC_Visibility,ECC_Camera,ECC_GameTraceChannel1|}, FCollisionShape::${6:MakeSphere(Radius)}, ${7:TraceParams});",
|
||||
"description": "Trace a Shape against the world and return all blocking hits using Collision Channel."
|
||||
},
|
||||
"Unreal Sweep Multi Object": {
|
||||
"prefix": "usweep_multi_object",
|
||||
"body": "GetWorld()->SweepMultiByObjectType(${1:HitsArray}, ${2:Start}, ${3:End}, ${4:FQuat::Identity}, ${5:ObjectQueryParams}, FCollisionShape::${6:MakeSphere(Radius)}, ${7:TraceParams});",
|
||||
"description": "Trace a Shape against the world and return all blocking hits using Object Type."
|
||||
},
|
||||
"Unreal Sweep Multi Profile": {
|
||||
"prefix": "usweep_multi_profile",
|
||||
"body": "GetWorld()->SweepMultiByProfile(${1:HitsArray}, ${2:Start}, ${3:End}, ${4:FQuat::Identity}, \"${5:ProfileName}\", FCollisionShape::${6:MakeSphere(Radius)}, ${7:TraceParams});",
|
||||
"description": "Trace a Shape against the world and return all blocking hits using Collision Profile."
|
||||
},
|
||||
"Unreal Overlap Multi Channel": {
|
||||
"prefix": "uoverlap_multi_channel",
|
||||
"body": "GetWorld()->OverlapMultiByChannel(${1:OverlapsArray}, ${2:Location}, ${3:FQuat::Identity}, ${4|ECC_Visibility,ECC_Camera,ECC_GameTraceChannel1|}, FCollisionShape::${5:MakeSphere(Radius)}, ${6:TraceParams});",
|
||||
"description": "Trace shape against world and return all overlapping actors using Collision Channel"
|
||||
},
|
||||
"Unreal Overlap Multi Object": {
|
||||
"prefix": "uoverlap_multi_object",
|
||||
"body": "GetWorld()->OverlapMultiByObjectType(${1:OverlapsArray}, ${2:Location}, ${3:FQuat::Identity}, ${4:ObjectQueryParams}, FCollisionShape::${5:MakeSphere(Radius)}, ${6:TraceParams});",
|
||||
"description": "Trace shape against world and return all overlapping actors using Collision Channel"
|
||||
},
|
||||
"Unreal Overlap Multi Profile": {
|
||||
"prefix": "uoverlap_multi_profile",
|
||||
"body": "GetWorld()->OverlapMultiByProfile(${1:OverlapsArray}, ${2:Location}, ${3:FQuat::Identity}, \"${4:ProfileName}\", FCollisionShape::${5:MakeSphere(Radius)}, ${6:TraceParams});",
|
||||
"description": "Trace shape against world and return all overlapping actors using Collision Channel"
|
||||
},
|
||||
"Unreal SpawnActor": {
|
||||
"prefix": "uspawn_actor",
|
||||
"body": "${1:AClass}* ${2:ActorName} = GetWorld()->SpawnActor<${1:AClass}>(${3:UClass}, ${4:Location}, ${5:Rotation});",
|
||||
"description": "Spawn Actor"
|
||||
},
|
||||
"Unreal SpawnActorDeferred": {
|
||||
"prefix": "uspawn_actor_deferred",
|
||||
"body": [
|
||||
"${1:AClass}* ${2:ActorName} = GetWorld()->SpawnActorDeferred<${1:AClass}>(${3:UClass}, ${4:ActorTransform}, ${5:Owner}, ${6:Instigator}, ESpawnActorCollisionHandlingMethod::${7|AlwaysSpawn,AdjustIfPossibleButAlwaysSpawn,AdjustIfPossibleButDontSpawnIfColliding,DontSpawnIfColliding|});",
|
||||
"${8:/* INITIALIZATION */}",
|
||||
"UGameplayStatics::FinishSpawningActor(${2:ActorName}, ${4:ActorTransform});"
|
||||
],
|
||||
"description": "Spawn Actor Deferred"
|
||||
},
|
||||
"Unreal SetTimer": {
|
||||
"prefix": "utimer_set",
|
||||
"body": "GetWorld()->GetTimerManager().SetTimer(${1:TimerHandle}, this, &${2:Class::Function}, ${3:DelayTime}, ${4:bLoop});",
|
||||
"description": "Set a Timer/Delay"
|
||||
},
|
||||
"Unreal InvalidateTimer": {
|
||||
"prefix": "utimer_invalidate",
|
||||
"body": "${1:TimerHandle}.Invalidate();",
|
||||
"description": "Invalidate a Timer Handle"
|
||||
},
|
||||
"Unreal ClearTimer": {
|
||||
"prefix": "utimer_clear",
|
||||
"body": "GetWorld()->GetTimerManager().ClearTimer(${1:TimerHandle});",
|
||||
"description": "Clear a TimerHandle"
|
||||
},
|
||||
"Unreal InputAxis": {
|
||||
"prefix": "ubindaxis",
|
||||
"body": "InputComponent->BindAxis(\"${1:InputAxis}\", this, &${2:Class::Function});",
|
||||
"description": "Bind an InputAxis"
|
||||
},
|
||||
"Unreal InputAction": {
|
||||
"prefix": "ubindaction",
|
||||
"body": "InputComponent->BindAction(\"${1:Button}\", IE_${2|Pressed,Released,Repeat,DoubleClick,Axis|}, this, &${3:Class::Function});",
|
||||
"description": "Bind an InputAction"
|
||||
},
|
||||
"Unreal SpawnDecalLocation": {
|
||||
"prefix": "uspawn_decal_location",
|
||||
"body": "UDecalComponent* ${1:MyDecal} = UGameplayStatics::SpawnDecalAtLocation(GetWorld(), ${2:DecalMaterialInterface}, ${3:Size}, ${4:Location}, ${5:Rotation}, ${6:lifeSpan});",
|
||||
"description": "Spawn Decal at Location"
|
||||
},
|
||||
"Unreal SpawnDecalAttached": {
|
||||
"prefix": "uspawn_decal_attached",
|
||||
"body": "UDecalComponent* ${1:MyDecal} = UGameplayStatics::SpawnDecalAttached(GetWorld(), ${2:DecalMaterialInterface}, ${3:Size}, ${4:AttachToComponent}, ${5:AttachPointName}, ${6:Location}, ${7:Rotation}, EAttachLocation::${8|KeepRelativeOffset,KeepWorldPosition,SnapToTarget,SnapToTargetIncludingScale|}, ${9:lifeSpan});",
|
||||
"description": "Spawn Decal at Location"
|
||||
},
|
||||
"Unreal SpawnEmitterLocation": {
|
||||
"prefix": ["uspawn_emitter_location", "uspawn_particles_location"],
|
||||
"body": "UParticleSystemComponent* ${1:MyParticles} = UGameplayStatics::SpawnEmitterAtLocation(GetWorld(), ${2:ParticleSystem}, ${3:Location}, ${4:Rotation}, ${5:Scale}, ${6:bAutoDestroy});",
|
||||
"description": "Spawn Particle System at Location"
|
||||
},
|
||||
"Unreal SpawnEmitterAttached": {
|
||||
"prefix": ["uspawn_emitter_attached", "uspawn_particles_attached"],
|
||||
"body": "UParticleSystemComponent* ${1:MyParticles} = UGameplayStatics::SpawnEmitterAttached(${2:ParticleSystem}, ${3:AttachToComponent}, ${4:AttachPointName}, ${5:Location}, ${6:Rotation}, ${7:Scale}, EAttachLocation::${8|KeepRelativeOffset,KeepWorldPosition,SnapToTarget,SnapToTargetIncludingScale|}, ${9:bAutoDestroy});",
|
||||
"description": "Spawn Emitter Attached"
|
||||
},
|
||||
"Unreal SpawnDialog2D": {
|
||||
"prefix": ["uspawn_dialog_2d", "uspawn_dialogue_2d"],
|
||||
"body": "UAudioComponent* ${1:MyDialog} = UGameplayStatics::SpawnDialogue2D(GetWorld(), ${2:DialogWave}, ${3:DialogContext}, ${4:VolumeMultiplier}, ${5:PitchMultiplier}, ${6:StartTime}, ${7:bAutoDestroy});",
|
||||
"description": "Spawn Dialog 2D"
|
||||
},
|
||||
"Unreal SpawnDialogLocation": {
|
||||
"prefix": ["uspawn_dialog_location", "uspawn_dialogue_location"],
|
||||
"body": "UAudioComponent* ${1:MyDialog} = UGameplayStatics::SpawnDialogueAtLocation(GetWorld(), ${2:DialogWave}, ${3:DialogContext}, ${4:Location}, ${5:Rotation}, ${6:VolumeMultiplier}, ${7:PitchMultiplier}, ${8:StartTime}, ${9:Attenuation}, ${10:bAutoDestroy});",
|
||||
"description": "Spawn Dialog At Location"
|
||||
},
|
||||
"Unreal SpawnDialogAttached": {
|
||||
"prefix": ["uspawn_dialog_attached", "uspawn_dialogue_attached"],
|
||||
"body": "UAudioComponent* ${1:MyDialog} = UGameplayStatics::SpawnDialogueAttached(GetWorld(), ${2:DialogWave}, ${3:DialogContext}, ${4:AttachToComponent}, ${5:AttachPointName}, ${6:Location}, ${7:Rotation}, EAttachLocation::${8|KeepRelativeOffset,KeepWorldPosition,SnapToTarget,SnapToTargetIncludingScale|}, ${9:bStopWhenAttachedToDestroyed}, ${10:VolumeMultiplier}, ${11:PitchMultiplier}, ${12:StartTime}, ${13:Attenuation}, ${14:bAutoDestroy});",
|
||||
"description": "Spawn Dialog Attached"
|
||||
},
|
||||
"Unreal SpawnSound2D": {
|
||||
"prefix": "uspawn_sound_2d",
|
||||
"body": "UAudioComponent* ${1:MySound} = UGameplayStatics::SpawnSound2D(GetWorld(), ${2:SoundBase}, ${3:VolumeMultiplier}, ${4:PitchMultiplier}, ${5:StartTime}, ${6:Concurrency}, ${7:bPersistentAcrossLevelTransition}, ${8:bAutoDestroy});",
|
||||
"description": "Spawn Sound 2D"
|
||||
},
|
||||
"Unreal SpawnSoundLocation": {
|
||||
"prefix": "uspawn_sound_location",
|
||||
"body": "UAudioComponent* ${1:MySound} = UGameplayStatics::SpawnSoundAtLocation(GetWorld(), ${2:SoundBase}, ${3:Location}, ${4:Rotation}, ${5:VolumeMultiplier}, ${6:PitchMultiplier}, ${7:StartTime}, ${8:Attenuation}, ${9:Concurrency}, ${10:bAutoDestroy});",
|
||||
"description": "Spawn Sound At Location"
|
||||
},
|
||||
"Unreal SpawnSoundAttached": {
|
||||
"prefix": "uspawn_sound_attached",
|
||||
"body": "UAudioComponent* ${1:MySound} = UGameplayStatics::SpawnSoundAttached(${2:SoundBase}, ${3:AttachToComponent}, ${4:AttachPointName}, ${5:Location}, ${6:Rotation}, EAttachLocation::${7|KeepRelativeOffset,KeepWorldPosition,SnapToTarget,SnapToTargetIncludingScale|}, ${8:bStopWhenAttachedToDestroyed}, ${9:VolumeMultipler}, ${10:PitchMultiplier}, ${11:StartTime}, ${12:Attenuation}, ${13:Concurrency}, ${14:bAutoDestroy});",
|
||||
"description": "Spawn Sound Attached"
|
||||
},
|
||||
"Unreal PlayDialog2D": {
|
||||
"prefix": ["uplay_dialog_2d", "uplay_dialogue_2d"],
|
||||
"body": "UGameplayStatics::PlayDialogue2D(GetWorld(), ${1:DialogWave}, ${2:DialogContext}, ${3:VolumeMultiplier}, ${4:PitchMultiplier}, ${5:StartTime});",
|
||||
"description": "Play Dialog 2D"
|
||||
},
|
||||
"Unreal PlayDialogLocation": {
|
||||
"prefix": ["uplay_dialog_location", "uplay_dialogue_location"],
|
||||
"body": "UGameplayStatics::PlayDialogueAtLocation(GetWorld(), ${1:DialogWave}, ${2:DialogContext}, ${3:Location}, ${4:Rotation}, ${5:VolumeMultiplier}, ${6:PitchMultiplier}, ${7:StartTime}, ${8:Attenuation});",
|
||||
"description": "Play Dialog at Location"
|
||||
},
|
||||
"Unreal PlaySound2D": {
|
||||
"prefix": "uplay_sound_2d",
|
||||
"body": "UGameplayStatics::PlaySound2D(GetWorld(), ${1:SoundBase}, ${2:VolumeMultiplier}, ${3:PitchMultiplier}, ${4:StartTime}, ${5:Concurrency}, ${6:Owner});",
|
||||
"description": "Play Sound 2D"
|
||||
},
|
||||
"Unreal PlaySoundLocation": {
|
||||
"prefix": "uplay_sound_location",
|
||||
"body": "UGameplayStatics::PlaySoundAtLocation(GetWorld(), ${1:SoundBase}, ${2:Location}, ${3:Rotation}, ${4:VolumeMultiplier}, ${5:PitchMultiplier}, ${6:StartTime}, ${7:Attenuation}, ${8:Concurrency}, ${9:Owner});",
|
||||
"description": "Play Sound at Location"
|
||||
},
|
||||
"Unreal GetAllActorsOfClass": {
|
||||
"prefix": "ugetallactorsofclass",
|
||||
"body": "UGameplayStatics::GetAllActorsOfClass(GetWorld(), ${1:AClass}::StaticClass(), ${2:ActorArray});",
|
||||
"description": "Get all Actors of one class from the level"
|
||||
},
|
||||
"Unreal FindRow": {
|
||||
"prefix": "utable_findrow",
|
||||
"body": "${1:FStruct}* ${2:MyStruct} = ${3:DataTable}->FindRow<${1:FStruct}>(\"${4:RowName}\", \"${5:ContextString}\", ${6:bWarnIfMissing});",
|
||||
"description": "Get a row from a datatable, must use same struct as Table itself."
|
||||
},
|
||||
"Unreal Create SaveGame": {
|
||||
"prefix": "usavegame_create",
|
||||
"body": "${1:UMySaveGame}* ${2:Instance} = Cast<${1:UMySaveGame}>(UGameplayStatics::CreateSaveGameObject(${1:UMySaveGame}::StaticClass()));",
|
||||
"description": "Create Instance of a SaveGame Class to save to or load from."
|
||||
},
|
||||
"Unreal Save SaveGame": {
|
||||
"prefix": "usavegame_save",
|
||||
"body": "UGameplayStatics::SaveGameToSlot(${1:Instance}, ${2:SaveSlotName}, ${3:UserIndex});",
|
||||
"description": "Save a SaveGame Instance to disk."
|
||||
},
|
||||
"Unreal Load SaveGame": {
|
||||
"prefix": "usavegame_load",
|
||||
"body": "${1:UMySaveGame}* ${2:Instance} = Cast<${1:UMySaveGame}>(UGameplayStatics::LoadGameFromSlot(${3:SaveSlotName}, ${4:UserIndex}));",
|
||||
"description": "Load a SaveGame from disk."
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,422 @@
|
||||
{
|
||||
"template": {
|
||||
"prefix": "template",
|
||||
"body": [
|
||||
"<template>",
|
||||
"\t<${1:div}$2>",
|
||||
"\t\t$0",
|
||||
"\t</${1:div}>",
|
||||
"</template>"
|
||||
],
|
||||
"description": "template element"
|
||||
},
|
||||
"v-text": {
|
||||
"prefix": "vText",
|
||||
"body": [
|
||||
"v-text=\"${1:msg}\""
|
||||
],
|
||||
"description": "Expects: string. Updates the element’s textContent."
|
||||
},
|
||||
"v-html": {
|
||||
"prefix": "vHtml",
|
||||
"body": [
|
||||
"v-html=\"${1:html}\""
|
||||
],
|
||||
"description": "Expects: string. Updates the element’s innerHTML."
|
||||
},
|
||||
"v-show": {
|
||||
"prefix": "vShow",
|
||||
"body": [
|
||||
"v-show=\"${1:condition}\""
|
||||
],
|
||||
"description": "Expects: any"
|
||||
},
|
||||
"v-if": {
|
||||
"prefix": "vIf",
|
||||
"body": [
|
||||
"v-if=\"${1:condition}\""
|
||||
],
|
||||
"description": "Expects: any"
|
||||
},
|
||||
"v-else": {
|
||||
"prefix": "vElse",
|
||||
"body": [
|
||||
"v-else"
|
||||
],
|
||||
"description": "Does not expect expression. previous sibling element must have v-if or v-else-if."
|
||||
},
|
||||
"v-else-if": {
|
||||
"prefix": "vElseIf",
|
||||
"body": [
|
||||
"v-else-if=\"${1:condition}\""
|
||||
],
|
||||
"description": "Expects: any. previous sibling element must have v-if or v-else-if."
|
||||
},
|
||||
"v-for-without-key": {
|
||||
"prefix": "vForWithoutKey",
|
||||
"body": [
|
||||
"v-for=\"${1:item} in ${2:items}\""
|
||||
],
|
||||
"description": "Expects: Array | Object | number | string"
|
||||
},
|
||||
"v-for": {
|
||||
"prefix": "vFor",
|
||||
"body": [
|
||||
"v-for=\"(${1:item}, ${2:index}) in ${3:items}\" :key=\"${4:index}\""
|
||||
],
|
||||
"description": "Expects: Array | Object | number | string"
|
||||
},
|
||||
"v-on": {
|
||||
"prefix": "vOn",
|
||||
"body": [
|
||||
"v-on:${1:event}=\"${2:handle}\""
|
||||
],
|
||||
"description": "Expects: Function | Inline Statement"
|
||||
},
|
||||
"v-on-shortcut": {
|
||||
"prefix": "@",
|
||||
"body": [
|
||||
"@${1:event}=\"${2:handle}\""
|
||||
],
|
||||
"description": "v-on shortcut from vue 3"
|
||||
},
|
||||
"v-bind": {
|
||||
"prefix": "vBind",
|
||||
"body": [
|
||||
"v-bind$1=\"${2}\""
|
||||
],
|
||||
"description": "Expects: any (with argument) | Object (without argument)"
|
||||
},
|
||||
"v-model": {
|
||||
"prefix": "vModel",
|
||||
"body": [
|
||||
"v-model=\"${1:something}\""
|
||||
],
|
||||
"description": "Expects: varies based on value of form inputs element or output of components"
|
||||
},
|
||||
"v-slot": {
|
||||
"prefix": "vSlot",
|
||||
"body": [
|
||||
"v-slot$1=\"${2}\""
|
||||
],
|
||||
"description": "Expects: JavaScript expression that is valid in a function argument position (supports destructuring in supported environments). Optional - only needed if expecting props to be passed to the slot."
|
||||
},
|
||||
"v-pre": {
|
||||
"prefix": "vPre",
|
||||
"body": [
|
||||
"v-pre"
|
||||
],
|
||||
"description": "Does not expect expression"
|
||||
},
|
||||
"v-cloak": {
|
||||
"prefix": "vCloak",
|
||||
"body": [
|
||||
"v-cloak"
|
||||
],
|
||||
"description": "Does not expect expression"
|
||||
},
|
||||
"v-once": {
|
||||
"prefix": "vOnce",
|
||||
"body": [
|
||||
"v-once"
|
||||
],
|
||||
"description": "Does not expect expression"
|
||||
},
|
||||
"key": {
|
||||
"prefix": "key",
|
||||
"body": [
|
||||
":key=\"${1:key}\""
|
||||
],
|
||||
"description": "Expects: string. Children of the same common parent must have unique keys. Duplicate keys will cause render errors."
|
||||
},
|
||||
"ref": {
|
||||
"prefix": "ref",
|
||||
"body": [
|
||||
"ref=\"${1:reference}\"$0"
|
||||
],
|
||||
"description": "Expects: string. ref is used to register a reference to an element or a child component. The reference will be registered under the parent component’s $refs object. If used on a plain DOM element, the reference will be that element; if used on a child component, the reference will be component instance."
|
||||
},
|
||||
"slotA": {
|
||||
"prefix": "slotA",
|
||||
"body": [
|
||||
"slot=\"$1\"$0"
|
||||
],
|
||||
"description": "slot=''. Expects: string. Used on content inserted into child components to indicate which named slot the content belongs to."
|
||||
},
|
||||
"slotE": {
|
||||
"prefix": "slotE",
|
||||
"body": [
|
||||
"<slot$1>$2</slot>$0"
|
||||
],
|
||||
"description": "<slot></slot>. Expects: string. Used on content inserted into child components to indicate which named slot the content belongs to."
|
||||
},
|
||||
"slotScope": {
|
||||
"prefix": "slotScope",
|
||||
"body": [
|
||||
"slot-scope=\"$1\"$0"
|
||||
],
|
||||
"description": "Used to denote an element or component as a scoped slot. The attribute’s value should be a valid JavaScript expression that can appear in the argument position of a function signature. This means in supported environments you can also use ES2015 destructuring in the expression. Serves as a replacement for scope in 2.5.0+."
|
||||
},
|
||||
"scope": {
|
||||
"prefix": "scope",
|
||||
"body": [
|
||||
"scope=\"${1:this api replaced by slot-scope in 2.5.0+}\"$0"
|
||||
],
|
||||
"description": "Used to denote a <template> element as a scoped slot, which is replaced by `slot-scope` in 2.5.0+."
|
||||
},
|
||||
"component": {
|
||||
"prefix": "component",
|
||||
"body": [
|
||||
"<component :is=\"${1:componentId}\"></component>$0"
|
||||
],
|
||||
"description": "component element"
|
||||
},
|
||||
"keep-alive": {
|
||||
"prefix": "keepAlive",
|
||||
"body": [
|
||||
"<keep-alive$1>",
|
||||
"$2",
|
||||
"</keep-alive>$0"
|
||||
],
|
||||
"description": "keep-alive element"
|
||||
},
|
||||
"transition": {
|
||||
"prefix": "transition",
|
||||
"body": [
|
||||
"<transition$1>",
|
||||
"$2",
|
||||
"</transition>$0"
|
||||
],
|
||||
"description": "transition element"
|
||||
},
|
||||
"transition-group": {
|
||||
"prefix": "transitionGroup",
|
||||
"body": [
|
||||
"<transition-group$1>",
|
||||
"$2",
|
||||
"</transition-group>"
|
||||
],
|
||||
"description": "transition-group element"
|
||||
},
|
||||
"enter-class": {
|
||||
"prefix": "enterClass",
|
||||
"body": [
|
||||
"enter-class=\"$1\"$0"
|
||||
],
|
||||
"description": "enter-class=''. Expects: string."
|
||||
},
|
||||
"leave-class": {
|
||||
"prefix": "leaveClass",
|
||||
"body": [
|
||||
"leave-class=\"$1\"$0"
|
||||
],
|
||||
"description": "leave-class=''. Expects: string."
|
||||
},
|
||||
"appear-class": {
|
||||
"prefix": "appearClass",
|
||||
"body": [
|
||||
"appear-class=\"$1\"$0"
|
||||
],
|
||||
"description": "appear-class=''. Expects: string."
|
||||
},
|
||||
"enter-to-class": {
|
||||
"prefix": "enterToClass",
|
||||
"body": [
|
||||
"enter-to-class=\"$1\"$0"
|
||||
],
|
||||
"description": "enter-to-class=''. Expects: string."
|
||||
},
|
||||
"leave-to-class": {
|
||||
"prefix": "leaveToClass",
|
||||
"body": [
|
||||
"leave-to-class=\"$1\"$0"
|
||||
],
|
||||
"description": "leave-to-class=''. Expects: string."
|
||||
},
|
||||
"appear-to-class": {
|
||||
"prefix": "appearToClass",
|
||||
"body": [
|
||||
"appear-to-class=\"$1\"$0"
|
||||
],
|
||||
"description": "appear-to-class=''. Expects: string."
|
||||
},
|
||||
"enter-active-class": {
|
||||
"prefix": "enterActiveClass",
|
||||
"body": [
|
||||
"enter-active-class=\"$1\"$0"
|
||||
],
|
||||
"description": "enter-active-class=''. Expects: string."
|
||||
},
|
||||
"leave-active-class": {
|
||||
"prefix": "leaveActiveClass",
|
||||
"body": [
|
||||
"leave-active-class=\"$1\"$0"
|
||||
],
|
||||
"description": "leave-active-class=''. Expects: string."
|
||||
},
|
||||
"appear-active-class": {
|
||||
"prefix": "appearActiveClass",
|
||||
"body": [
|
||||
"appear-active-class=\"$1\"$0"
|
||||
],
|
||||
"description": "appear-active-class=''. Expects: string."
|
||||
},
|
||||
"before-enter": {
|
||||
"prefix": "beforeEnterEvent",
|
||||
"body": [
|
||||
"@before-enter=\"$1\"$0"
|
||||
],
|
||||
"description": "@before-enter=''"
|
||||
},
|
||||
"before-leave": {
|
||||
"prefix": "beforeLeaveEvent",
|
||||
"body": [
|
||||
"@before-leave=\"$1\"$0"
|
||||
],
|
||||
"description": "@before-leave=''"
|
||||
},
|
||||
"before-appear": {
|
||||
"prefix": "beforeAppearEvent",
|
||||
"body": [
|
||||
"@before-appear=\"$1\"$0"
|
||||
],
|
||||
"description": "@before-appear=''"
|
||||
},
|
||||
"enter": {
|
||||
"prefix": "enterEvent",
|
||||
"body": [
|
||||
"@enter=\"$1\"$0"
|
||||
],
|
||||
"description": "@enter=''"
|
||||
},
|
||||
"leave": {
|
||||
"prefix": "leaveEvent",
|
||||
"body": [
|
||||
"@leave=\"$1\"$0"
|
||||
],
|
||||
"description": "@leave=''"
|
||||
},
|
||||
"appear": {
|
||||
"prefix": "appearEvent",
|
||||
"body": [
|
||||
"@appear=\"$1\"$0"
|
||||
],
|
||||
"description": "@appear=''"
|
||||
},
|
||||
"after-enter": {
|
||||
"prefix": "afterEnterEvent",
|
||||
"body": [
|
||||
"@after-enter=\"$1\"$0"
|
||||
],
|
||||
"description": "@after-enter=''"
|
||||
},
|
||||
"after-leave": {
|
||||
"prefix": "afterLeaveEvent",
|
||||
"body": [
|
||||
"@after-leave=\"$1\"$0"
|
||||
],
|
||||
"description": "@after-leave=''"
|
||||
},
|
||||
"after-appear": {
|
||||
"prefix": "afterAppearEvent",
|
||||
"body": [
|
||||
"@after-appear=\"$1\"$0"
|
||||
],
|
||||
"description": "@after-appear=''"
|
||||
},
|
||||
"enter-cancelled": {
|
||||
"prefix": "enterCancelledEvent",
|
||||
"body": [
|
||||
"@enter-cancelled=\"$1\"$0"
|
||||
],
|
||||
"description": "@enter-cancelled=''"
|
||||
},
|
||||
"leave-cancelled": {
|
||||
"prefix": "leaveCancelledEvent",
|
||||
"body": [
|
||||
"@leave-cancelled=\"$1\"$0"
|
||||
],
|
||||
"description": "@leave-cancelled='' (v-show only)"
|
||||
},
|
||||
"appear-cancelled": {
|
||||
"prefix": "appearCancelledEvent",
|
||||
"body": [
|
||||
"@appear-cancelled=\"$1\"$0"
|
||||
],
|
||||
"description": "@appear-cancelled=''"
|
||||
},
|
||||
"routerLink": {
|
||||
"prefix": "routerLink",
|
||||
"body": [
|
||||
"<router-link $1>$2</router-link>$0"
|
||||
],
|
||||
"description": "router-link element"
|
||||
},
|
||||
"routerLinkTo": {
|
||||
"prefix": "routerLinkTo",
|
||||
"body": [
|
||||
"<router-link to=\"$1\">$2</router-link>$0"
|
||||
],
|
||||
"description": "<router-link to=''></router-link>. router-link element"
|
||||
},
|
||||
"to": {
|
||||
"prefix": "to",
|
||||
"body": [
|
||||
"to=\"$1\"$0"
|
||||
],
|
||||
"description": "to=''"
|
||||
},
|
||||
"tag": {
|
||||
"prefix": "tag",
|
||||
"body": [
|
||||
"tag=\"$1\"$0"
|
||||
],
|
||||
"description": "tag=''"
|
||||
},
|
||||
"routerView": {
|
||||
"prefix": "routerView",
|
||||
"body": [
|
||||
"<router-view>$1</router-view>$0"
|
||||
],
|
||||
"description": "router-view element"
|
||||
},
|
||||
"nuxt": {
|
||||
"prefix": "nuxt",
|
||||
"body": [
|
||||
"<nuxt/>"
|
||||
],
|
||||
"description": "This component is used only in layouts to display the page components."
|
||||
},
|
||||
"nuxtChild": {
|
||||
"prefix": "nuxtChild",
|
||||
"body": [
|
||||
"<nuxt-child $1/>$0"
|
||||
],
|
||||
"description": "This component is used for displaying the children components in a nested route."
|
||||
},
|
||||
"nuxtLink": {
|
||||
"prefix": "nuxtLink",
|
||||
"body": [
|
||||
"<nuxt-link ${1|to,:to|}=\"$2\">$0</nuxt-link>"
|
||||
],
|
||||
"description": "This component is used to provide navigations between page components."
|
||||
},
|
||||
"teleport": {
|
||||
"prefix": "teleport",
|
||||
"body": [
|
||||
"<Teleport to=\"$1\">",
|
||||
"$0",
|
||||
"</Teleport>"
|
||||
],
|
||||
"description": "<Teleport> is a built-in component that allows us to 'teleport' a part of a component's template into a DOM node that exists outside the DOM hierarchy of that component."
|
||||
},
|
||||
"suspense": {
|
||||
"prefix": "suspense",
|
||||
"body": [
|
||||
"<Suspense>",
|
||||
"$0",
|
||||
"</Suspense>"
|
||||
],
|
||||
"description": "<Suspense> will render its default slot content in memory. If any async dependencies are encountered during the process, it will enter a pending state."
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,352 @@
|
||||
{
|
||||
"v-text": {
|
||||
"prefix": "vText",
|
||||
"body": [
|
||||
"v-text='${1:msg}'"
|
||||
],
|
||||
"description": "Expects: string"
|
||||
},
|
||||
"v-html": {
|
||||
"prefix": "vHtml",
|
||||
"body": [
|
||||
"v-html='${1:html}'"
|
||||
],
|
||||
"description": "Expects: string"
|
||||
},
|
||||
"v-show": {
|
||||
"prefix": "vShow",
|
||||
"body": [
|
||||
"v-show='${1:condition}'"
|
||||
],
|
||||
"description": "Expects: any"
|
||||
},
|
||||
"v-if": {
|
||||
"prefix": "vIf",
|
||||
"body": [
|
||||
"v-if='${1:condition}'"
|
||||
],
|
||||
"description": "Expects: any"
|
||||
},
|
||||
"v-else": {
|
||||
"prefix": "vElse",
|
||||
"body": [
|
||||
"v-else"
|
||||
],
|
||||
"description": "Does not expect expression. previous sibling element must have v-if or v-else-if."
|
||||
},
|
||||
"v-else-if": {
|
||||
"prefix": "vElseIf",
|
||||
"body": [
|
||||
"v-else-if='${1:condition}'"
|
||||
],
|
||||
"description": "Expects: any. previous sibling element must have v-if or v-else-if."
|
||||
},
|
||||
"v-for-without-key": {
|
||||
"prefix": "vForWithoutKey",
|
||||
"body": [
|
||||
"v-for='${1:item} in ${2:items}'"
|
||||
],
|
||||
"description": "Expects: Array | Object | number | string"
|
||||
},
|
||||
"v-for": {
|
||||
"prefix": "vFor",
|
||||
"body": [
|
||||
"v-for='${1:item} in ${2:items}' :key='${3:item.id}'"
|
||||
],
|
||||
"description": "Expects: Array | Object | number | string"
|
||||
},
|
||||
"v-on": {
|
||||
"prefix": "vOn",
|
||||
"body": [
|
||||
"v-on:${1:event}='${2:handle}'"
|
||||
],
|
||||
"description": "Expects: Function | Inline Statement"
|
||||
},
|
||||
"v-bind": {
|
||||
"prefix": "vBind",
|
||||
"body": [
|
||||
"v-bind$1='${2}'"
|
||||
],
|
||||
"description": "Expects: any (with argument) | Object (without argument)"
|
||||
},
|
||||
"v-model": {
|
||||
"prefix": "vModel",
|
||||
"body": [
|
||||
"v-model='${1:something}'"
|
||||
],
|
||||
"description": "Expects: varies based on value of form inputs element or output of components"
|
||||
},
|
||||
"v-pre": {
|
||||
"prefix": "vPre",
|
||||
"body": [
|
||||
"v-pre"
|
||||
],
|
||||
"description": "Does not expect expression"
|
||||
},
|
||||
"v-cloak": {
|
||||
"prefix": "vCloak",
|
||||
"body": [
|
||||
"v-cloak"
|
||||
],
|
||||
"description": "Does not expect expression"
|
||||
},
|
||||
"v-once": {
|
||||
"prefix": "vOnce",
|
||||
"body": [
|
||||
"v-once"
|
||||
],
|
||||
"description": "Does not expect expression"
|
||||
},
|
||||
"key": {
|
||||
"prefix": "key",
|
||||
"body": [
|
||||
":key='${1:key}'"
|
||||
],
|
||||
"description": "Expects: string. Children of the same common parent must have unique keys. Duplicate keys will cause render errors."
|
||||
},
|
||||
"ref": {
|
||||
"prefix": "ref",
|
||||
"body": [
|
||||
"ref='${1:reference}'$0"
|
||||
],
|
||||
"description": "Expects: string. ref is used to register a reference to an element or a child component. The reference will be registered under the parent component’s $refs object. If used on a plain DOM element, the reference will be that element; if used on a child component, the reference will be component instance."
|
||||
},
|
||||
"slotA": {
|
||||
"prefix": "slotA",
|
||||
"body": [
|
||||
"slot='$1'$0"
|
||||
],
|
||||
"description": "slot=''. Expects: string. Used on content inserted into child components to indicate which named slot the content belongs to."
|
||||
},
|
||||
"slotE": {
|
||||
"prefix": "slotE",
|
||||
"body": [
|
||||
"slot"
|
||||
],
|
||||
"description": "<slot></slot>. Expects: string. Used on content inserted into child components to indicate which named slot the content belongs to."
|
||||
},
|
||||
"slotScope": {
|
||||
"prefix": "slotScope",
|
||||
"body": [
|
||||
"slot-scope='$1'$0"
|
||||
],
|
||||
"description": "Used to denote an element or component as a scoped slot. The attribute’s value should be a valid JavaScript expression that can appear in the argument position of a function signature. This means in supported environments you can also use ES2015 destructuring in the expression. Serves as a replacement for scope in 2.5.0+."
|
||||
},
|
||||
"scope": {
|
||||
"prefix": "scope",
|
||||
"body": [
|
||||
"scope='${1:this api replaced by slot-scope in 2.5.0+}'$0"
|
||||
],
|
||||
"description": "Used to denote a <template> element as a scoped slot, which is replaced by `slot-scope` in 2.5.0+."
|
||||
},
|
||||
"component": {
|
||||
"prefix": "component",
|
||||
"body": [
|
||||
"component(:is='${1:componentId}') $0"
|
||||
],
|
||||
"description": "component element"
|
||||
},
|
||||
"keep-alive": {
|
||||
"prefix": "keepAlive",
|
||||
"body": [
|
||||
"keep-alive$0"
|
||||
],
|
||||
"description": "keep-alive element"
|
||||
},
|
||||
"transition": {
|
||||
"prefix": "transition",
|
||||
"body": [
|
||||
"transition$0"
|
||||
],
|
||||
"description": "transition element"
|
||||
},
|
||||
"transition-group": {
|
||||
"prefix": "transitionGroup",
|
||||
"body": [
|
||||
"transition-group$0"
|
||||
],
|
||||
"description": "transition-group element"
|
||||
},
|
||||
"enter-class": {
|
||||
"prefix": "enterClass",
|
||||
"body": [
|
||||
"enter-class='$1'$0"
|
||||
],
|
||||
"description": "enter-class=''. Expects: string."
|
||||
},
|
||||
"leave-class": {
|
||||
"prefix": "leaveClass",
|
||||
"body": [
|
||||
"leave-class='$1'$0"
|
||||
],
|
||||
"description": "leave-class=''. Expects: string."
|
||||
},
|
||||
"appear-class": {
|
||||
"prefix": "appearClass",
|
||||
"body": [
|
||||
"appear-class='$1'$0"
|
||||
],
|
||||
"description": "appear-class=''. Expects: string."
|
||||
},
|
||||
"enter-to-class": {
|
||||
"prefix": "enterToClass",
|
||||
"body": [
|
||||
"enter-to-class='$1'$0"
|
||||
],
|
||||
"description": "enter-to-class=''. Expects: string."
|
||||
},
|
||||
"leave-to-class": {
|
||||
"prefix": "leaveToClass",
|
||||
"body": [
|
||||
"leave-to-class='$1'$0"
|
||||
],
|
||||
"description": "leave-to-class=''. Expects: string."
|
||||
},
|
||||
"appear-to-class": {
|
||||
"prefix": "appearToClass",
|
||||
"body": [
|
||||
"appear-to-class='$1'$0"
|
||||
],
|
||||
"description": "appear-to-class=''. Expects: string."
|
||||
},
|
||||
"enter-active-class": {
|
||||
"prefix": "enterActiveClass",
|
||||
"body": [
|
||||
"enter-active-class='$1'$0"
|
||||
],
|
||||
"description": "enter-active-class=''. Expects: string."
|
||||
},
|
||||
"leave-active-class": {
|
||||
"prefix": "leaveActiveClass",
|
||||
"body": [
|
||||
"leave-active-class='$1'$0"
|
||||
],
|
||||
"description": "leave-active-class=''. Expects: string."
|
||||
},
|
||||
"appear-active-class": {
|
||||
"prefix": "appearActiveClass",
|
||||
"body": [
|
||||
"appear-active-class='$1'$0"
|
||||
],
|
||||
"description": "appear-active-class=''. Expects: string."
|
||||
},
|
||||
"before-enter": {
|
||||
"prefix": "beforeEnterEvent",
|
||||
"body": [
|
||||
"@before-enter='$1'$0"
|
||||
],
|
||||
"description": "@before-enter=''"
|
||||
},
|
||||
"before-leave": {
|
||||
"prefix": "beforeLeaveEvent",
|
||||
"body": [
|
||||
"@before-leave='$1'$0"
|
||||
],
|
||||
"description": "@before-leave=''"
|
||||
},
|
||||
"before-appear": {
|
||||
"prefix": "beforeAppearEvent",
|
||||
"body": [
|
||||
"@before-appear='$1'$0"
|
||||
],
|
||||
"description": "@before-appear=''"
|
||||
},
|
||||
"enter": {
|
||||
"prefix": "enterEvent",
|
||||
"body": [
|
||||
"@enter='$1'$0"
|
||||
],
|
||||
"description": "@enter=''"
|
||||
},
|
||||
"leave": {
|
||||
"prefix": "leaveEvent",
|
||||
"body": [
|
||||
"@leave='$1'$0"
|
||||
],
|
||||
"description": "@leave=''"
|
||||
},
|
||||
"appear": {
|
||||
"prefix": "appearEvent",
|
||||
"body": [
|
||||
"@appear='$1'$0"
|
||||
],
|
||||
"description": "@appear=''"
|
||||
},
|
||||
"after-enter": {
|
||||
"prefix": "afterEnterEvent",
|
||||
"body": [
|
||||
"@after-enter='$1'$0"
|
||||
],
|
||||
"description": "@after-enter=''"
|
||||
},
|
||||
"after-leave": {
|
||||
"prefix": "afterLeaveEvent",
|
||||
"body": [
|
||||
"@after-leave='$1'$0"
|
||||
],
|
||||
"description": "@after-leave=''"
|
||||
},
|
||||
"after-appear": {
|
||||
"prefix": "afterAppearEvent",
|
||||
"body": [
|
||||
"@after-appear='$1'$0"
|
||||
],
|
||||
"description": "@after-appear=''"
|
||||
},
|
||||
"enter-cancelled": {
|
||||
"prefix": "enterCancelledEvent",
|
||||
"body": [
|
||||
"@enter-cancelled='$1'$0"
|
||||
],
|
||||
"description": "@enter-cancelled=''"
|
||||
},
|
||||
"leave-cancelled": {
|
||||
"prefix": "leaveCancelledEvent",
|
||||
"body": [
|
||||
"@leave-cancelled='$1'$0"
|
||||
],
|
||||
"description": "@leave-cancelled='' (v-show only)"
|
||||
},
|
||||
"appear-cancelled": {
|
||||
"prefix": "appearCancelledEvent",
|
||||
"body": [
|
||||
"@appear-cancelled='$1'$0"
|
||||
],
|
||||
"description": "@appear-cancelled=''"
|
||||
},
|
||||
"routerLink": {
|
||||
"prefix": "routerLink",
|
||||
"body": [
|
||||
"router-link $0"
|
||||
],
|
||||
"description": "router-link element"
|
||||
},
|
||||
"routerLinkTo": {
|
||||
"prefix": "routerLinkTo",
|
||||
"body": [
|
||||
"router-link(to='$1') $0"
|
||||
],
|
||||
"description": "router-link(to='') . router-link element"
|
||||
},
|
||||
"to": {
|
||||
"prefix": "to",
|
||||
"body": [
|
||||
"to='$1'$0"
|
||||
],
|
||||
"description": "to=''"
|
||||
},
|
||||
"tag": {
|
||||
"prefix": "tag",
|
||||
"body": [
|
||||
"tag='$1'$0"
|
||||
],
|
||||
"description": "tag=''"
|
||||
},
|
||||
"routerView": {
|
||||
"prefix": "routerView",
|
||||
"body": [
|
||||
"router-view $0"
|
||||
],
|
||||
"description": "router-view element"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,312 @@
|
||||
{
|
||||
"templateLang": {
|
||||
"prefix": "templateLang",
|
||||
"body": [
|
||||
"<template lang=\"$1\">",
|
||||
"\t<div$2>",
|
||||
"\t\t$0",
|
||||
"\t</div>",
|
||||
"</template>"
|
||||
],
|
||||
"description": "template element"
|
||||
},
|
||||
"script": {
|
||||
"prefix": "script",
|
||||
"body": ["<script>", "export default {", "\t$0", "}", "</script>"],
|
||||
"description": "script element"
|
||||
},
|
||||
"script-composition": {
|
||||
"prefix": "scriptSetup",
|
||||
"body": ["<script setup>", "\t$0", "</script>"],
|
||||
"description": "script setup vue composition api element"
|
||||
},
|
||||
"script-ts-composition": {
|
||||
"prefix": "scriptTsSetup",
|
||||
"body": ["<script setup lang=\"ts\">", "\t$0", "</script>"],
|
||||
"description": "script setup vue with lang ts composition api element"
|
||||
},
|
||||
"styleLang": {
|
||||
"prefix": "styleLang",
|
||||
"body": ["<style lang=\"$1\">", "\t$0", "</style>"],
|
||||
"description": "style element with lang attribute"
|
||||
},
|
||||
"styleScoped": {
|
||||
"prefix": "styleScoped",
|
||||
"body": ["<style scoped>", "\t$0", "</style>"],
|
||||
"description": "style scoped vue attribute"
|
||||
},
|
||||
|
||||
"Vue Single File Component": {
|
||||
"prefix": "vbase",
|
||||
"body": [
|
||||
"<template>",
|
||||
"\t<div>",
|
||||
"",
|
||||
"\t</div>",
|
||||
"</template>",
|
||||
"",
|
||||
"<script>",
|
||||
"\texport default {",
|
||||
"\t\tname:\"$TM_FILENAME_BASE\",",
|
||||
"\t\t${0}",
|
||||
"\t}",
|
||||
"</script>",
|
||||
"",
|
||||
"<style lang=\"scss\" scoped>",
|
||||
"",
|
||||
"</style>"
|
||||
],
|
||||
"description": "Base for Vue File with SCSS"
|
||||
},
|
||||
"Vue Single File Component with SASS": {
|
||||
"prefix": "vbase-sass",
|
||||
"body": [
|
||||
"<template>",
|
||||
"\t<div>",
|
||||
"",
|
||||
"\t</div>",
|
||||
"</template>",
|
||||
"",
|
||||
"<script>",
|
||||
"\texport default {",
|
||||
"\t\tname:\"$TM_FILENAME_BASE\",",
|
||||
"\t\t${0}",
|
||||
"\t}",
|
||||
"</script>",
|
||||
"",
|
||||
"<style lang=\"sass\" scoped>",
|
||||
"",
|
||||
"</style>"
|
||||
],
|
||||
"description": "Base for Vue File with PostCSS"
|
||||
},
|
||||
"Vue Single File Component with LESS": {
|
||||
"prefix": "vbase-less",
|
||||
"body": [
|
||||
"<template>",
|
||||
"\t<div>",
|
||||
"",
|
||||
"\t</div>",
|
||||
"</template>",
|
||||
"",
|
||||
"<script>",
|
||||
"\texport default {",
|
||||
"\t\tname:\"$TM_FILENAME_BASE\",",
|
||||
"\t\t${0}",
|
||||
"\t}",
|
||||
"</script>",
|
||||
"",
|
||||
"<style lang=\"less\" scoped>",
|
||||
"",
|
||||
"</style>"
|
||||
],
|
||||
"description": "Base for Vue File with PostCSS"
|
||||
},
|
||||
"Vue Single File Component with Css": {
|
||||
"prefix": "vbase-css",
|
||||
"body": [
|
||||
"<template>",
|
||||
"\t<div>",
|
||||
"",
|
||||
"\t</div>",
|
||||
"</template>",
|
||||
"",
|
||||
"<script>",
|
||||
"\texport default {",
|
||||
"\t\t${0}",
|
||||
"\t}",
|
||||
"</script>",
|
||||
"",
|
||||
"<style scoped>",
|
||||
"",
|
||||
"</style>"
|
||||
],
|
||||
"description": "Base for Vue File with CSS"
|
||||
},
|
||||
"Vue Single File Component with Typescript": {
|
||||
"prefix": "vbase-ts",
|
||||
"body": [
|
||||
"<template>",
|
||||
"\t<div>",
|
||||
"",
|
||||
"\t</div>",
|
||||
"</template>",
|
||||
"",
|
||||
"<script lang=\"ts\">",
|
||||
"\timport Vue from 'vue'",
|
||||
"",
|
||||
"\texport default Vue.extend({",
|
||||
"\t\tname:\"$TM_FILENAME_BASE\",",
|
||||
"\t\t${0}",
|
||||
"\t})",
|
||||
"</script>",
|
||||
"",
|
||||
"<style scoped>",
|
||||
"",
|
||||
"</style>"
|
||||
],
|
||||
"description": "Base for Vue File with Typescript"
|
||||
},
|
||||
"Vue Single File Component with No Style": {
|
||||
"prefix": "vbase-ns",
|
||||
"body": [
|
||||
"<template>",
|
||||
"\t<div>",
|
||||
"",
|
||||
"\t</div>",
|
||||
"</template>",
|
||||
"",
|
||||
"<script>",
|
||||
"\texport default {",
|
||||
"\t\tname:\"$TM_FILENAME_BASE\",",
|
||||
"\t\t${0}",
|
||||
"\t}",
|
||||
"</script>"
|
||||
],
|
||||
"description": "Base for Vue File with no styles"
|
||||
},
|
||||
"Vue Single File Component Composition API": {
|
||||
"prefix": "vbase-3",
|
||||
"body": [
|
||||
"<template>",
|
||||
"\t<div>",
|
||||
"",
|
||||
"\t</div>",
|
||||
"</template>",
|
||||
"",
|
||||
"<script>",
|
||||
"export default {",
|
||||
"\tsetup () {",
|
||||
"\t\t${0}",
|
||||
"",
|
||||
"\t\treturn {}",
|
||||
"\t}",
|
||||
"}",
|
||||
"</script>",
|
||||
"",
|
||||
"<style lang=\"scss\" scoped>",
|
||||
"",
|
||||
"</style>"
|
||||
],
|
||||
"description": "Base for Vue File Composition API with SCSS"
|
||||
},
|
||||
"Vue Single File Component Setup Composition API": {
|
||||
"prefix": "vbase-3-setup",
|
||||
"body": [
|
||||
"<template>",
|
||||
"\t<div>",
|
||||
"",
|
||||
"\t</div>",
|
||||
"</template>",
|
||||
"",
|
||||
"<script setup>",
|
||||
"",
|
||||
"</script>",
|
||||
"",
|
||||
"<style lang=\"scss\" scoped>",
|
||||
"",
|
||||
"</style>"
|
||||
],
|
||||
"description": "Base for Vue File Setup Composition API with SCSS"
|
||||
},
|
||||
"Vue Single File Component Composition API Reactive": {
|
||||
"prefix": "vbase-3-reactive",
|
||||
"body": [
|
||||
"<template>",
|
||||
"\t<div>",
|
||||
"",
|
||||
"\t</div>",
|
||||
"</template>",
|
||||
"",
|
||||
"<script>",
|
||||
"import { reactive, toRefs } from 'vue'",
|
||||
"",
|
||||
"export default {",
|
||||
"\tsetup () {",
|
||||
"\t\tconst state = reactive({",
|
||||
"\t\t\t${0:count}: ${1:0},",
|
||||
"\t\t})",
|
||||
"\t",
|
||||
"\t\treturn {",
|
||||
"\t\t\t...toRefs(state),",
|
||||
"\t\t}",
|
||||
"\t}",
|
||||
"}",
|
||||
"</script>",
|
||||
"",
|
||||
"<style lang=\"scss\" scoped>",
|
||||
"",
|
||||
"</style>"
|
||||
],
|
||||
"description": "Base for Vue File Composition API with SCSS"
|
||||
},
|
||||
"Vue Single File Component Composition API with Typescript": {
|
||||
"prefix": "vbase-3-ts",
|
||||
"body": [
|
||||
"<template>",
|
||||
"\t<div>",
|
||||
"",
|
||||
"\t</div>",
|
||||
"</template>",
|
||||
"",
|
||||
"<script lang=\"ts\">",
|
||||
"import { defineComponent } from 'vue'",
|
||||
"",
|
||||
"export default defineComponent({",
|
||||
"\tsetup () {",
|
||||
"\t\t${0}\n",
|
||||
"\t\treturn {}",
|
||||
"\t}",
|
||||
"})",
|
||||
"</script>",
|
||||
"",
|
||||
"<style scoped>",
|
||||
"",
|
||||
"</style>"
|
||||
],
|
||||
"description": "Base for Vue File Composition API - Typescript"
|
||||
},
|
||||
"Vue Single File Component Setup Composition API with Typescript": {
|
||||
"prefix": "vbase-3-ts-setup",
|
||||
"body": [
|
||||
"<template>",
|
||||
"\t<div>",
|
||||
"",
|
||||
"\t</div>",
|
||||
"</template>",
|
||||
"",
|
||||
"<script setup lang=\"ts\">",
|
||||
"",
|
||||
"</script>",
|
||||
"",
|
||||
"<style scoped>",
|
||||
"",
|
||||
"</style>"
|
||||
],
|
||||
"description": "Base for Vue File Setup Composition API - Typescript"
|
||||
},
|
||||
"Vue Single File Component with Class based Typescript format": {
|
||||
"prefix": "vbase-ts-class",
|
||||
"body": [
|
||||
"<template>",
|
||||
"\t<div>",
|
||||
"",
|
||||
"\t</div>",
|
||||
"</template>",
|
||||
"",
|
||||
"<script lang=\"ts\">",
|
||||
"\timport { Component, Vue } from 'vue-property-decorator';",
|
||||
"",
|
||||
"\t@Component",
|
||||
"\texport default class $TM_FILENAME_BASE extends Vue {",
|
||||
"\t\t",
|
||||
"\t}",
|
||||
"</script>",
|
||||
"",
|
||||
"<style scoped>",
|
||||
"",
|
||||
"</style>"
|
||||
],
|
||||
"description": "Base for Vue File with Class based Typescript format"
|
||||
}
|
||||
}
|
||||
126
dot_vim/plugged/friendly-snippets/snippets/fsh.json
Normal file
126
dot_vim/plugged/friendly-snippets/snippets/fsh.json
Normal file
@@ -0,0 +1,126 @@
|
||||
{
|
||||
"FSH Profile": {
|
||||
"prefix": ["pro", "Pro"],
|
||||
"body": [
|
||||
"Profile: $1",
|
||||
"Parent: $2",
|
||||
"Id: ${3:${1/(([A-Z]*)[_]([A-Z]*))|(([A-Z]*[a-z0-9]+)([A-Z]+))|(([A-Z]+)([A-Z0-9])([a-z]))/${2:/downcase}${5:/downcase}${8:/downcase}-${3:/downcase}${6:/downcase}${9:/downcase}$10/g}}",
|
||||
"Title: \"${4:${1/[_]|(([a-z0-9])([A-Z]))|(([A-Z])([A-Z0-9])([a-z]))/$2$5 $3$6$7/g}}\"",
|
||||
"Description: \"$5\"",
|
||||
"* $0"
|
||||
],
|
||||
"description": "Create a FSH Profile"
|
||||
},
|
||||
"FSH Extension": {
|
||||
"prefix": ["ext", "Ext"],
|
||||
"body": [
|
||||
"Extension: $1",
|
||||
"Id: ${2:${1/(([A-Z]*)[_]([A-Z]*))|(([A-Z]*[a-z0-9]+)([A-Z]+))|(([A-Z]+)([A-Z0-9])([a-z]))/${2:/downcase}${5:/downcase}${8:/downcase}-${3:/downcase}${6:/downcase}${9:/downcase}$10/g}}",
|
||||
"Title: \"${3:${1/[_]|(([a-z0-9])([A-Z]))|(([A-Z])([A-Z0-9])([a-z]))/$2$5 $3$6$7/g}}\"",
|
||||
"Description: \"$4\"",
|
||||
"* $0"
|
||||
],
|
||||
"description": "Create a FSH Extension"
|
||||
},
|
||||
"FSH Logical": {
|
||||
"prefix": ["log", "Log"],
|
||||
"body": [
|
||||
"Logical: $1",
|
||||
"Parent: ${2:Base}",
|
||||
"Id: ${3:$1}",
|
||||
"Title: \"${4:${1/[_]|(([a-z0-9])([A-Z]))|(([A-Z])([A-Z0-9])([a-z]))/$2$5 $3$6$7/g}}\"",
|
||||
"Description: \"$5\"",
|
||||
"* $0"
|
||||
],
|
||||
"description": "Create a FSH Resource"
|
||||
},
|
||||
"FSH Resource": {
|
||||
"prefix": ["res", "Res"],
|
||||
"body": [
|
||||
"Resource: $1",
|
||||
"Parent: ${2|DomainResource,Resource|}",
|
||||
"Id: ${3:$1}",
|
||||
"Title: \"${4:${1/[_]|(([a-z0-9])([A-Z]))|(([A-Z])([A-Z0-9])([a-z]))/$2$5 $3$6$7/g}}\"",
|
||||
"Description: \"$5\"",
|
||||
"* $0"
|
||||
],
|
||||
"description": "Create a FSH Resource"
|
||||
},
|
||||
"FSH Value Set": {
|
||||
"prefix": ["vs", "VS", "val", "Val"],
|
||||
"body": [
|
||||
"ValueSet: $1",
|
||||
"Id: ${2:${1/(([A-Z]*)[_]([A-Z]*))|(([A-Z]*[a-z0-9]+)([A-Z]+))|(([A-Z]+)([A-Z0-9])([a-z]))/${2:/downcase}${5:/downcase}${8:/downcase}-${3:/downcase}${6:/downcase}${9:/downcase}$10/g}}",
|
||||
"Title: \"${3:${1/[_]|(([a-z0-9])([A-Z]))|(([A-Z])([A-Z0-9])([a-z]))/$2$5 $3$6$7/g}}\"",
|
||||
"Description: \"$4\"",
|
||||
"* $0"
|
||||
],
|
||||
"description": "Create a FSH ValueSet"
|
||||
},
|
||||
"FSH Code System": {
|
||||
"prefix": ["cs", "CS", "cod", "Cod"],
|
||||
"body": [
|
||||
"CodeSystem: $1",
|
||||
"Id: ${2:${1/(([A-Z]*)[_]([A-Z]*))|(([A-Z]*[a-z0-9]+)([A-Z]+))|(([A-Z]+)([A-Z0-9])([a-z]))/${2:/downcase}${5:/downcase}${8:/downcase}-${3:/downcase}${6:/downcase}${9:/downcase}$10/g}}",
|
||||
"Title: \"${3:${1/[_]|(([a-z0-9])([A-Z]))|(([A-Z])([A-Z0-9])([a-z]))/$2$5 $3$6$7/g}}\"",
|
||||
"Description: \"$4\"",
|
||||
"* $0"
|
||||
],
|
||||
"description": "Create a FSH Code System"
|
||||
},
|
||||
"FSH Instance": {
|
||||
"prefix": ["inst", "Inst"],
|
||||
"body": [
|
||||
"Instance: $1",
|
||||
"InstanceOf: $2",
|
||||
"Usage: ${3|#example,#definition,#inline|}",
|
||||
"Title: \"${4:${1/[_]|(([a-z0-9])([A-Z]))|(([A-Z])([A-Z0-9])([a-z]))/$2$5 $3$6$7/g}}\"",
|
||||
"Description: \"$5\"",
|
||||
"* $0"
|
||||
],
|
||||
"description": "Create a FSH Instance"
|
||||
},
|
||||
"FSH Invariant": {
|
||||
"prefix": ["inv", "Inv"],
|
||||
"body": [
|
||||
"Invariant: $1",
|
||||
"Description: \"$2\"",
|
||||
"Expression: \"$3\"",
|
||||
"Severity: ${4|#error,#warning|}",
|
||||
"XPath: \"$5\"",
|
||||
"",
|
||||
"$0"
|
||||
],
|
||||
"description": "Create a FSH Invariant"
|
||||
},
|
||||
"FSH Mapping": {
|
||||
"prefix": ["map", "Map"],
|
||||
"body": [
|
||||
"Mapping: $1",
|
||||
"Source: $2",
|
||||
"Target: \"$3\"",
|
||||
"Id: $4",
|
||||
"Title: \"$5\"",
|
||||
"Description: \"$6\"",
|
||||
"* $0"
|
||||
],
|
||||
"description": "Create a FSH Invariant"
|
||||
},
|
||||
"FSH RuleSet": {
|
||||
"prefix": ["RS", "rs", "rule", "Rule"],
|
||||
"body": ["RuleSet: $1", "* $0"],
|
||||
"description": "Create a FSH RuleSet"
|
||||
},
|
||||
"Slicing rules": {
|
||||
"prefix": ["^slicing"],
|
||||
"body": [
|
||||
"^slicing.discriminator.type = ${1|#value,#exists,#pattern,#type,#profile|}",
|
||||
"${TM_CURRENT_LINE/\\s*([^\\^]+).*/$1/}^slicing.discriminator.path = \"$2\"",
|
||||
"${TM_CURRENT_LINE/\\s*([^\\^]+).*/$1/}^slicing.rules = ${3|#open,#closed,#openAtEnd|}",
|
||||
"${TM_CURRENT_LINE/\\s*([^\\^]+).*/$1/}^slicing.description = \"$4\"",
|
||||
"${TM_CURRENT_LINE/\\s*([^\\^]+).*/$1/}^slicing.ordered = ${5|false,true|}",
|
||||
"$0"
|
||||
],
|
||||
"description": "Add slicing rules"
|
||||
}
|
||||
}
|
||||
200
dot_vim/plugged/friendly-snippets/snippets/gdscript.json
Normal file
200
dot_vim/plugged/friendly-snippets/snippets/gdscript.json
Normal file
@@ -0,0 +1,200 @@
|
||||
{
|
||||
"Inner class": {
|
||||
"prefix": "class",
|
||||
"body": [
|
||||
"class $1 extends ${2:Reference}",
|
||||
"\t$3"
|
||||
]
|
||||
},
|
||||
|
||||
"Print messages to console": {
|
||||
"prefix": "pr",
|
||||
"body": [
|
||||
"print($1)"
|
||||
]
|
||||
},
|
||||
|
||||
"_ready method of Node": {
|
||||
"prefix": "ready",
|
||||
"body": [
|
||||
"func _ready():",
|
||||
"\t${1:pass}"
|
||||
]
|
||||
},
|
||||
|
||||
"_init method of Object": {
|
||||
"prefix": "init",
|
||||
"body": [
|
||||
"func _init():",
|
||||
"\t${1:pass}"
|
||||
]
|
||||
},
|
||||
|
||||
"_process method of Node": {
|
||||
"prefix": "process",
|
||||
"body": [
|
||||
"func _process(delta):",
|
||||
"\t${1:pass}"
|
||||
]
|
||||
},
|
||||
|
||||
"_input method of Node": {
|
||||
"prefix": "input",
|
||||
"body": [
|
||||
"func _input(event):",
|
||||
"\t${1:pass}"
|
||||
]
|
||||
},
|
||||
|
||||
"_input_event method of Node": {
|
||||
"prefix": "inpute",
|
||||
"body": [
|
||||
"func _input_event(event):",
|
||||
"\t${1:pass}"
|
||||
]
|
||||
},
|
||||
|
||||
"_draw method of Node": {
|
||||
"prefix": "draw",
|
||||
"body": [
|
||||
"func _draw():",
|
||||
"\t${1:pass}"
|
||||
]
|
||||
},
|
||||
|
||||
"_gui_input method of Node": {
|
||||
"prefix": "guii",
|
||||
"body": [
|
||||
"func _gui_input(event):",
|
||||
"\t${1:pass}"
|
||||
]
|
||||
},
|
||||
|
||||
"for loop": {
|
||||
"prefix": "for",
|
||||
"body": [
|
||||
"for $1 in $2:",
|
||||
"\t${3:pass}"
|
||||
]
|
||||
},
|
||||
|
||||
"for range loop": {
|
||||
"prefix": "for",
|
||||
"body": [
|
||||
"for $1 in range(${2:start}{$3:,end}):",
|
||||
"\t${4:pass}"
|
||||
]
|
||||
},
|
||||
|
||||
"if elif else": {
|
||||
"prefix": "if",
|
||||
"body": [
|
||||
"if ${1:condition}:",
|
||||
"\t${3:pass}",
|
||||
"elif ${2:condition}:",
|
||||
"\t${4:pass}",
|
||||
"else:",
|
||||
"\t${5:pass}"
|
||||
]
|
||||
},
|
||||
|
||||
"if else": {
|
||||
"prefix": "if",
|
||||
"body": [
|
||||
"if ${1:condition}:",
|
||||
"\t${2:pass}",
|
||||
"else:",
|
||||
"\t${3:pass}"
|
||||
]
|
||||
},
|
||||
|
||||
"if": {
|
||||
"prefix": "if",
|
||||
"body": [
|
||||
"if ${1:condition}:",
|
||||
"\t${2:pass}"
|
||||
]
|
||||
},
|
||||
|
||||
"while": {
|
||||
"prefix": "while",
|
||||
"body": [
|
||||
"while ${1:condition}:",
|
||||
"\t${2:pass}"
|
||||
]
|
||||
},
|
||||
|
||||
"function define": {
|
||||
"prefix": "func",
|
||||
"body": [
|
||||
"func ${1:method}(${2:args}):",
|
||||
"\t${3:pass}"
|
||||
]
|
||||
},
|
||||
|
||||
"signal declaration": {
|
||||
"prefix": "signal",
|
||||
"body": [
|
||||
"signal ${1:signalname}(${2:args})"
|
||||
]
|
||||
},
|
||||
|
||||
"export variables": {
|
||||
"prefix": "export",
|
||||
"body": [
|
||||
"export(${1:type}${2:,other_configs}) var ${3:name}${4: = }${5:}${6: setget }"
|
||||
]
|
||||
},
|
||||
|
||||
"define variables": {
|
||||
"prefix": "var",
|
||||
"body": [
|
||||
"var ${1:name}${2: = }${3:}${4: setget }"
|
||||
]
|
||||
},
|
||||
|
||||
"define onready variables": {
|
||||
"prefix": "onready",
|
||||
"body": [
|
||||
"onready var ${1:name} = get_node($2)"
|
||||
]
|
||||
},
|
||||
|
||||
"Is instance of a class or script": {
|
||||
"prefix": "is",
|
||||
"body": [
|
||||
"${1:instance} is ${2:class}"
|
||||
]
|
||||
},
|
||||
|
||||
"element in array": {
|
||||
"prefix": "in",
|
||||
"body": [
|
||||
"${1:element} in ${$2:array}"
|
||||
]
|
||||
},
|
||||
|
||||
"GDScript template": {
|
||||
"prefix": "gdscript",
|
||||
"body": [
|
||||
"extends ${1:BaseClass}",
|
||||
"",
|
||||
"# class member variables go here, for example:",
|
||||
"# var a = 2",
|
||||
"# var b = \"textvar\"",
|
||||
"",
|
||||
"func _ready():",
|
||||
"\t# Called every time the node is added to the scene.",
|
||||
"\t# Initialization here",
|
||||
"\tpass",
|
||||
""
|
||||
]
|
||||
},
|
||||
|
||||
"pass statement": {
|
||||
"prefix": "pass",
|
||||
"body": [
|
||||
"pass"
|
||||
]
|
||||
}
|
||||
}
|
||||
96
dot_vim/plugged/friendly-snippets/snippets/gitcommit.json
Normal file
96
dot_vim/plugged/friendly-snippets/snippets/gitcommit.json
Normal file
@@ -0,0 +1,96 @@
|
||||
{
|
||||
"conventional commit": {
|
||||
"prefix": "cc",
|
||||
"body": [
|
||||
"${1:type}(${2:scope}): ${3:title}",
|
||||
"",
|
||||
"$0"
|
||||
]
|
||||
},
|
||||
"fix conventional commit": {
|
||||
"prefix": "fix",
|
||||
"body": [
|
||||
"fix(${1:scope}): ${2:title}",
|
||||
"",
|
||||
"$0"
|
||||
]
|
||||
},
|
||||
"feat conventional commit": {
|
||||
"prefix": "feat",
|
||||
"body": [
|
||||
"feat(${1:scope}): ${2:title}",
|
||||
"",
|
||||
"$0"
|
||||
]
|
||||
},
|
||||
"build conventional commit": {
|
||||
"prefix": "build",
|
||||
"body": [
|
||||
"build(${1:scope}): ${2:title}",
|
||||
"",
|
||||
"$0"
|
||||
]
|
||||
},
|
||||
"chore conventional commit": {
|
||||
"prefix": "chore",
|
||||
"body": [
|
||||
"chore(${1:scope}): ${2:title}",
|
||||
"",
|
||||
"$0"
|
||||
]
|
||||
},
|
||||
"ci conventional commit": {
|
||||
"prefix": "ci",
|
||||
"body": [
|
||||
"ci(${1:scope}): ${2:title}",
|
||||
"",
|
||||
"$0"
|
||||
]
|
||||
},
|
||||
"docs conventional commit": {
|
||||
"prefix": "docs",
|
||||
"body": [
|
||||
"docs(${1:scope}): ${2:title}",
|
||||
"",
|
||||
"$0"
|
||||
]
|
||||
},
|
||||
"style conventional commit": {
|
||||
"prefix": "style",
|
||||
"body": [
|
||||
"style(${1:scope}): ${2:title}",
|
||||
"",
|
||||
"$0"
|
||||
]
|
||||
},
|
||||
"refactor conventional commit": {
|
||||
"prefix": "refactor",
|
||||
"body": [
|
||||
"refactor(${1:scope}): ${2:title}",
|
||||
"",
|
||||
"$0"
|
||||
]
|
||||
},
|
||||
"perf conventional commit": {
|
||||
"prefix": "perf",
|
||||
"body": [
|
||||
"perf(${1:scope}): ${2:title}",
|
||||
"",
|
||||
"$0"
|
||||
]
|
||||
},
|
||||
"test conventional commit": {
|
||||
"prefix": "test",
|
||||
"body": [
|
||||
"test(${1:scope}): ${2:title}",
|
||||
"",
|
||||
"$0"
|
||||
]
|
||||
},
|
||||
"breaking change conventional commit footer": {
|
||||
"prefix": "BREAK",
|
||||
"body": [
|
||||
"BREAKING CHANGE: $0"
|
||||
]
|
||||
}
|
||||
}
|
||||
404
dot_vim/plugged/friendly-snippets/snippets/global.json
Normal file
404
dot_vim/plugged/friendly-snippets/snippets/global.json
Normal file
@@ -0,0 +1,404 @@
|
||||
{
|
||||
"copyright": {
|
||||
"prefix": "c)",
|
||||
"body": ["Copyright (c) ${CURRENT_YEAR} ${0:Author}. All Rights Reserved."],
|
||||
"description": "Snippet to put copyright"
|
||||
},
|
||||
"diso": {
|
||||
"prefix": "diso",
|
||||
"body": ["${CURRENT_YEAR}-${CURRENT_MONTH}-${CURRENT_DATE}T${CURRENT_HOUR}:${CURRENT_MINUTE}:${CURRENT_SECOND}"],
|
||||
"description": "ISO date time stamp"
|
||||
},
|
||||
"date": {
|
||||
"prefix": "date",
|
||||
"body": ["${CURRENT_YEAR}-${CURRENT_MONTH}-${CURRENT_DATE}"],
|
||||
"description": "Put the date in (Y-m-D) format"
|
||||
},
|
||||
"dateMDY": {
|
||||
"prefix": "dateMDY",
|
||||
"body": ["${CURRENT_MONTH}/${CURRENT_DATE}/${CURRENT_YEAR}"],
|
||||
"description": "Put the date in (m/D/Y) format"
|
||||
},
|
||||
"time": {
|
||||
"prefix": "time",
|
||||
"body": ["${CURRENT_HOUR}:${CURRENT_MINUTE}"],
|
||||
"description": "I give you back the time (H:M)"
|
||||
},
|
||||
"timeHMS": {
|
||||
"prefix": "timeHMS",
|
||||
"body": ["${CURRENT_HOUR}:${CURRENT_MINUTE}:${CURRENT_SECOND}"],
|
||||
"description": "I give you back the time (H:M:S)"
|
||||
},
|
||||
"datetime": {
|
||||
"prefix": "datetime",
|
||||
"body": ["${CURRENT_YEAR}-${CURRENT_MONTH}-${CURRENT_DATE} ${CURRENT_HOUR}:${CURRENT_MINUTE}"],
|
||||
"description": "I give you back the time and date (Y-m-d H:M)"
|
||||
},
|
||||
"Lorem Ipsum Sentence": {
|
||||
"prefix": "loremSent",
|
||||
"body": "Lorem ipsum dolor sit amet, qui minim labore adipisicing minim sint cillum sint consectetur cupidatat.",
|
||||
"description": "Lorem Ipsum Sentence"
|
||||
},
|
||||
"Lorem Ipsum Paragraph": {
|
||||
"prefix": "loremPara",
|
||||
"body": "Lorem ipsum dolor sit amet, officia excepteur ex fugiat reprehenderit enim labore culpa sint ad nisi Lorem pariatur mollit ex esse exercitation amet. Nisi anim cupidatat excepteur officia. Reprehenderit nostrud nostrud ipsum Lorem est aliquip amet voluptate voluptate dolor minim nulla est proident. Nostrud officia pariatur ut officia. Sit irure elit esse ea nulla sunt ex occaecat reprehenderit commodo officia dolor Lorem duis laboris cupidatat officia voluptate. Culpa proident adipisicing id nulla nisi laboris ex in Lorem sunt duis officia eiusmod. Aliqua reprehenderit commodo ex non excepteur duis sunt velit enim. Voluptate laboris sint cupidatat ullamco ut ea consectetur et est culpa et culpa duis.",
|
||||
"description": "Lorem Ipsum Paragraph"
|
||||
},
|
||||
"MIT": {
|
||||
"prefix": "mitl" ,
|
||||
"description": "MIT License",
|
||||
"body": [
|
||||
"The MIT License (MIT)",
|
||||
"",
|
||||
"Copyright (c) ${CURRENT_YEAR} ${0:Author}",
|
||||
"",
|
||||
"Permission is hereby granted, free of charge, to any person obtaining a copy",
|
||||
"of this software and associated documentation files (the \"Software\"), to deal",
|
||||
"in the Software without restriction, including without limitation the rights",
|
||||
"to use, copy, modify, merge, publish, distribute, sublicense, and/or sell",
|
||||
"copies of the Software, and to permit persons to whom the Software is",
|
||||
"furnished to do so, subject to the following conditions:",
|
||||
"",
|
||||
"The above copyright notice and this permission notice shall be included in all",
|
||||
"copies or substantial portions of the Software.",
|
||||
"",
|
||||
"THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR",
|
||||
"IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,",
|
||||
"FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE",
|
||||
"AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER",
|
||||
"LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,",
|
||||
"OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE",
|
||||
"SOFTWARE."
|
||||
]
|
||||
},
|
||||
"GPL2": {
|
||||
"prefix": "GPL2" ,
|
||||
"description": "GPLv2 License",
|
||||
"body": [
|
||||
"The GPLv2 License (GPLv2)",
|
||||
"",
|
||||
"Copyright (c) ${CURRENT_YEAR} ${0:Author}",
|
||||
"",
|
||||
"This program is free software: you can redistribute it and/or modify",
|
||||
"it under the terms of the GNU General Public License as published by",
|
||||
"the Free Software Foundation; either version 2 of the License, or",
|
||||
"(at your option) any later version.",
|
||||
"",
|
||||
"This program is distributed in the hope that it will be useful,",
|
||||
"but WITHOUT ANY WARRANTY; without even the implied warranty of",
|
||||
"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the",
|
||||
"GNU General Public License for more details.",
|
||||
"",
|
||||
"You should have received a copy of the GNU General Public License",
|
||||
"along with this program. If not, see <http://www.gnu.org/licenses/>."
|
||||
]
|
||||
},
|
||||
"LGPL2": {
|
||||
"prefix": "LGPL2" ,
|
||||
"description": "GPLv2 License",
|
||||
"body": [
|
||||
"The GPLv2 License (GPLv2)",
|
||||
"",
|
||||
"Copyright (c) ${CURRENT_YEAR} ${0:Author}",
|
||||
"",
|
||||
"This library is free software; you can redistribute it and/or modify",
|
||||
"it under the terms of the GNU Lesser General Public License as published",
|
||||
"by the Free Software Foundation; either version 2.1 of the License, or",
|
||||
"(at your option) any later version.",
|
||||
"",
|
||||
"This library is distributed in the hope that it will be useful,",
|
||||
"but WITHOUT ANY WARRANTY; without even the implied warranty of",
|
||||
"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the",
|
||||
"GNU Lesser General Public License for more details.",
|
||||
"",
|
||||
"You should have received a copy of the GNU Lesser General Public License",
|
||||
"along with this program. If not, see <http://www.gnu.org/licenses/>."
|
||||
]
|
||||
},
|
||||
"GPL3": {
|
||||
"prefix": "GPL3",
|
||||
"description": "GPLv3 License",
|
||||
"body": [
|
||||
"The GPLv3 License (GPLv3)",
|
||||
"",
|
||||
"Copyright (c) ${CURRENT_YEAR} ${0:Author}",
|
||||
"",
|
||||
"This program is free software: you can redistribute it and/or modify",
|
||||
"it under the terms of the GNU General Public License as published by",
|
||||
"the Free Software Foundation, either version 3 of the License, or",
|
||||
"(at your option) any later version.",
|
||||
"",
|
||||
"This program is distributed in the hope that it will be useful,",
|
||||
"but WITHOUT ANY WARRANTY; without even the implied warranty of",
|
||||
"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the",
|
||||
"GNU General Public License for more details.",
|
||||
"",
|
||||
"You should have received a copy of the GNU General Public License",
|
||||
"along with this program. If not, see <http://www.gnu.org/licenses/>."
|
||||
]
|
||||
},
|
||||
"LGPL3": {
|
||||
"prefix": "LGPL3",
|
||||
"description": "LGPLv3 License",
|
||||
"body": [
|
||||
"The GPLv3 License (GPLv3)",
|
||||
"",
|
||||
"Copyright (c) ${CURRENT_YEAR} ${0:Author}",
|
||||
"",
|
||||
"This program is free software: you can redistribute it and/or modify",
|
||||
"it under the terms of the GNU Lesser General Public License as published",
|
||||
"the Free Software Foundation, either version 3 of the License, or",
|
||||
"(at your option) any later version.",
|
||||
"",
|
||||
"This library is distributed in the hope that it will be useful,",
|
||||
"but WITHOUT ANY WARRANTY; without even the implied warranty of",
|
||||
"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the",
|
||||
"GNU Lesser General Public License for more details.",
|
||||
"",
|
||||
"You should have received a copy of the GNU General Public License",
|
||||
"along with this program. If not, see <http://www.gnu.org/licenses/>."
|
||||
]
|
||||
},
|
||||
"AGPL3": {
|
||||
"prefix": "AGPL3",
|
||||
"description": "AGPLv3 License",
|
||||
"body": [
|
||||
"The AGPLv3 License (AGPLv3)",
|
||||
"",
|
||||
"Copyright (c) ${CURRENT_YEAR} ${0:Author}",
|
||||
"",
|
||||
"This program is free software: you can redistribute it and/or modify",
|
||||
"it under the terms of the GNU Affero General Public License as",
|
||||
"published by the Free Software Foundation, either version 3 of the",
|
||||
"License, or (at your option) any later version.",
|
||||
"",
|
||||
"This program is distributed in the hope that it will be useful,",
|
||||
"but WITHOUT ANY WARRANTY; without even the implied warranty of",
|
||||
"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the",
|
||||
"GNU Affero General Public License for more details.",
|
||||
"",
|
||||
"You should have received a copy of the GNU Affero General Public License",
|
||||
"along with this program. If not, see <http://www.gnu.org/licenses/>."
|
||||
]
|
||||
},
|
||||
"BSD2": {
|
||||
"prefix": "BSD2",
|
||||
"description": "BSD2 License",
|
||||
"body": [
|
||||
"The BSD2 License (BSD2)",
|
||||
"",
|
||||
"Copyright (c) ${CURRENT_YEAR} ${0:Author}. All rights reserved.",
|
||||
"",
|
||||
"Redistribution and use in source and binary forms, with or without",
|
||||
"modification, are permitted provided that the following conditions are met:",
|
||||
"1. Redistributions of source code must retain the above copyright",
|
||||
"notice, this list of conditions and the following disclaimer.",
|
||||
"2. Redistributions in binary form must reproduce the above copyright",
|
||||
"notice, this list of conditions and the following disclaimer in the",
|
||||
"documentation and/or other materials provided with the distribution.",
|
||||
"",
|
||||
"THIS SOFTWARE IS PROVIDED BY $1 ''AS IS'' AND ANY",
|
||||
"EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED",
|
||||
"WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE",
|
||||
"DISCLAIMED. IN NO EVENT SHALL $1 BE LIABLE FOR ANY",
|
||||
"DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES",
|
||||
"(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;",
|
||||
"LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND",
|
||||
"ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT",
|
||||
"(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS",
|
||||
"SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.",
|
||||
"",
|
||||
"The views and conclusions contained in the software and documentation",
|
||||
"are those of the authors and should not be interpreted as representing",
|
||||
"official policies, either expressed or implied, of $1."
|
||||
]
|
||||
},
|
||||
"BSD3": {
|
||||
"prefix": "BSD3",
|
||||
"description": "BSD3 License",
|
||||
"body": [
|
||||
"The BSD3 License (BSD3)",
|
||||
"",
|
||||
"Copyright (c) ${CURRENT_YEAR} ${0:Author}. All rights reserved.",
|
||||
"",
|
||||
"Redistribution and use in source and binary forms, with or without",
|
||||
"modification, are permitted provided that the following conditions are met:",
|
||||
"1. Redistributions of source code must retain the above copyright",
|
||||
"notice, this list of conditions and the following disclaimer.",
|
||||
"2. Redistributions in binary form must reproduce the above copyright",
|
||||
"notice, this list of conditions and the following disclaimer in the",
|
||||
"documentation and/or other materials provided with the distribution.",
|
||||
"3. Neither the name of the nor the",
|
||||
"names of its contributors may be used to endorse or promote products",
|
||||
"derived from this software without specific prior written permission.",
|
||||
"",
|
||||
"THIS SOFTWARE IS PROVIDED BY $1 ''AS IS'' AND ANY",
|
||||
"EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED",
|
||||
"WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE",
|
||||
"DISCLAIMED. IN NO EVENT SHALL $1 BE LIABLE FOR ANY",
|
||||
"DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES",
|
||||
"(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;",
|
||||
"LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND",
|
||||
"ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT",
|
||||
"(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS",
|
||||
"SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
|
||||
]
|
||||
},
|
||||
"BSD4": {
|
||||
"prefix": "BSD4",
|
||||
"description": "BSD4 License",
|
||||
"body": [
|
||||
"The BSD4 License (BSD4)",
|
||||
"",
|
||||
"Copyright (c) ${CURRENT_YEAR} ${0:Author}. All rights reserved.",
|
||||
"",
|
||||
"Redistribution and use in source and binary forms, with or without",
|
||||
"modification, are permitted provided that the following conditions are met:",
|
||||
"1. Redistributions of source code must retain the above copyright",
|
||||
"notice, this list of conditions and the following disclaimer.",
|
||||
"2. Redistributions in binary form must reproduce the above copyright",
|
||||
"notice, this list of conditions and the following disclaimer in the",
|
||||
"documentation and/or other materials provided with the distribution.",
|
||||
"3. All advertising materials mentioning features or use of this software",
|
||||
"must display the following acknowledgement:",
|
||||
"This product includes software developed by the .",
|
||||
"4. Neither the name of the $3 nor the",
|
||||
"names of its contributors may be used to endorse or promote products",
|
||||
"derived from this software without specific prior written permission.",
|
||||
"",
|
||||
"THIS SOFTWARE IS PROVIDED BY $1 ''AS IS'' AND ANY",
|
||||
"EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED",
|
||||
"WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE",
|
||||
"DISCLAIMED. IN NO EVENT SHALL $1 BE LIABLE FOR ANY",
|
||||
"DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES",
|
||||
"(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;",
|
||||
"LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND",
|
||||
"ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT",
|
||||
"(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS",
|
||||
"SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
|
||||
]
|
||||
},
|
||||
"APACHE": {
|
||||
"prefix": "APACHE",
|
||||
"description": "APACHE License",
|
||||
"body": [
|
||||
"The APACHE License (APACHE)",
|
||||
"",
|
||||
"Copyright (c) ${CURRENT_YEAR} ${0:Author}. All rights reserved.",
|
||||
"",
|
||||
"Licensed under the Apache License, Version 2.0 (the \"License\");",
|
||||
"you may not use this file except in compliance with the License.",
|
||||
"You may obtain a copy of the License at",
|
||||
"",
|
||||
"\thttp://www.apache.org/licenses/LICENSE-2.0",
|
||||
"",
|
||||
"Unless required by applicable law or agreed to in writing, software",
|
||||
"distributed under the License is distributed on an \"AS IS\" BASIS,",
|
||||
"WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.",
|
||||
"See the License for the specific language governing permissions and",
|
||||
"limitations under the License."
|
||||
]
|
||||
},
|
||||
"BEERWARE": {
|
||||
"prefix": "BEERWARE",
|
||||
"description": "BEERWARE License",
|
||||
"body": [
|
||||
"The BEERWARE License (BEERWARE)",
|
||||
"",
|
||||
"Copyright (c) ${CURRENT_YEAR} ${0:Author}. All rights reserved.",
|
||||
"",
|
||||
"Licensed under the \"THE BEER-WARE LICENSE\" (Revision 42):",
|
||||
"$1 wrote this file. As long as you retain this notice you",
|
||||
"can do whatever you want with this stuff. If we meet some day, and you think",
|
||||
"this stuff is worth it, you can buy me a beer or coffee in return"
|
||||
]
|
||||
},
|
||||
"WTFPL": {
|
||||
"prefix": "WTFPL",
|
||||
"description": "WTFPL License",
|
||||
"body": [
|
||||
"\tDO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE",
|
||||
"",
|
||||
"Copyright (c) ${CURRENT_YEAR} ${0:Author}. All rights reserved.",
|
||||
"",
|
||||
"Licensed under the \"THE BEER-WARE LICENSE\" (Revision 42):",
|
||||
"Everyone is permitted to copy and distribute verbatim or modified",
|
||||
"copies of this license document, and changing it is allowed as long",
|
||||
"as the name is changed.",
|
||||
"",
|
||||
"\tDO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE",
|
||||
"TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION",
|
||||
"\t0. You just DO WHAT THE FUCK YOU WANT TO."
|
||||
]
|
||||
},
|
||||
"MPL2": {
|
||||
"prefix": "MPL2",
|
||||
"description": "MPL2 License",
|
||||
"body": [
|
||||
"This Source Code Form is subject to the terms of the Mozilla Public",
|
||||
"License, v. 2.0. If a copy of the MPL was not distributed with this",
|
||||
"Copyright (c) ${CURRENT_YEAR} ${0:Author}. All rights reserved.",
|
||||
"file, You can obtain one at http://mozilla.org/MPL/2.0/."
|
||||
]
|
||||
},
|
||||
"AGPL": {
|
||||
"prefix": "AGPL",
|
||||
"description": "AGPL License",
|
||||
"body": [
|
||||
"The AGPL License (AGPL)",
|
||||
"",
|
||||
"Copyright (c) ${CURRENT_YEAR} ${0:Author}. All rights reserved.",
|
||||
"This program is free software: you can redistribute it and/or modify",
|
||||
"it under the terms of the GNU Affero General Public License as",
|
||||
"published by the Free Software Foundation, either version 3 of the",
|
||||
"License, or (at your option) any later version.",
|
||||
"",
|
||||
"This program is distributed in the hope that it will be useful,",
|
||||
"but WITHOUT ANY WARRANTY; without even the implied warranty of",
|
||||
"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the",
|
||||
"GNU Affero General Public License for more details.",
|
||||
"",
|
||||
"You should have received a copy of the GNU Affero General Public License",
|
||||
"along with this program. If not, see <http://www.gnu.org/licenses/>."
|
||||
]
|
||||
},
|
||||
"ISC": {
|
||||
"prefix": "ISC",
|
||||
"description": "ISC License",
|
||||
"body": [
|
||||
"The ISC License (ISC)",
|
||||
"",
|
||||
"Copyright (c) ${CURRENT_YEAR} ${0:Author}. All rights reserved.",
|
||||
"",
|
||||
"Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.",
|
||||
"",
|
||||
"THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE."
|
||||
]
|
||||
},
|
||||
"EUPL": {
|
||||
"prefix": "EUPL",
|
||||
"description": "EUPL License",
|
||||
"body": [
|
||||
"The EUPL License (EUPL)",
|
||||
"",
|
||||
"Copyright (c) ${CURRENT_YEAR} ${0:Author}",
|
||||
"Licensed under the EUPL, Version 1.2 or – as soon they will be approved by the European Commission - subsequent versions of the EUPL (the ''Licence'');",
|
||||
"You may not use this work except in compliance with the Licence.",
|
||||
"You may obtain a copy of the Licence at:",
|
||||
"",
|
||||
"<https://joinup.ec.europa.eu/software/page/eupl>",
|
||||
"",
|
||||
"Unless required by applicable law or agreed to in writing, software distributed under the Licence is distributed on an ''AS IS'' basis,",
|
||||
"WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.",
|
||||
"See the Licence for the specific language governing permissions and limitations under the Licence."
|
||||
]
|
||||
},
|
||||
"SPDX": {
|
||||
"prefix": "spdx",
|
||||
"description": "SPDX-style license header",
|
||||
"body": [
|
||||
"SPDX-License-Identifier: ${1:Id}",
|
||||
"SPDX-FileCopyrightText: ${CURRENT_YEAR} ${2:Author}"
|
||||
]
|
||||
}
|
||||
}
|
||||
651
dot_vim/plugged/friendly-snippets/snippets/glsl.json
Normal file
651
dot_vim/plugged/friendly-snippets/snippets/glsl.json
Normal file
@@ -0,0 +1,651 @@
|
||||
{
|
||||
"for": {
|
||||
"prefix": "for",
|
||||
"body": ["for(int $2 = 0; $2 < $3; $2++){", "\t", "}"],
|
||||
"description": "for( ; ; ){\n\t//code\n}\n\nThe keyword for is used to describe a loop that is controlled by a counter. The parentheses enclose three expressions that initialize, check and update the variable used as counter. The body defined by curly braces encloses the statements that are executed at each pass of the loop.\n\nfor(int i = 0; i <= 99; i++){\n\taFunction();\n}\n\nThe execution of a single pass or the whole loop can be aborted by using a continue or a break statement respectively."
|
||||
},
|
||||
|
||||
"while": {
|
||||
"prefix": "while",
|
||||
"body": ["while($2){", "\t", "}"],
|
||||
"description": "while(){\n\t//code\n}\n\nThe keyword while is used to describe a loop that is controlled by a condition. The parentheses enclose the expression that defines the condition. The body defined by curly braces encloses the statements that are executed at each pass of the loop.\n\nwhile(i <= 99){\n\taFunction();\n}\n\nThe execution of a single pass or the whole loop can be aborted by using a continue or a break statement respectively."
|
||||
},
|
||||
|
||||
"dowhile": {
|
||||
"prefix": "dowhile",
|
||||
"body": ["do{", "\t", "} while($2){", "\t", "}"],
|
||||
"description": "do {\n\t//code\n}while();\n\nThe keyword do is used in combination with while to describe a loop that is controlled by a condition. The body defined by curly braces encloses the statements that are executed at each pass of the loop. The parentheses enclose the expression that defines the condition.\n\ndo {\n\taFunction();\n} while(i <= 99);\n\nThe execution of a single pass or the whole loop can be aborted by using a continue or a break statement respectively.\n\nIn contrast to a simple while loop the body is always executed at least one time even if the expression evaluates to false from the beginning."
|
||||
},
|
||||
|
||||
"continue": {
|
||||
"prefix": "continue",
|
||||
"body": "continue;",
|
||||
"description": "The keyword continue is used inside the body of a loop to abort a single pass of the loop. All statements in the body after the continue statement are ignored and the next iteration of the loop is executed immediately."
|
||||
},
|
||||
|
||||
"break": {
|
||||
"prefix": "break",
|
||||
"body": "break;",
|
||||
"description": "The keyword break is used inside the body of a loop to abort the whole loop. All statements in the body after the break statement are ignored and the loop is exited without executing any further iteration."
|
||||
},
|
||||
|
||||
"if": {
|
||||
"prefix": "if",
|
||||
"body": ["if($2){", "\t", "}"],
|
||||
"description": "if(){\n\t//code\n}\n\nThe keyword if is used to describe the conditional execution of a statement. The parentheses enclose the expression that defines the condition. The curly braces enclose the statements that are executed if the condition evaluates as true.\n\nif(i != 0){\n\taFunction();\n}\n\nIn contrast to a loop the statements in curly braces are executed only one time or not at all."
|
||||
},
|
||||
|
||||
"ifelse": {
|
||||
"prefix": "ifelse",
|
||||
"body": ["if($2){", "\t", "} else {", "\t", "}"],
|
||||
"description": "if(){\n\t//code\n} else {\n\t//code\n}\n\nThe keyword else is used in conjunction with the keyword if to describe the alternative execution of a statement. The parentheses enclose the expression that defines the condition. The curly braces after the if statement enclose the statements that are executed if the condition evaluates as true. The curly braces after the else statement enclose the statements that are executed if the condition evaluates as false.\n\nif(i != 0){\n\taFunction();\n} else {\n\tbFunction();\n}\n\nDepending on the condition either the statements in the first curly braces or the statements in the second curly braces are executed."
|
||||
},
|
||||
|
||||
"ifdef": {
|
||||
"prefix": "ifdef",
|
||||
"body": ["#ifdef GL_ES", "precision mediump float;", "#endif"],
|
||||
"description": "A check defining if GLES is available"
|
||||
},
|
||||
|
||||
"return": {
|
||||
"prefix": "return",
|
||||
"body": "return;",
|
||||
"description": "The keyword return is used to define a proper exit for a function. If the function has the return type void no value is passed back to the caller of the function.\n\nreturn aValue;\n\nIf the function has a non-void return type a parameter of the same type has to be included in the statement. The value is passed back to the caller of the function."
|
||||
},
|
||||
|
||||
"discard": {
|
||||
"prefix": "discard",
|
||||
"body": "discard;",
|
||||
"description": "The keyword discard is used to define an exceptionally exit for a fragment shader. It is used exit the fragment shader immediately and to signal the OpenGL ES 2.0 pipeline that the respective fragment should not be drawn."
|
||||
},
|
||||
|
||||
"vec2": {
|
||||
"prefix": "vec2",
|
||||
"body": "vec2($2, $3)",
|
||||
"description": "The data type vec2 is used for floating point vectors with two components. There are several ways to initialize a vector:\n• Components are specified by providing a scalar value for each component (first example).\n• Components are specified by providing one scalar value. This value is used for all components (the second example is equivalent to the first).\n• Components are specified by providing a vector of higher dimension. The respective values are used to initialize the components (the second and third example are equivalent).\n\nSide note: The vector constructors can be used to cast between different vector types since type conversions are done automatically for each component."
|
||||
},
|
||||
|
||||
"vec3": {
|
||||
"prefix": "vec3",
|
||||
"body": "vec3($2, $3, $4)",
|
||||
"description": "The data type vec3 is used for floating point vectors with three components. There are several ways to initialize a vector:\n• Components are specified by providing a scalar value for each component (first example).\n• Components are specified by providing one scalar value. This value is used for all components (the second example is equivalent to the first).\nComponents are specified by providing a vector of higher dimension. The respective values are used to initialize the components (the second and third example are equivalent).• Components are specified by providing a combination of vectors and/or scalars. The respective values are used to initialize the vector (the fifth and sixth example are equivalent). The arguments of the constructor must have at least as many components as the vector that is initialized.\n\nSide note: The vector constructors can be used to cast between different vector types since type conversions are done automatically for each component."
|
||||
},
|
||||
|
||||
"vec4": {
|
||||
"prefix": "vec4",
|
||||
"body": "vec4($2, $3, $4, $5)",
|
||||
"description": "The data type vec4 is used for floating point vectors with four components. There are several ways to initialize a vector:\n• Components are specified by providing a scalar value for each component (first example).\n• Components are specified by providing one scalar value. This value is used for all components (the second example is equivalent to the first).\n• Components are specified by providing a combination of vectors and scalars. The respective values are used to initialize the components (the third and fourth example are equivalent). The arguments of the constructor must have at least as many components as the vector that is initialized.\n\nSide note: The vector constructors can be used to cast between different vector types since type conversions are done automatically for each component."
|
||||
},
|
||||
"mat2": {
|
||||
"prefix": "mat2",
|
||||
"body": "mat2($2, $3)",
|
||||
"description": "The data type mat2 is used for floating point matrices with two times two components in column major order. There are several ways to initialize a matrix:\n• Components are specified by providing a scalar value for each component (first example). The matrix is filled column by column.\n• Components are specified by providing one scalar value. This value is used for the components on the main diagonal (the second example is equivalent to the first).\n• Components are specified by providing a combination of vectors and scalars. The respective values are used to initialize the components column by column. The arguments of the constructor must have at least as many components as the matrix that is initialized."
|
||||
},
|
||||
"mat3": {
|
||||
"prefix": "mat3",
|
||||
"body": "mat3($2, $3, $4)",
|
||||
"description": "The data type mat3 is used for floating point matrices with three times three components in column major order. There are several ways to initialize a matrix:\n• Components are specified by providing a scalar value for each component (first example). The matrix is filled column by column.\n• Components are specified by providing one scalar value. This value is used for the components on the main diagonal (the second example is equivalent to the first).\n• Components are specified by providing a combination of vectors and scalars. The respective values are used to initialize the components column by column. The arguments of the constructor must have at least as many components as the matrix that is initialized."
|
||||
},
|
||||
"mat4": {
|
||||
"prefix": "mat4",
|
||||
"body": "mat4($2, $3, $4, $5)",
|
||||
"description": "The data type mat4 is used for floating point matrices with four times four components in column major order. There are several ways to initialize a matrix:\n• Components are specified by providing a scalar value for each component (first example). The matrix is filled column by column.\n• Components are specified by providing one scalar value. This value is used for the components on the main diagonal (the second example is equivalent to the first).\n• Components are specified by providing a combination of vectors and scalars. The respective values are used to initialize the components column by column. The arguments of the constructor must have at least as many components as the matrix that is initialized."
|
||||
},
|
||||
"sampler2D": {
|
||||
"prefix": "sampler2D",
|
||||
"body": "uniform sampler2D ${NAME};",
|
||||
"description": "uniform sampler2D texture;\n\nThe data type sampler2D is used to provide access to a 2D texture. It can only be declared as a uniform variable since it is a reference to data that has been loaded to a texture unit.\n\nSide note: On iOS devices this data type can only be used in the fragment shader since they don't have texture image units that can be accessed by the vertex shader."
|
||||
},
|
||||
"samplerCube": {
|
||||
"prefix": "samplerCube",
|
||||
"body": "uniform samplerCube ${NAME};",
|
||||
"description": "uniform samplerCube texture;\n\nThe data type samplerCube is used to provide access to a cubemap texture. It can only be declared as a uniform variable since it is a reference to data that has been loaded to a texture unit.\n\nSide note: On iOS devices this data type can only be used in the fragment shader since they don't have texture image units that can be accessed by the vertex shader."
|
||||
},
|
||||
|
||||
"sin": {
|
||||
"prefix": "sin",
|
||||
"body": "sin($2)",
|
||||
"description": "float sin(float angle)\nvec2 sin(vec2 angle)\nvec3 sin(vec3 angle)\nvec4 sin(vec4 angle)\n\nThe sin function returns the sine of an angle in radians. The input parameter can be a floating scalar or a float vector. In case of a float vector the sine is calculated separately for every component."
|
||||
},
|
||||
|
||||
"asin": {
|
||||
"prefix": "asin",
|
||||
"body": "asin($2)",
|
||||
"description": "float asin(float x)\nvec2 asin(vec2 x)\nvec3 asin(vec3 x)\nvec4 asin(vec4 x)\n\nThe asin function returns the arcsine of an angle in radians. It is the inverse function of sine. The input parameter can be a floating scalar or a float vector. In case of a float vector the arcsine is calculated separately for every component."
|
||||
},
|
||||
|
||||
"asinh": {
|
||||
"prefix": "asinh",
|
||||
"body": "asinh($2)",
|
||||
"description": "return the arc hyperbolic sine of the parameter - inverse of sinh"
|
||||
},
|
||||
|
||||
"sinh": {
|
||||
"prefix": "sinh",
|
||||
"body": "sinh($2)",
|
||||
"description": "return the hyperbolic sine of the parameter"
|
||||
},
|
||||
|
||||
"cos": {
|
||||
"prefix": "cos",
|
||||
"body": "cos($2)",
|
||||
"description": "float cos(float angle)\nvec2 cos(vec2 angle)\nvec3 cos(vec3 angle)\nvec4 cos(vec4 angle)\n\nThe cos function returns the cosine of an angle in radians. The input parameter can be a floating scalar or a float vector. In case of a float vector the cosine is calculated separately for every component."
|
||||
},
|
||||
|
||||
"cosh": {
|
||||
"prefix": "cosh",
|
||||
"body": "cosh($2)",
|
||||
"description": "return the hyperbolic cosine of the parameter"
|
||||
},
|
||||
|
||||
"acos": {
|
||||
"prefix": "acos",
|
||||
"body": "acos($2)",
|
||||
"description": "float acos(float x)\nvec2 acos(vec2 x)\nvec3 acos(vec3 x)\nvec4 acos(vec4 x)\n\nThe acos function returns the arccosine of an angle in radians. It is the inverse function of cosine. The input parameter can be a floating scalar or a float vector. In case of a float vector the arccosine is calculated separately for every component."
|
||||
},
|
||||
|
||||
"acosh": {
|
||||
"prefix": "acosh",
|
||||
"body": "acosh($2)",
|
||||
"description": "return the arc hyperbolic cosine of the parameter"
|
||||
},
|
||||
|
||||
"tan": {
|
||||
"prefix": "tan",
|
||||
"body": "tan($2)",
|
||||
"description": "float tan(float angle)\nvec2 tan(vec2 angle)\nvec3 tan(vec3 angle)\nvec4 tan(vec4 angle)\n\nThe tan function returns the tangent of an angle in radians. The input parameter can be a floating scalar or a float vector. In case of a float vector the tangent is calculated separately for every component."
|
||||
},
|
||||
|
||||
"tanh": {
|
||||
"prefix": "tanh",
|
||||
"body": "tanh($2)",
|
||||
"description": "return the hyperbolic tangent of the parameter"
|
||||
},
|
||||
|
||||
"atan": {
|
||||
"prefix": "atan",
|
||||
"body": "atan($2, $3)",
|
||||
"description": "float atan(float y_over_x)\nvec2 atan(vec2 y_over_x)\nvec3 atan(vec3 y_over_x)\nvec4 atan(vec4 y_over_x)\n\nThe atan function returns the arctangent of an angle in radians. It is the inverse function of tangent. The input parameter can be a floating scalar or a float vector. In case of a float vector the arctangent is calculated separately for every component.\n\nfloat atan(float y, float x)\nvec2 atan(vec2 y, vec2 x)\nvec3 atan(vec3 y, vec3 x)\nvec4 atan(vec4 y, vec4 x)\n\nThere is also a two-argument variation of the atan function (in other programming languages often called atan2). For a point with Cartesian coordinates (x, y) the function returns the angle θ of the same point with polar coordinates (r, θ)."
|
||||
},
|
||||
|
||||
"radians": {
|
||||
"prefix": "radians",
|
||||
"body": "radians($2)",
|
||||
"description": "float radians(float degrees)\nvec2 radians(vec2 degrees)\nvec3 radians(vec3 degrees)\nvec4 radians(vec4 degrees)\n\nThe radians function converts degrees to radians. The input parameter can be a floating scalar or a float vector. In case of a float vector all components are converted from degrees to radians separately."
|
||||
},
|
||||
|
||||
"degrees": {
|
||||
"prefix": "degrees",
|
||||
"body": "degrees($2)",
|
||||
"description": "float degrees(float radians)\nvec2 degrees(vec2 radians)\nvec3 degrees(vec3 radians)\nvec4 degrees(vec4 radians)\n\nThe degrees function converts radians to degrees. The input parameter can be a floating scalar or a float vector. In case of a float vector every component is converted from radians to degrees separately."
|
||||
},
|
||||
|
||||
"pow": {
|
||||
"prefix": "pow",
|
||||
"body": "pow($2, $3)",
|
||||
"description": "float pow(float x, float y)\nvec2 pow(vec2 x, vec2 y)\nvec3 pow(vec3 x, vec3 y)\nvec4 pow(vec4 x, vec4 y)\n\nThe power function returns x raised to the power of y. The input parameters can be floating scalars or float vectors. In case of float vectors the operation is done component-wise."
|
||||
},
|
||||
|
||||
"exp": {
|
||||
"prefix": "exp",
|
||||
"body": "exp($2);",
|
||||
"description": "float exp(float x)\nvec2 exp(vec2 x)\nvec3 exp(vec3 x)\nvec4 exp(vec4 x)\n\nThe exp function returns the constant e raised to the power of x. The input parameter can be a floating scalar or a float vector. In case of a float vector the operation is done component-wise."
|
||||
},
|
||||
|
||||
"exp2": {
|
||||
"prefix": "exp2",
|
||||
"body": "exp2($2)",
|
||||
"description": "float exp2(float x)\nvec2 exp2(vec2 x)\nvec3 exp2(vec3 x)\nvec4 exp2(vec4 x)\n\nThe exp2 function returns 2 raised to the power of x. The input parameter can be a floating scalar or a float vector. In case of a float vector the operation is done component-wise."
|
||||
},
|
||||
|
||||
"ldexp": {
|
||||
"prefix": "ldexp",
|
||||
"body": "ldexp($2, $3)",
|
||||
"description": "assemble a floating point number from a value and exponent"
|
||||
},
|
||||
|
||||
"frexp": {
|
||||
"prefix": "frexp",
|
||||
"body": "frexp($2, $3)",
|
||||
"description": "split a floating point number"
|
||||
},
|
||||
|
||||
"log": {
|
||||
"prefix": "log",
|
||||
"body": "log($2)",
|
||||
"description": "float log(float x)\nvec2 log(vec2 x)\nvec3 log(vec3 x)\nvec4 log(vec4 x)\n\nThe log function returns the power to which the constant e has to be raised to produce x. The input parameter can be a floating scalar or a float vector. In case of a float vector the operation is done component-wise."
|
||||
},
|
||||
|
||||
"log2": {
|
||||
"prefix": "log2",
|
||||
"body": "log2($2)",
|
||||
"description": "float log2(float x)\nvec2 log2(vec2 x)\nvec3 log2(vec3 x)\nvec4 log2(vec4 x)\n\nThe log2 function returns the power to which 2 has to be raised to produce x. The input parameter can be a floating scalar or a float vector. In case of a float vector the operation is done component-wise."
|
||||
},
|
||||
|
||||
"sqrt": {
|
||||
"prefix": "sqrt",
|
||||
"body": "sqrt($2)",
|
||||
"description": "float sqrt(float x)\nvec2 sqrt(vec2 x)\nvec3 sqrt(vec3 x)\nvec4 sqrt(vec4 x)\n\nThe sqrt function returns the square root of x. The input parameter can be a floating scalar or a float vector. In case of a float vector the operation is done component-wise."
|
||||
},
|
||||
|
||||
"inversesqrt": {
|
||||
"prefix": "inversesqrt",
|
||||
"body": "inversesqrt($2)",
|
||||
"description": "float inversesqrt(float x)\nvec2 inversesqrt(vec2 x)\nvec3 inversesqrt(vec3 x)\nvec4 inversesqrt(vec4 x)\n\nThe inversesqrt function returns the inverse square root of x, i.e. the reciprocal of the square root. The input parameter can be a floating scalar or a float vector. In case of a float vector the operation is done component-wise."
|
||||
},
|
||||
|
||||
"abs": {
|
||||
"prefix": "abs",
|
||||
"body": "abs($2)",
|
||||
"description": "float abs(float x)\nvec2 abs(vec2 x)\nvec3 abs(vec3 x)\nvec4 abs(vec4 x)\n\nThe abs function returns the absolute value of x, i.e. x when x is positive or zero and -x for negative x. The input parameter can be a floating scalar or a float vector. In case of a float vector the operation is done component-wise."
|
||||
},
|
||||
|
||||
"ceil": {
|
||||
"prefix": "ceil",
|
||||
"body": "ceil($2)",
|
||||
"description": "float ceil(float x)\nvec2 ceil(vec2 x)\nvec3 ceil(vec3 x)\nvec4 ceil(vec4 x)\n\nThe ceiling function returns the smallest number that is larger or equal to x. The input parameter can be a floating scalar or a float vector. In case of a float vector the operation is done component-wise.\n\nSide note: The return value is of type floating scalar or float vector although the result of the operation is an integer."
|
||||
},
|
||||
|
||||
"clamp": {
|
||||
"prefix": "clamp",
|
||||
"body": "clamp($2, $3, $4)",
|
||||
"description": "float clamp(float x, float minVal, float maxVal)\nvec2 clamp(vec2 x, vec2 minVal, vec2 maxVal)\nvec3 clamp(vec3 x, vec3 minVal, vec3 maxVal)\nvec4 clamp(vec4 x, vec4 minVal, vec4 maxVal)\n\nThe clamp function returns x if it is larger than minVal and smaller than maxVal. In case x is smaller than minVal, minVal is returned. If x is larger than maxVal, maxVal is returned. The input parameters can be floating scalars or float vectors. In case of float vectors the operation is done component-wise.\n\nfloat clamp(float x, float minVal, float maxVal)\nvec2 clamp(vec2 x, float minVal, float maxVal)\nvec3 clamp(vec3 x, float minVal, float maxVal)\nvec4 clamp(vec4 x, flfloat minVal, float maxVal)\n\nThere is also a variation of the clamp function where the second and third parameters are always a floating scalars."
|
||||
},
|
||||
|
||||
"floor": {
|
||||
"prefix": "floor",
|
||||
"body": "floor($2)",
|
||||
"description": "float floor(float x)\nvec2 floor(vec2 x)\nvec3 floor(vec3 x)\nvec4 floor(vec4 x)\n\nThe floor function returns the largest integer number that is smaller or equal to x. The input parameter can be a floating scalar or a float vector. In case of a float vector the operation is done component-wise.\n\nSide note: The return value is of type floating scalar or float vector although the result of the operation is an integer."
|
||||
},
|
||||
|
||||
"equal": {
|
||||
"prefix": "equal",
|
||||
"body": "equal($2, $3)",
|
||||
"description": "perform a component-wise equal-to comparison of two vectors"
|
||||
},
|
||||
|
||||
"fract": {
|
||||
"prefix": "fract",
|
||||
"body": "fract($2)",
|
||||
"description": "float fract(float x)\nvec2 fract(vec2 x)\nvec3 fract(vec3 x)\nvec4 fract(vec4 x)\n\nThe fract function returns the fractional part of x, i.e. x minus floor(x). The input parameter can be a floating scalar or a float vector. In case of a float vector the operation is done component-wise."
|
||||
},
|
||||
|
||||
"min": {
|
||||
"prefix": "min",
|
||||
"body": "min($2, $3)",
|
||||
"description": "float min(float x, float y)\nvec2 min(vec2 x, vec2 y)\nvec3 min(vec3 x, vec3 y)\nvec4 min(vec4 x, vec4 y)\n\nThe min function returns the smaller of the two arguments. The input parameters can be floating scalars or float vectors. In case of float vectors the operation is done component-wise.\nfloat min(float x, float y)\nvec2 min(vec2 x, float y)\nvec3 min(vec3 x, float y)\nvec4 min(vec4 x, float y)\n\nThere is also a variation of the min function where the second parameter is always a floating scalar."
|
||||
},
|
||||
|
||||
"max": {
|
||||
"prefix": "max",
|
||||
"body": "max($2, $3)",
|
||||
"description": "float max(float x, float y)\nvec2 max(vec2 x, vec2 y)\nvec3 max(vec3 x, vec3 y)\nvec4 max(vec4 x, vec4 y)\n\nThe max function returns the larger of the two arguments. The input parameters can be floating scalars or float vectors. In case of float vectors the operation is done component-wise.\n\nfloat max(float x, float y)\nvec2 max(vec2 x, float y)\nvec3 max(vec3 x, float y)\nvec4 max(vec4 x, float y)\n\nThere is also a variation of the max function where the second parameter is always a floating scalar."
|
||||
},
|
||||
|
||||
"mix": {
|
||||
"prefix": "mix",
|
||||
"body": "mix($2, $3, $4)",
|
||||
"description": "float mix(float x, float y, float a)\nvec2 mix(vec2 x, vec2 y, vec2 a)\nvec3 mix(vec3 x, vec3 y, vec3 a)\nvec4 mix(vec4 x, vec4 y, vec4 a)\n\nThe mix function returns the linear blend of x and y, i.e. the product of x and (1 - a) plus the product of y and a. The input parameters can be floating scalars or float vectors. In case of float vectors the operation is done component-wise.\n\nfloat mix(float x, float y, float a)\nvec2 mix(vec2 x, vec2 y, float a)\nvec3 mix(vec3 x, vec3 y, float a)\nvec4 mix(vec4 x, vec4 y, float a)\n\nThere is also a variation of the mix function where the third parameter is always a floating scalar."
|
||||
},
|
||||
|
||||
"mod": {
|
||||
"prefix": "mod",
|
||||
"body": "mod($2, $3)",
|
||||
"description": "float mod(float x, float y)\nvec2 mod(vec2 x, vec2 y)\nvec3 mod(vec3 x, vec3 y)\nvec4 mod(vec4 x, vec4 y)\n\nThe mod function returns x minus the product of y and floor(x/y). The input parameters can be floating scalars or float vectors. In case of float vectors the operation is done component-wise.\n\nSide note: If x and y are integers the return value is the remainder of the division of x by y as expected.\n\nfloat mod(float x, float y)\nvec2 mod(vec2 x, float y)\nvec3 mod(vec3 x, float y)\nvec4 mod(vec4 x, float y)\n\nThere is also a variation of the mod function where the second parameter is always a floating scalar."
|
||||
},
|
||||
|
||||
"modf": {
|
||||
"prefix": "modf",
|
||||
"body": "modf($2, $3)",
|
||||
"description": "separate a value into its integer and fractional components"
|
||||
},
|
||||
|
||||
"sign": {
|
||||
"prefix": "sign",
|
||||
"body": "sign($2)",
|
||||
"description": "float sign(float x)\nvec2 sign(vec2 x)\nvec3 sign(vec3 x)\nvec4 sign(vec4 x)\n\nThe sign function returns 1.0 when x is positive, 0.0 when x is zero and -1.0 when x is negative. The input parameter can be a floating scalar or a float vector. In case of a float vector the operation is done component-wise."
|
||||
},
|
||||
|
||||
"step": {
|
||||
"prefix": "step",
|
||||
"body": "step($2, $3)",
|
||||
"description": "float step(float edge, float x)\nvec2 step(vec2 edge, vec2 x)\nvec3 step(vec3 edge, vec3 x)\nvec4 step(vec4 edge, vec4 x)\n\nThe step function returns 0.0 if x is smaller then edge and otherwise 1.0. The input parameters can be floating scalars or float vectors. In case of float vectors the operation is done component-wise.\n\nfloat step(float edge, float x)\nvec2 step(float edge, vec2 x)\nvec3 step(float edge, vec3 x)\nvec4 step(float edge, vec4 x)\n\nThere is also a variation of the step function where the edge parameter is always a floating scalar."
|
||||
},
|
||||
|
||||
"smoothstep": {
|
||||
"prefix": "smoothstep",
|
||||
"body": "smoothstep($2, $3, $4)",
|
||||
"description": "float smoothstep(float edge0, float edge1, float x)\nvec2 smoothstep(vec2 edge0, vec2 edge1, vec2 x)\nvec3 smoothstep(vec3 edge0, vec3 edge1, vec3 x)\nvec4 smoothstep(vec4 edge0, vec4 edge1, vec4 x)\n\nThe smoothstep function returns 0.0 if x is smaller then edge0 and 1.0 if x is larger than edge1. Otherwise the return value is interpolated between 0.0 and 1.0 using Hermite polynomials. The input parameters can be floating scalars or float vectors. In case of float vectors the operation is done component-wise.\n\nfloat smoothstep(float edge0, float edge1, float x)\nvec2 smoothstep(float edge0, float edge1, vec2 x)\nvec3 smoothstep(float edge0, float edge1, vec3 x)\nvec4 smoothstep(float edge0, float edge1, vec4 x)\n\nThere is also a variation of the smoothstep function where the edge0 and edge1 parameters are always floating scalars."
|
||||
},
|
||||
|
||||
"cross": {
|
||||
"prefix": "cross",
|
||||
"body": "cross($2, $3, $4)",
|
||||
"description": "vec3 cross(vec3 x, vec3 y)\n\nThe cross function returns the cross product of the two input parameters, i.e. a vector that is perpendicular to the plane containing x and y and has a magnitude that is equal to the area of the parallelogram that x and y span. The input parameters can only be 3-component floating vectors. The cross product is equivalent to the product of the length of the vectors times the sinus of the(smaller) angle between x and y."
|
||||
},
|
||||
|
||||
"distance": {
|
||||
"prefix": "distance",
|
||||
"body": "distance($2, $3)",
|
||||
"description": "float distance(float p0, float p1)\nfloat distance(vec2 p0, vec2 p1)\nfloat distance(vec3 p0, vec3 p1)\nfloat distance(vec4 p0, vec4 p1)\n\nThe distance function returns the distance between two points. The distance of two points is the length of the vector d = p0 - p1, that starts at p1 and points to p0. The input parameters can be floating scalars or float vectors. In case of floating scalars the distance function is trivial and returns the absolute value of d."
|
||||
},
|
||||
|
||||
"dot": {
|
||||
"prefix": "dot",
|
||||
"body": "dot($2, $3)",
|
||||
"description": "float dot(float x, float y)\nfloat dot(vec2 x, vec2 y)\nfloat dot(vec3 x, vec3 y)\nfloat dot(vec4 x, vec4 y)\n\nThe dot function returns the dot product of the two input parameters, i.e. the sum of the component-wise products. If x and y are the same the square root of the dot product is equivalent to the length of the vector. The input parameters can be floating scalars or float vectors. In case of floating scalars the dot function is trivial and returns the product of x and y."
|
||||
},
|
||||
|
||||
"faceforward": {
|
||||
"prefix": "faceforward",
|
||||
"body": "faceforward($2, $3, $4)",
|
||||
"description": "float faceforward(float N, float I, float Nref)\nvec2 faceforward(vec2 N, vec2 I, vec2 Nref)\nvec3 faceforward(vec3 N, vec3 I, vec3 Nref)\nvec4 faceforward(vec4 N, vec4 I, vec4 Nref)\n\nThe faceforward function returns a vector that points in the same direction as a reference vector. The function has three input parameters of the type floating scalar or float vector: N, the vector to orient, I, the incident vector, and Nref, the reference vector. If the dot product of I and Nref is smaller than zero the return value is N. Otherwise -N is returned."
|
||||
},
|
||||
|
||||
"length": {
|
||||
"prefix": "length",
|
||||
"body": "length($2)",
|
||||
"description": "float length(float x)\nfloat length(vec2 x)\nfloat length(vec3 x)\nfloat length(vec4 x)\n\nThe length function returns the length of a vector defined by the Euclidean norm, i.e. the square root of the sum of the squared components. The input parameter can be a floating scalar or a float vector. In case of a floating scalar the length function is trivial and returns the absolute value."
|
||||
},
|
||||
|
||||
"normalize": {
|
||||
"prefix": "normalize",
|
||||
"body": "normalize($2)",
|
||||
"description": "float normalize(float x)\nvec2 normalize(vec2 x)\nvec3 normalize(vec3 x)\nvec4 normalize(vec4 x)\n\nThe normalize function returns a vector with length 1.0 that is parallel to x, i.e. x divided by its length. The input parameter can be a floating scalar or a float vector. In case of a floating scalar the normalize function is trivial and returns 1.0."
|
||||
},
|
||||
|
||||
"reflect": {
|
||||
"prefix": "reflect",
|
||||
"body": "reflect($2, $3)",
|
||||
"description": "float reflect(float I, float N)\nvec2 reflect(vec2 I, vec2 N)\nvec3 reflect(vec3 I, vec3 N)\nvec4 reflect(vec4 I, vec4 N)\n\nThe reflect function returns a vector that points in the direction of reflection. The function has two input parameters of the type floating scalar or float vector: I, the incident vector, and N, the normal vector of the reflecting surface.\n\nSide note: To obtain the desired result the vector N has to be normalized. The reflection vector always has the same length as the incident vector. From this it follows that the reflection vector is normalized if N and I are both normalized."
|
||||
},
|
||||
|
||||
"refract": {
|
||||
"prefix": "refract",
|
||||
"body": "refract($2, $3, $4)",
|
||||
"description": "float refract(float I, float N, float eta)\nvec2 refract(vec2 I, vec2 N, float eta)\nvec3 refract(vec3 I, vec3 N, float eta)\nvec4 refract(vec4 I, vec4 N, float eta)\n\nThe refract function returns a vector that points in the direction of refraction. The function has two input parameters of the type floating scalar or float vector and one input parameter of the type floating scalar: I, the incident vector, N, the normal vector of the refracting surface, and eta, the ratio of indices of refraction.\n\nSide note: To obtain the desired result the vectors I and N have to be normalized."
|
||||
},
|
||||
|
||||
"trunc": {
|
||||
"prefix": "trunc",
|
||||
"body": "trunc($2)",
|
||||
"description": "find the nearest integer less than or equal to the parameter"
|
||||
},
|
||||
|
||||
"round": {
|
||||
"prefix": "round",
|
||||
"body": "round($2)",
|
||||
"description": "find the nearest integer less than or equal to the parameter - The fraction 0.5 will round in a direction chosen by the implementation, presumably the direction that is fastest. This includes the possibility that round(x) returns the same value as roundEven(x) for all values of x"
|
||||
},
|
||||
|
||||
"roundEven": {
|
||||
"prefix": "roundEven",
|
||||
"body": "roundEven($2)",
|
||||
"description": "find the nearest even integer to the parameter - The fractional part of 0.5 will round toward the nearest even integer. For example, both 3.5 and 4.5 will round to 4.0."
|
||||
},
|
||||
|
||||
"const": {
|
||||
"prefix": "const",
|
||||
"body": "const",
|
||||
"description": "The qualifier const is used for variables that are compile-time constants or for function parameters that are read-only."
|
||||
},
|
||||
|
||||
"attribute": {
|
||||
"prefix": "attribute",
|
||||
"body": "attribute",
|
||||
"description": "The qualifier attribute is used to declare variables that are shared between a vertex shader and the OpenGL ES environment.\nSince the vertex shader is executed one time for each vertex attributes are used to specify per vertex data. They typically provide data such as the object space position, the normal direction and the texture coordinates of a vertex. Attributes are read-only variables, i.e. their value can not be changed in the vertex shader.\nSide note: Since an attribute is never initialized in the shader it has to be loaded with data by the application executing the shader."
|
||||
},
|
||||
|
||||
"uniform": {
|
||||
"prefix": "uniform",
|
||||
"body": "uniform",
|
||||
"description": "The qualifier uniform is used to declare variables that are shared between a shader and the OpenGL ES environment.\nUniforms can be used in the vertex shader and the fragment shader and they must have global scope. The same uniform variable can be used in the vertex and the fragment shader, but since both shaders share the same name space the declaration has to be identical. Uniforms are used to specify properties of the object that is rendered. Examples are the projection matrix, the light position or the material color of the object. Uniforms are read-only variables, i.e. their value can not be changed in the shader.\nSide note: Since a uniform is never initialized in the shader it has to be loaded with data by the application executing the shader."
|
||||
},
|
||||
|
||||
"varying": {
|
||||
"prefix": "varying",
|
||||
"body": "varying",
|
||||
"description": "The qualifier varying is used to declare variables that are shared between the vertex shader and the fragment shader.\nVarying are used for information that is calculated in the vertex shader and should be handed over to the fragment shader. Both shaders have to declare the varying and the declarations must be identical. The vertex shader initializes the varying for each vertex. After that the per vertex data of the varying is interpolated during rasterization before being handed over to the fragment shader.\nThe varying qualifier can only be used with floating point scalar, floating point vectors and (floating point) matrices as well as arrays containing these types."
|
||||
},
|
||||
|
||||
"highp": {
|
||||
"prefix": "highp",
|
||||
"body": "highp",
|
||||
"description": "The qualifier highp is used to specify the highest available precision for a variable. The variable has to be an integer or a floating point scalar or a vector or matrix based on these types. The precision qualifier precedes the type in the variable declaration.\nIn the vertex shader the use of a precision qualifier is optional. If no qualifier is given all variables are of highest precision. In the fragment shader a precision qualifier has to be used when declaring a variable unless a default precision has been defined for the specific type.\n\nuniform highp vec3 lightDirection;\n\nThe actual range corresponding to a precision qualifier is dependent on the specific OpenGL ES implementation. Using a lower precision might have a positive effect on performance (frame rates) and power efficiency but might also cause a loss in rendering quality. The appropriate trade-off can only be determined by testing different precision configurations."
|
||||
},
|
||||
|
||||
"mediump": {
|
||||
"prefix": "mediump",
|
||||
"body": "mediump",
|
||||
"description": "The qualifier mediump is used to specify a precision between the highest and lowest available precision for a variable. The variable has to be an integer or a floating point scalar or a vector or matrix based on these types. The precision qualifier precedes the type in the variable declaration.\nIn the vertex shader the use of a precision qualifier is optional. If no qualifier is given all variables are of highest precision. In the fragment shader a precision qualifier has to be used when declaring a variable unless a default precision has been defined for the specific type.\n\nvarying mediump vec2 textureCoordinate;\n\nThe actual range corresponding to a precision qualifier is dependent on the specific OpenGL ES implementation. Using a lower precision might have a positive effect on performance (frame rates) and power efficiency but might also cause a loss in rendering quality. The appropriate trade-off can only be determined by testing different precision configurations."
|
||||
},
|
||||
|
||||
"lowp": {
|
||||
"prefix": "lowp",
|
||||
"body": "lowp",
|
||||
"description": "The qualifier lowp is used to specify the lowest available precision for a variable. The variable has to be an integer or a floating point scalar or a vector or matrix based on these types. The precision qualifier precedes the type in the variable declaration.\nIn the vertex shader the use of a precision qualifier is optional. If no qualifier is given all variables are of highest precision. In the fragment shader a precision qualifier has to be used when declaring a variable unless a default precision has been defined for the specific type.\n\nvarying lowp vec4 colorVarying;\n\nThe actual range corresponding to a precision qualifier is dependent on the specific OpenGL ES implementation. Using a lower precision might have a positive effect on performance (frame rates) and power efficiency but might also cause a loss in rendering quality. The appropriate trade-off can only be determined by testing different precision configurations."
|
||||
},
|
||||
|
||||
"precision": {
|
||||
"prefix": "precision",
|
||||
"body": "precision",
|
||||
"description": "The keyword precision is used in conjunction with a precision qualifier and a data type to specify the default precision for that data type. The type has to be an integer or a floating point scalar or a vector or matrix based on these types.\nIn the vertex shader all variables are of highest precision by default. The default can be changed defining another default precision. In the fragment shader a precision qualifier has to be used when declaring a variable unless a default precision has been defined for the specific type.\n\nprecision highp float;\n\nThe actual range corresponding to a precision qualifier is dependent on the specific OpenGL ES implementation. Using a lower precision might have a positive effect on performance (frame rates) and power efficiency but might also cause a loss in rendering quality. The appropriate trade-off can only be determined by testing different precision configurations."
|
||||
},
|
||||
|
||||
"in": {
|
||||
"prefix": "in",
|
||||
"body": "in",
|
||||
"description": "The qualifier in is used to mark a parameter as read-only when a function is declared. The parameter will be passed by value to the function and the value can not be modified by the function.\nThe above function declaration shows the three possible parameter qualifiers. The usage of the read-only qualifier is not necessary since this is the default if no qualifier is specified."
|
||||
},
|
||||
|
||||
"out": {
|
||||
"prefix": "out",
|
||||
"body": "out",
|
||||
"description": "The qualifier out is used to mark a parameter as write-only when a function is declared. The parameter will be passed by reference to the function but it is not initialized, i.e. the value can not be read. The value can be modified by the function and the changes are preserved after the function exits.\nThe above function declaration shows the three possible parameter qualifiers. The usage of the read-only qualifier is not necessary since this is the default if no qualifier is specified."
|
||||
},
|
||||
|
||||
"inout": {
|
||||
"prefix": "inout",
|
||||
"body": "inout",
|
||||
"description": "The qualifier inout is used to mark a parameter as read-write when a function is declared. The parameter will be passed by reference to the function and is initialized, i.e. the value can be read. The value can be modified by the function and the changes are preserved after the function exits.\nThe above function declaration shows the three possible parameter qualifiers. The usage of the read-only qualifier is not necessary since this is the default if no qualifier is specified."
|
||||
},
|
||||
|
||||
"gl_FragCoord": {
|
||||
"prefix": "gl_FragCoord",
|
||||
"body": "gl_FragCoord",
|
||||
"description": "mediump vec4 gl_FragCoord;\n\nbool gl_FrontFacing;\n\nThe built-in variable gl_FragCoord is used by the OpenGL ES 2.0 pipeline to hand over the coordinates of the fragment to the fragment shader. The variable is read-only and the value is assigned by the OpenGL ES 2.0 pipeline.\nThe values of the fragment coordinate vector are given in the window coordinate system."
|
||||
},
|
||||
|
||||
"gl_FrontFacing": {
|
||||
"prefix": "gl_FrontFacing",
|
||||
"body": "gl_FrontFacing",
|
||||
"description": "The built-in variable gl_FrontFacing is used by the OpenGL ES 2.0 pipeline to hand over the information to the fragment shader if the fragment is part of a front-facing primitive (triangle). The variable is read-only and the value is assigned by the OpenGL ES 2.0 pipeline.\nThe front-facing variable has a boolean value."
|
||||
},
|
||||
|
||||
"gl_PointCoord": {
|
||||
"prefix": "gl_PointCoord",
|
||||
"body": "gl_PointCoord",
|
||||
"description": "mediump int gl_PointCoord;\n\nThe built-in variable gl_PointCoord is used by the OpenGL ES 2.0 pipeline to hand over the coordinates of a point sprite to the fragment shader. The variable is read-only and the value is calculated and assigned by the OpenGL ES 2.0 pipeline based on the position and radius of the point sprite.\nSide note: A value for this variable is provided by the OpenGL ES 2.0 pipeline only if the rendered primitives are points."
|
||||
},
|
||||
|
||||
"gl_FragColor": {
|
||||
"prefix": "gl_FragColor",
|
||||
"body": "gl_FragColor",
|
||||
"description": "mediump vec4 gl_FragColor;\n\nThe built-in variable gl_FragColor is used by the fragment shader to hand over the color of the fragment to the OpenGL ES 2.0 pipeline. The variable is pre-declared as shown above that way the variable can be used in the fragment shader for an assignment without prior declaration.\nThe values of the color vector are interpreted in the RGBA color space.\nThe assignment of values to this variable is mandatory for the fragment shader."
|
||||
},
|
||||
|
||||
"gl_MaxTextureImageUnits": {
|
||||
"prefix": "gl_MaxTextureImageUnits",
|
||||
"body": "gl_MaxTextureImageUnits",
|
||||
"description": "const mediump int gl_MaxTextureImageUnits >= 8\n\nThe built-in constant gl_MaxTextureImageUnits provides the maximum number of texture units that can be used by the fragment shader. The value of this variable is dependent on the OpenGL ES 2.0 implementation but has to be at least 8."
|
||||
},
|
||||
|
||||
"gl_MaxFragmentUniformVectors": {
|
||||
"prefix": "gl_MaxFragmentUniformVectors",
|
||||
"body": "gl_MaxFragmentUniformVectors",
|
||||
"description": "const mediump int gl_MaxFragmentUniformVectors >= 16\n\nThe built-in constant gl_MaxFragmentUniformVectors provides the maximum number of uniform vectors that can be used by the fragment shader. The value of this variable is dependent on the OpenGL ES 2.0 implementation but has to be at least 16."
|
||||
},
|
||||
|
||||
"gl_MaxDrawBuffers": {
|
||||
"prefix": "gl_MaxDrawBuffers",
|
||||
"body": "gl_MaxDrawBuffers",
|
||||
"description": "const mediump int gl_MaxDrawBuffers = 1\n\nThe built-in constant gl_MaxDrawBuffers provides the maximum number of the available draw buffers. The value of this variable is 1 for all OpenGL ES 2.0 implementations."
|
||||
},
|
||||
|
||||
"function float": {
|
||||
"prefix": "float",
|
||||
"body": ["float ${NAME}(){", "\t", "}"],
|
||||
"description": "A standard function that would need a return of a float value for it to work"
|
||||
},
|
||||
|
||||
"function void": {
|
||||
"prefix": "void",
|
||||
"body": ["void ${NAME}(){", "\t", "}"],
|
||||
"description": "A standard function that can be named whatever you so wish"
|
||||
},
|
||||
|
||||
"function main": {
|
||||
"prefix": "void main",
|
||||
"body": ["void main(){", "\t", "}"],
|
||||
"description": "void main(void){\n\t//code\n}\n\nThe keyword main is used to define the main function of a shader. This function is the entry point for the execution of every vertex and fragment shader. The main function takes no parameters and does not return a value."
|
||||
},
|
||||
|
||||
"void": {
|
||||
"prefix": "void",
|
||||
"body": "void main(void);",
|
||||
"description": "void main(void);\nint aFunction(void);\nvoid bFunction(float);\n\nThe data type void is used when the parameter list of a function is empty and when a function does not return a value."
|
||||
},
|
||||
|
||||
"int": {
|
||||
"prefix": "int",
|
||||
"body": "int ${NAME} = $3;",
|
||||
"description": "int aInt = 42;\nint bInt = int(aBool);\nint cInt = int(aFloat);\n\nThe data type int is used for integer values.\n\nSide note: Implicit type conversions are not supported. Type conversions can be done using constructors as shown in the second and third example."
|
||||
},
|
||||
|
||||
"float": {
|
||||
"prefix": "float",
|
||||
"body": "float ${NAME} = $3;",
|
||||
"description": "float aFloat = 1.0;\nfloat bFloat = float(aBool);\nfloat cFloat = float(aInt);\n\nThe data type bool is used for boolean values (true or false).\n\nSide note: Implicit type conversions are not supported. Type conversions can be done using constructors as shown in the second and third example."
|
||||
},
|
||||
|
||||
"bool": {
|
||||
"prefix": "bool",
|
||||
"body": "bool ${NAME} = $3;",
|
||||
"description": "bool aBool = true;\nbool bBool = bool(aInt);\nbool cBool = bool(aFloat);\n\nThe data type bool is used for boolean values (true or false).\n\nSide note: Implicit type conversions are not supported. Type conversions can be done using constructors as shown in the second and third example."
|
||||
},
|
||||
|
||||
"texture2D": {
|
||||
"prefix": "texture2D",
|
||||
"body": "texture2D",
|
||||
"description": "vec4 texture2D(sampler2D sampler, vec2 coord)\nvec4 texture2D(sampler2D sampler, vec2 coord, float bias)\n\nThe texture2D function returns a texel, i.e. the (color) value of the texture for the given coordinates. The function has one input parameter of the type sampler2D and one input parameter of the type vec2 : sampler, the uniform the texture is bound to, and coord, the 2-dimensional coordinates of the texel to look up.\n\nThere is an optional third input parameter of the type float: bias. After calculating the appropriate level of detail for a texture with mipmaps the bias is added before the actual texture lookup operation is executed.\n\nSide note: On iOS devices texture lookup functionality is only available in the fragment shader."
|
||||
},
|
||||
|
||||
"textureCube": {
|
||||
"prefix": "textureCube",
|
||||
"body": "textureCube",
|
||||
"description": "vec4 textureCube(samplerCube sampler, vec3 coord)\nvec4 textureCube(samplerCube sampler, vec3 coord, float bias)\n\nThe textureCube function returns a texel, i.e. the (color) value of the texture for the given coordinates. The function has one input parameter of the type samplerCube and one input parameter of the type vec3 : sampler, the uniform the texture is bound to, and coord, the 3-dimensional coordinates of the texel to look up.\n\nThere is an optional third input parameter of the type float: bias. After calculating the appropriate level of detail for a texture with mipmaps the bias is added before the actual texture lookup operation is executed.\n\nSide note: On iOS devices texture lookup functionality is only available in the fragment shader."
|
||||
},
|
||||
|
||||
"PI": {
|
||||
"prefix": "PI",
|
||||
"body": ["const float PI = 3.14159265359;"],
|
||||
"description": "PI setup"
|
||||
},
|
||||
|
||||
"random2d": {
|
||||
"prefix": "random2d",
|
||||
"body": [
|
||||
"float random2d(vec2 coord){",
|
||||
"\treturn fract(sin(dot(coord.xy, vec2(12.9898, 78.233))) * 43758.5453);",
|
||||
"}"
|
||||
],
|
||||
"description": "random 2d function"
|
||||
},
|
||||
|
||||
"noise1d": {
|
||||
"prefix": "noise1d",
|
||||
"body": [
|
||||
"float noise1d(float v){",
|
||||
"\treturn cos(v + cos(v * 90.1415) * 100.1415) * 0.5 + 0.5;",
|
||||
"}"
|
||||
],
|
||||
"description": "noise1d function"
|
||||
},
|
||||
|
||||
"simple setup": {
|
||||
"prefix": "simple setup",
|
||||
"body": [
|
||||
"#ifdef GL_ES",
|
||||
"precision mediump float;",
|
||||
"#endif",
|
||||
"",
|
||||
"uniform float u_time;",
|
||||
"uniform vec2 u_resolution;",
|
||||
"uniform vec2 u_mouse;",
|
||||
"",
|
||||
"void main(){",
|
||||
"\tvec2 coord = gl_FragCoord.xy;",
|
||||
"\tvec3 color = vec3(0.0);",
|
||||
"",
|
||||
"\tgl_FragColor = vec4(color, 1.0);",
|
||||
"}"
|
||||
],
|
||||
"description": "Starter code including 'ifdef' check, u_ methods & the main"
|
||||
},
|
||||
|
||||
"circle shape": {
|
||||
"prefix": "circle shape",
|
||||
"body": [
|
||||
"float ${NAME}(vec2 position, float radius){",
|
||||
"\treturn step(radius, length(position - vec2(0.5)));",
|
||||
"}"
|
||||
],
|
||||
"description": "circle shape"
|
||||
},
|
||||
|
||||
"rectangle shape": {
|
||||
"prefix": "rectangle shape",
|
||||
"body": [
|
||||
"float ${NAME}(vec2 position, vec2 scale){",
|
||||
"\tscale = vec2(0.5) - scale * 0.5;",
|
||||
"\tvec2 shaper = vec2(step(scale.x, position.x), step(scale.y, position.y));",
|
||||
"\tshaper *= vec2(step(scale.x, 1.0 - position.x), step(scale.y, 1.0 - position.y));",
|
||||
"\treturn shaper.x * shaper.y;",
|
||||
"}"
|
||||
],
|
||||
"description": "rectangle shape"
|
||||
},
|
||||
|
||||
"polygon shape": {
|
||||
"prefix": "polygon shape",
|
||||
"body": [
|
||||
"float ${NAME}(vec2 position, float radius, float sides){",
|
||||
"\tposition = position * 2.0 - 1.0;",
|
||||
"\tfloat angle = atan(position.x, position.y);",
|
||||
"\tfloat slice = PI * 2.0 / sides;",
|
||||
"\treturn step(radius, cos(floor(0.5 + angle / slice) * slice - angle) * length(position));",
|
||||
"}"
|
||||
],
|
||||
"description": "polygon shape"
|
||||
},
|
||||
|
||||
"scale": {
|
||||
"prefix": "scale",
|
||||
"body": [
|
||||
"mat2 scale(vec2 scale){",
|
||||
"\treturn mat2(scale.x, 0.0, 0.0, scale.y);",
|
||||
"}"
|
||||
],
|
||||
"description": "scale"
|
||||
},
|
||||
|
||||
"rotate": {
|
||||
"prefix": "rotate",
|
||||
"body": [
|
||||
"mat2 rotate(float angle){",
|
||||
"\treturn mat2(cos(angle), -sin(angle), sin(angle), cos(angle));",
|
||||
"}"
|
||||
],
|
||||
"description": "rotate"
|
||||
}
|
||||
}
|
||||
286
dot_vim/plugged/friendly-snippets/snippets/go.json
Normal file
286
dot_vim/plugged/friendly-snippets/snippets/go.json
Normal file
@@ -0,0 +1,286 @@
|
||||
{
|
||||
"single import": {
|
||||
"prefix": "im",
|
||||
"body": "import \"${1:package}\"",
|
||||
"description": "Snippet for import statement"
|
||||
},
|
||||
"multiple imports": {
|
||||
"prefix": "ims",
|
||||
"body": "import (\n\t\"${1:package}\"\n)",
|
||||
"description": "Snippet for a import block"
|
||||
},
|
||||
"single constant": {
|
||||
"prefix": "co",
|
||||
"body": "const ${1:name} = ${2:value}",
|
||||
"description": "Snippet for a constant"
|
||||
},
|
||||
"multiple constants": {
|
||||
"prefix": "cos",
|
||||
"body": "const (\n\t${1:name} = ${2:value}\n)",
|
||||
"description": "Snippet for a constant block"
|
||||
},
|
||||
"type function declaration": {
|
||||
"prefix": "tyf",
|
||||
"body": "type ${1:name} func($3) $4",
|
||||
"description": "Snippet for a type function declaration"
|
||||
},
|
||||
"type interface declaration": {
|
||||
"prefix": "tyi",
|
||||
"body": "type ${1:name} interface {\n\t$0\n}",
|
||||
"description": "Snippet for a type interface"
|
||||
},
|
||||
"type struct declaration": {
|
||||
"prefix": "tys",
|
||||
"body": "type ${1:name} struct {\n\t$0\n}",
|
||||
"description": "Snippet for a struct declaration"
|
||||
},
|
||||
"package main and main function": {
|
||||
"prefix": "pkgm",
|
||||
"body": "package main\n\nfunc main() {\n\t$0\n}",
|
||||
"description": "Snippet for main package & function"
|
||||
},
|
||||
"function declaration": {
|
||||
"prefix": "func",
|
||||
"body": "func $1($2) $3 {\n\t$0\n}",
|
||||
"description": "Snippet for function declaration"
|
||||
},
|
||||
"variable declaration": {
|
||||
"prefix": "var",
|
||||
"body": "var ${1:name} ${2:type}",
|
||||
"description": "Snippet for a variable"
|
||||
},
|
||||
"variables declaration": {
|
||||
"prefix": "vars",
|
||||
"body": "var (\n\t${1:name} ${2:type} = ${3:value}\n)",
|
||||
"description": "Snippet for a variable"
|
||||
},
|
||||
"switch statement": {
|
||||
"prefix": "switch",
|
||||
"body": "switch ${1:expression} {\ncase ${2:condition}:\n\t$0\n}",
|
||||
"description": "Snippet for switch statement"
|
||||
},
|
||||
"select statement": {
|
||||
"prefix": "sel",
|
||||
"body": "select {\ncase ${1:condition}:\n\t$0\n}",
|
||||
"description": "Snippet for select statement"
|
||||
},
|
||||
"case clause": {
|
||||
"prefix": "cs",
|
||||
"body": "case ${1:condition}:$0",
|
||||
"description": "Snippet for case clause"
|
||||
},
|
||||
"for statement": {
|
||||
"prefix": "for",
|
||||
"body": "for ${1}{\n\t$0\n}",
|
||||
"description": "Snippet for a pure for loop"
|
||||
},
|
||||
"for n statement": {
|
||||
"prefix": "fori",
|
||||
"body": "for ${1:i} := ${2:0}; $1 < ${3:count}; $1${4:++} {\n\t$0\n}",
|
||||
"description": "Snippet for a for loop"
|
||||
},
|
||||
"for range statement": {
|
||||
"prefix": "forr",
|
||||
"body": "for ${1:_, }${2:v} := range ${3:v} {\n\t$0\n}",
|
||||
"description": "Snippet for a for range loop"
|
||||
},
|
||||
"channel declaration": {
|
||||
"prefix": "ch",
|
||||
"body": "chan ${1:type}",
|
||||
"description": "Snippet for a channel"
|
||||
},
|
||||
"map declaration": {
|
||||
"prefix": "map",
|
||||
"body": "map[${1:type}]${2:type}",
|
||||
"description": "Snippet for a map"
|
||||
},
|
||||
"empty interface": {
|
||||
"prefix": "in",
|
||||
"body": "interface{}",
|
||||
"description": "Snippet for empty interface"
|
||||
},
|
||||
"if statement": {
|
||||
"prefix": "if",
|
||||
"body": "if ${1:condition} {\n\t$0\n}",
|
||||
"description": "Snippet for if statement"
|
||||
},
|
||||
"else branch": {
|
||||
"prefix": "el",
|
||||
"body": "else {\n\t$0\n}",
|
||||
"description": "Snippet for else branch"
|
||||
},
|
||||
"if else statement": {
|
||||
"prefix": "ife",
|
||||
"body": "if ${1:condition} {\n\t$2\n} else {\n\t$0\n}",
|
||||
"description": "Snippet for if else"
|
||||
},
|
||||
"if err != nil": {
|
||||
"prefix": "ir",
|
||||
"body": "if err != nil {\n\t${1:return ${2:nil, }${3:err}}\n}",
|
||||
"description": "Snippet for if err != nil"
|
||||
},
|
||||
"fmt.Println": {
|
||||
"prefix": "fp",
|
||||
"body": "fmt.Println(\"$1\")",
|
||||
"description": "Snippet for fmt.Println()"
|
||||
},
|
||||
"fmt.Printf": {
|
||||
"prefix": "ff",
|
||||
"body": "fmt.Printf(\"$1\", ${2:var})",
|
||||
"description": "Snippet for fmt.Printf()"
|
||||
},
|
||||
"log.Println": {
|
||||
"prefix": "lp",
|
||||
"body": "log.Println(\"$1\")",
|
||||
"description": "Snippet for log.Println()"
|
||||
},
|
||||
"log.Printf": {
|
||||
"prefix": "lf",
|
||||
"body": "log.Printf(\"$1\", ${2:var})",
|
||||
"description": "Snippet for log.Printf()"
|
||||
},
|
||||
"log variable content": {
|
||||
"prefix": "lv",
|
||||
"body": "log.Printf(\"${1:var}: %#+v\\\\n\", ${1:var})",
|
||||
"description": "Snippet for log.Printf() with variable content"
|
||||
},
|
||||
"t.Log": {
|
||||
"prefix": "tl",
|
||||
"body": "t.Log(\"$1\")",
|
||||
"description": "Snippet for t.Log()"
|
||||
},
|
||||
"t.Logf": {
|
||||
"prefix": "tlf",
|
||||
"body": "t.Logf(\"$1\", ${2:var})",
|
||||
"description": "Snippet for t.Logf()"
|
||||
},
|
||||
"t.Logf variable content": {
|
||||
"prefix": "tlv",
|
||||
"body": "t.Logf(\"${1:var}: %#+v\\\\n\", ${1:var})",
|
||||
"description": "Snippet for t.Logf() with variable content"
|
||||
},
|
||||
"make(...)": {
|
||||
"prefix": "make",
|
||||
"body": "make(${1:type}, ${2:0})",
|
||||
"description": "Snippet for make statement"
|
||||
},
|
||||
"new(...)": {
|
||||
"prefix": "new",
|
||||
"body": "new(${1:type})",
|
||||
"description": "Snippet for new statement"
|
||||
},
|
||||
"panic(...)": {
|
||||
"prefix": "pn",
|
||||
"body": "panic(\"$0\")",
|
||||
"description": "Snippet for panic"
|
||||
},
|
||||
"http ResponseWriter *Request": {
|
||||
"prefix": "wr",
|
||||
"body": "${1:w} http.ResponseWriter, ${2:r} *http.Request",
|
||||
"description": "Snippet for http Response"
|
||||
},
|
||||
"http.HandleFunc": {
|
||||
"prefix": "hf",
|
||||
"body": "${1:http}.HandleFunc(\"${2:/}\", ${3:handler})",
|
||||
"description": "Snippet for http.HandleFunc()"
|
||||
},
|
||||
"http handler declaration": {
|
||||
"prefix": "hand",
|
||||
"body": "func $1(${2:w} http.ResponseWriter, ${3:r} *http.Request) {\n\t$0\n}",
|
||||
"description": "Snippet for http handler declaration"
|
||||
},
|
||||
"http.Redirect": {
|
||||
"prefix": "rd",
|
||||
"body": "http.Redirect(${1:w}, ${2:r}, \"${3:/}\", ${4:http.StatusFound})",
|
||||
"description": "Snippet for http.Redirect()"
|
||||
},
|
||||
"http.Error": {
|
||||
"prefix": "herr",
|
||||
"body": "http.Error(${1:w}, ${2:err}.Error(), ${3:http.StatusInternalServerError})",
|
||||
"description": "Snippet for http.Error()"
|
||||
},
|
||||
"http.ListenAndServe": {
|
||||
"prefix": "las",
|
||||
"body": "http.ListenAndServe(\"${1::8080}\", ${2:nil})",
|
||||
"description": "Snippet for http.ListenAndServe"
|
||||
},
|
||||
"http.Serve": {
|
||||
"prefix": "sv",
|
||||
"body": "http.Serve(\"${1::8080}\", ${2:nil})",
|
||||
"description": "Snippet for http.Serve"
|
||||
},
|
||||
"goroutine anonymous function": {
|
||||
"prefix": "go",
|
||||
"body": "go func($1) {\n\t$0\n}($2)",
|
||||
"description": "Snippet for anonymous goroutine declaration"
|
||||
},
|
||||
"goroutine function": {
|
||||
"prefix": "gf",
|
||||
"body": "go ${1:func}($0)",
|
||||
"description": "Snippet for goroutine declaration"
|
||||
},
|
||||
"defer statement": {
|
||||
"prefix": "df",
|
||||
"body": "defer ${1:func}($0)",
|
||||
"description": "Snippet for defer statement"
|
||||
},
|
||||
"test function": {
|
||||
"prefix": "tf",
|
||||
"body": "func Test$1(t *testing.T) {\n\t$0\n}",
|
||||
"description": "Snippet for Test function"
|
||||
},
|
||||
"test main": {
|
||||
"prefix": "tm",
|
||||
"body": "func TestMain(m *testing.M) {\n\t$1\n\n\tos.Exit(m.Run())\n}",
|
||||
"description": "Snippet for TestMain function"
|
||||
},
|
||||
"benchmark function": {
|
||||
"prefix": "bf",
|
||||
"body": "func Benchmark$1(b *testing.B) {\n\tfor ${2:i} := 0; ${2:i} < b.N; ${2:i}++ {\n\t\t$0\n\t}\n}",
|
||||
"description": "Snippet for Benchmark function"
|
||||
},
|
||||
"example function": {
|
||||
"prefix": "ef",
|
||||
"body": "func Example$1() {\n\t$2\n\t//Output:\n\t$3\n}",
|
||||
"description": "Snippet for Example function"
|
||||
},
|
||||
"table driven test": {
|
||||
"prefix": "tdt",
|
||||
"body": "func Test$1(t *testing.T) {\n\ttestCases := []struct {\n\t\tdesc\tstring\n\t\t$2\n\t}{\n\t\t{\n\t\t\tdesc: \"$3\",\n\t\t\t$4\n\t\t},\n\t}\n\tfor _, tC := range testCases {\n\t\tt.Run(tC.desc, func(t *testing.T) {\n\t\t\t$0\n\t\t})\n\t}\n}",
|
||||
"description": "Snippet for table driven test"
|
||||
},
|
||||
"init function": {
|
||||
"prefix": "finit",
|
||||
"body": "func init() {\n\t$1\n}",
|
||||
"description": "Snippet for init function"
|
||||
},
|
||||
"main function": {
|
||||
"prefix": "fmain",
|
||||
"body": "func main() {\n\t$1\n}",
|
||||
"description": "Snippet for main function"
|
||||
},
|
||||
"method declaration": {
|
||||
"prefix": ["meth", "fum"],
|
||||
"body": "func (${1:receiver} ${2:type}) ${3:method}($4) $5 {\n\t$0\n}",
|
||||
"description": "Snippet for method declaration"
|
||||
},
|
||||
"hello world web app": {
|
||||
"prefix": "helloweb",
|
||||
"body": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"time\"\n)\n\nfunc greet(w http.ResponseWriter, r *http.Request) {\n\tfmt.Fprintf(w, \"Hello World! %s\", time.Now())\n}\n\nfunc main() {\n\thttp.HandleFunc(\"/\", greet)\n\thttp.ListenAndServe(\":8080\", nil)\n}",
|
||||
"description": "Snippet for sample hello world webapp"
|
||||
},
|
||||
"sort implementation": {
|
||||
"prefix": "sort",
|
||||
"body": "type ${1:SortBy} []${2:Type}\n\nfunc (a $1) Len() int { return len(a) }\nfunc (a $1) Swap(i, j int) { a[i], a[j] = a[j], a[i] }\nfunc (a $1) Less(i, j int) bool { ${3:return a[i] < a[j]} }",
|
||||
"description": "Snippet for a custom sort.Sort interface implementation, for a given slice type."
|
||||
},
|
||||
"json tag": {
|
||||
"prefix": "json",
|
||||
"body": "`json:\"$1\"`",
|
||||
"description": "Snippet for struct json tag"
|
||||
},
|
||||
"if key in a map": {
|
||||
"prefix": "om",
|
||||
"body": "if ${1:value}, ok := ${2:map}[${3:key}]; ok == true {\n\t$4\n}"
|
||||
}
|
||||
}
|
||||
160
dot_vim/plugged/friendly-snippets/snippets/haskell.json
Normal file
160
dot_vim/plugged/friendly-snippets/snippets/haskell.json
Normal file
@@ -0,0 +1,160 @@
|
||||
{
|
||||
"case": {
|
||||
"prefix": ["case"],
|
||||
"body": [
|
||||
"case ${1:expression} of",
|
||||
"\t${2:case1} -> ${3:result}",
|
||||
"\t${4:case2} -> ${5:result}$0"
|
||||
],
|
||||
"description": "Case statement"
|
||||
},
|
||||
"block_comment": {
|
||||
"prefix": ["--", "comment", "block_comment"],
|
||||
"body": ["{- $0 -}"],
|
||||
"description": "Block Comment"
|
||||
},
|
||||
"data_inline": {
|
||||
"prefix": ["data inline"],
|
||||
"body": ["data ${1:type} = ${2:data}$0 ${3:deriving (${4:Show, Eq})}"],
|
||||
"description": "Inline data"
|
||||
},
|
||||
"data_record": {
|
||||
"prefix": ["data record"],
|
||||
"body": [
|
||||
"data ${1:Type} = $1",
|
||||
"\t{ ${2:field} :: ${3:Type}",
|
||||
"\t, ${4:field} :: ${5:Type}$0",
|
||||
"\t} ${6:deriving (${7:Show, Eq})}"
|
||||
],
|
||||
"description": "Data record"
|
||||
},
|
||||
"fn": {
|
||||
"prefix": ["fns", "simple function"],
|
||||
"body": [
|
||||
"${1:f} :: ${2:a} ${3:-> ${4:b}}",
|
||||
"$1 ${5:x} = ${6:undefined}$0 "
|
||||
],
|
||||
"description": "Simple function"
|
||||
},
|
||||
"fn_clause": {
|
||||
"prefix": ["fnc", "clause function"],
|
||||
"body": [
|
||||
"${1:f} :: ${2:a} ${3:-> ${4:b}}",
|
||||
"$1 ${5:pattern} = ${7:undefined}",
|
||||
"$1 ${6:pattern} = ${8:undefined}$0"
|
||||
],
|
||||
"description": "Clause function"
|
||||
},
|
||||
"fn_guarded": {
|
||||
"prefix": ["fng" ,"guarded function"],
|
||||
"body": [
|
||||
"${1:f} :: ${2:a} ${3:-> ${4:b}}",
|
||||
"$1 ${5:x}",
|
||||
"\t| ${6:condition} = ${8:undefined}",
|
||||
"\t| ${7:condition} = ${9:undefined}$0"
|
||||
],
|
||||
"description": "Guarded function"
|
||||
},
|
||||
"fn_where": {
|
||||
"prefix": ["fnw" ,"where function"],
|
||||
"body": [
|
||||
"${1:f} :: ${2:a} ${3:-> ${4:b}}",
|
||||
"$1 ${5:x} = ${6:undefined}$0",
|
||||
"\twhere",
|
||||
"\t\t${7:exprs}"
|
||||
],
|
||||
"description": "Function with where"
|
||||
},
|
||||
"get": {
|
||||
"prefix": ["get"],
|
||||
"body": ["${1:x} <- ${2:undefined}$0"],
|
||||
"description": "Monadic get"
|
||||
},
|
||||
"if_inline": {
|
||||
"prefix": ["if inline"],
|
||||
"body": [
|
||||
"if ${1:condition} then ${2:undefined} else ${3:undefined}$0,"
|
||||
],
|
||||
"description": "If inline"
|
||||
},
|
||||
"if": {
|
||||
"prefix": ["if simple"],
|
||||
"body": [
|
||||
"if ${1:condition}",
|
||||
"\tthen ${2:undefined}",
|
||||
"\telse ${3:undefined}$0"
|
||||
],
|
||||
"description": "If block"
|
||||
},
|
||||
"import": {
|
||||
"prefix": ["import simple"],
|
||||
"body": ["import ${1:module} ${2:(${3:f})}$0"],
|
||||
"description": "Simple import"
|
||||
},
|
||||
"import_qualified": {
|
||||
"prefix": ["import qual"],
|
||||
"body": ["import qualified ${1:module} as ${2:name}"],
|
||||
"description": "Qualified import"
|
||||
},
|
||||
"instance": {
|
||||
"prefix": ["inst"],
|
||||
"body": [
|
||||
"instance ${1:Class} ${2:Data} where",
|
||||
"\t${3:f} = ${4:undefined}$0"
|
||||
],
|
||||
"description": "typeclass instance"
|
||||
},
|
||||
"lambda": {
|
||||
"prefix": ["\\", "lambda"],
|
||||
"body": ["\\${1:x} -> ${2:undefined}$0"],
|
||||
"description": "lambda function"
|
||||
},
|
||||
"pragma": {
|
||||
"prefix": ["lang"],
|
||||
"body": ["{-# LANGUAGE ${1:extension} #-}$0"],
|
||||
"description": "Language extension pragma"
|
||||
},
|
||||
"let": {
|
||||
"prefix": ["let"],
|
||||
"body": ["let ${1:x} = ${2:undefined}$0"],
|
||||
"description": "let statement"
|
||||
},
|
||||
"main": {
|
||||
"prefix": ["main"],
|
||||
"body": [
|
||||
"module Main where",
|
||||
"",
|
||||
"",
|
||||
"main :: IO ()",
|
||||
"main = do",
|
||||
"\t${1:undefined}$0",
|
||||
"return ()"
|
||||
],
|
||||
"description": "main module"
|
||||
},
|
||||
"module": {
|
||||
"prefix": ["mods", "mod simple"],
|
||||
"body": ["module ${1:mod} where$0"],
|
||||
"description": "simple module"
|
||||
},
|
||||
"module exports": {
|
||||
"prefix": ["modu", "mod exports"],
|
||||
"body": [
|
||||
"module ${1:mod} (",
|
||||
"\t\t${2:export}",
|
||||
"\t${3:, ${4:export}}",
|
||||
") where$0"
|
||||
],
|
||||
"description": "simple module with exports"
|
||||
},
|
||||
"newtype": {
|
||||
"prefix": ["new"],
|
||||
"body": ["newtype ${1:Type} ${2:a} = $1 { un$1 :: ${3:a} } ${4:deriving (${5:Show, Eq})}$0"],
|
||||
"description": "Newtype definition"
|
||||
},
|
||||
"opt pragma": {
|
||||
"prefix": ["opt"],
|
||||
"body": ["{-# OPTIONS_GHC ${1:opt} #-}$0"],
|
||||
"description": "GHC options pragma"
|
||||
}
|
||||
}
|
||||
693
dot_vim/plugged/friendly-snippets/snippets/html.json
Normal file
693
dot_vim/plugged/friendly-snippets/snippets/html.json
Normal file
@@ -0,0 +1,693 @@
|
||||
{
|
||||
"doctype": {
|
||||
"prefix": "doctype",
|
||||
"body": ["<!DOCTYPE>", "$1"],
|
||||
"description": "HTML - Defines the document type",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"a": {
|
||||
"prefix": "a",
|
||||
"body": "<a href=\"$1\">$2</a>$3",
|
||||
"description": "HTML - Defines a hyperlink",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"abbr": {
|
||||
"prefix": "abbr",
|
||||
"body": "<abbr title=\"$1\">$2</abbr>$3",
|
||||
"description": "HTML - Defines an abbreviation",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"address": {
|
||||
"prefix": "address",
|
||||
"body": ["<address>", "$1", "</address>"],
|
||||
"description": "HTML - Defines an address element",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"area": {
|
||||
"prefix": "area",
|
||||
"body": "<area shape=\"$1\" coords=\"$2\" href=\"$3\" alt=\"$4\">$5",
|
||||
"description": "HTML - Defines an area inside an image map",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"article": {
|
||||
"prefix": "article",
|
||||
"body": ["<article>", "\t$1", "</article>"],
|
||||
"description": "HTML - Defines an article",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"aside": {
|
||||
"prefix": "aside",
|
||||
"body": ["<aside>", "\t$1", "</aside>$2"],
|
||||
"description": "HTML - Defines content aside from the page content",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"audio": {
|
||||
"prefix": "audio",
|
||||
"body": ["<audio controls>", "\t$1", "</audio>"],
|
||||
"description": "HTML - Defines sounds content",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"b": {
|
||||
"prefix": "b",
|
||||
"body": "<b>$1</b>$2",
|
||||
"description": "HTML - Defines bold text",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"base": {
|
||||
"prefix": "base",
|
||||
"body": "<base href=\"$1\" target=\"$2\">$3",
|
||||
"description": "HTML - Defines a base URL for all the links in a page",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"bdi": {
|
||||
"prefix": "bdi",
|
||||
"body": "<bdi>$1</bdi>$2",
|
||||
"description": "HTML - Used to isolate text that is of unknown directionality",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"bdo": {
|
||||
"prefix": "bdo",
|
||||
"body": ["<bdo dir=\"$1\">", "$2", "</bdo>"],
|
||||
"description": "HTML - Defines the direction of text display",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"big": {
|
||||
"prefix": "big",
|
||||
"body": "<big>$1</big>$2",
|
||||
"description": "HTML - Used to make text bigger",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"blockquote": {
|
||||
"prefix": "blockquote",
|
||||
"body": ["<blockquote cite=\"$2\">", "\t$1", "</blockquote>"],
|
||||
"description": "HTML - Defines a long quotation",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"body": {
|
||||
"prefix": "body",
|
||||
"body": ["<body>", "\t$0", "</body>"],
|
||||
"description": "HTML - Defines the body element",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"br": {
|
||||
"prefix": "br",
|
||||
"body": "<br>",
|
||||
"description": "HTML - Inserts a single line break",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"button": {
|
||||
"prefix": "button",
|
||||
"body": "<button type=\"$1\">$2</button>$3",
|
||||
"description": "HTML - Defines a push button",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"canvas": {
|
||||
"prefix": "canvas",
|
||||
"body": "<canvas id=\"$1\">$2</canvas>$3",
|
||||
"description": "HTML - Defines graphics",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"caption": {
|
||||
"prefix": "caption",
|
||||
"body": "<caption>$1</caption>$2",
|
||||
"description": "HTML - Defines a table caption",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"cite": {
|
||||
"prefix": "cite",
|
||||
"body": "<cite>$1</cite>$2",
|
||||
"description": "HTML - Defines a citation",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"code": {
|
||||
"prefix": "code",
|
||||
"body": "<code>$1</code>$2",
|
||||
"description": "HTML - Defines computer code text",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"col": {
|
||||
"prefix": "col",
|
||||
"body": "<col>$2",
|
||||
"description": "HTML - Defines attributes for table columns",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"colgroup": {
|
||||
"prefix": "colgroup",
|
||||
"body": ["<colgroup>", "\t$1", "</colgroup>"],
|
||||
"description": "HTML - Defines group of table columns",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"command": {
|
||||
"prefix": "command",
|
||||
"body": "<command>$1</command>$2",
|
||||
"description": "HTML - Defines a command button [not supported]",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"datalist": {
|
||||
"prefix": "datalist",
|
||||
"body": ["<datalist>", "\t$1", "</datalist>"],
|
||||
"description": "HTML - Defines a dropdown list",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"dd": {
|
||||
"prefix": "dd",
|
||||
"body": "<dd>$1</dd>$2",
|
||||
"description": "HTML - Defines a definition description",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"del": {
|
||||
"prefix": "del",
|
||||
"body": "<del>$1</del>$2",
|
||||
"description": "HTML - Defines deleted text",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"details": {
|
||||
"prefix": "details",
|
||||
"body": ["<details>", "\t$1", "</details>"],
|
||||
"description": "HTML - Defines details of an element",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"dialog": {
|
||||
"prefix": "dialog",
|
||||
"body": "<dialog>$1</dialog>$2",
|
||||
"description": "HTML - Defines a dialog (conversation)",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"dfn": {
|
||||
"prefix": "dfn",
|
||||
"body": "<dfn>$1</dfn>$2",
|
||||
"description": "HTML - Defines a definition term",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"div": {
|
||||
"prefix": "div",
|
||||
"body": ["<div>", "\t$1", "</div>"],
|
||||
"description": "HTML - Defines a section in a document",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"dl": {
|
||||
"prefix": "dl",
|
||||
"body": ["<dl>", "\t$1", "</dl>"],
|
||||
"description": "HTML - Defines a definition list",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"dt": {
|
||||
"prefix": "dt",
|
||||
"body": "<dt>$1</dt>$2",
|
||||
"description": "HTML - Defines a definition term",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"em": {
|
||||
"prefix": "em",
|
||||
"body": "<em>$1</em>$2",
|
||||
"description": "HTML - Defines emphasized text",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"embed": {
|
||||
"prefix": "embed",
|
||||
"body": "<embed src=\"$1\">$2",
|
||||
"description": "HTML - Defines external interactive content ot plugin",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"fieldset": {
|
||||
"prefix": "fieldset",
|
||||
"body": ["<fieldset>", "\t$1", "</fieldset>"],
|
||||
"description": "HTML - Defines a fieldset",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"figcaption": {
|
||||
"prefix": "figcaption",
|
||||
"body": "<figcaption>$1</figcaption>$2",
|
||||
"description": "HTML - Defines a caption for a figure",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"figure": {
|
||||
"prefix": "figure",
|
||||
"body": ["<figure>", "\t$1", "</figure>"],
|
||||
"description": "HTML - Defines a group of media content, and their caption",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"footer": {
|
||||
"prefix": "footer",
|
||||
"body": ["<footer>", "\t$1", "</footer>"],
|
||||
"description": "HTML - Defines a footer for a section or page",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"form": {
|
||||
"prefix": "form",
|
||||
"body": ["<form>", "\t$1", "</form>"],
|
||||
"description": "HTML - Defines a form",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"h1": {
|
||||
"prefix": "h1",
|
||||
"body": "<h1>$1</h1>$2",
|
||||
"description": "HTML - Defines header 1",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"h2": {
|
||||
"prefix": "h2",
|
||||
"body": "<h2>$1</h2>$2",
|
||||
"description": "HTML - Defines header 2",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"h3": {
|
||||
"prefix": "h3",
|
||||
"body": "<h3>$1</h3>$2",
|
||||
"description": "HTML - Defines header 3",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"h4": {
|
||||
"prefix": "h4",
|
||||
"body": "<h4>$1</h4>$2",
|
||||
"description": "HTML - Defines header 4",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"h5": {
|
||||
"prefix": "h5",
|
||||
"body": "<h5>$1</h5>$2",
|
||||
"description": "HTML - Defines header 5",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"h6": {
|
||||
"prefix": "h6",
|
||||
"body": "<h6>$1</h6>$2",
|
||||
"description": "HTML - Defines header 6",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"head": {
|
||||
"prefix": "head",
|
||||
"body": ["<head>", "\t$1", "</head>"],
|
||||
"description": "HTML - Defines information about the document",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"header": {
|
||||
"prefix": "header",
|
||||
"body": ["<header>", "\t$1", "</header>"],
|
||||
"description": "HTML - Defines a header for a section of page",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"hgroup": {
|
||||
"prefix": "hgroup",
|
||||
"body": ["<hgroup>", "\t$1", "</hgroup>"],
|
||||
"description": "HTML - Defines information about a section in a document",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"hr": {
|
||||
"prefix": "hr",
|
||||
"body": "<hr>",
|
||||
"description": "HTML - Defines a horizontal rule",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"html": {
|
||||
"prefix": "html",
|
||||
"body": ["<html>", "\t$0", "</html>"],
|
||||
"description": "HTML - Defines an html document",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"html5": {
|
||||
"prefix": "html5",
|
||||
"body": [
|
||||
"<!DOCTYPE html>",
|
||||
"<html lang=\"$1en\">",
|
||||
"\t<head>",
|
||||
"\t\t<title>$2</title>",
|
||||
"\t\t<meta charset=\"UTF-8\">",
|
||||
"\t\t<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">",
|
||||
"\t\t<link href=\"$3css/style.css\" rel=\"stylesheet\">",
|
||||
"\t</head>",
|
||||
"\t<body>",
|
||||
"\t$0",
|
||||
"\t</body>",
|
||||
"</html>"
|
||||
],
|
||||
"description": "HTML - Defines a template for a html5 document",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"i": {
|
||||
"prefix": "i",
|
||||
"body": "<i>$1</i>$2",
|
||||
"description": "HTML - Defines italic text",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"iframe": {
|
||||
"prefix": "iframe",
|
||||
"body": "<iframe src=\"$1\">$2</iframe>$3",
|
||||
"description": "HTML - Defines an inline sub window",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"img": {
|
||||
"prefix": "img",
|
||||
"body": "<img src=\"$1\" alt=\"$2\">$3",
|
||||
"description": "HTML - Defines an image",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"input": {
|
||||
"prefix": "input",
|
||||
"body": "<input type=\"$1\" name=\"$2\" value=\"$3\">$4",
|
||||
"description": "HTML - Defines an input field",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"ins": {
|
||||
"prefix": "ins",
|
||||
"body": "<ins>$1</ins>$2",
|
||||
"description": "HTML - Defines inserted text",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"keygen": {
|
||||
"prefix": "keygen",
|
||||
"body": "<keygen name=\"$1\">$2",
|
||||
"description": "HTML - Defines a generated key in a form",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"kbd": {
|
||||
"prefix": "kbd",
|
||||
"body": "<kbd>$1</kbd>$2",
|
||||
"description": "HTML - Defines keyboard text",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"label": {
|
||||
"prefix": "label",
|
||||
"body": "<label for=\"$1\">$2</label>$3",
|
||||
"description": "HTML - Defines an inline window",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"legend": {
|
||||
"prefix": "legend",
|
||||
"body": "<legend>$1</legend>$2",
|
||||
"description": "HTML - Defines a title in a fieldset",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"li": {
|
||||
"prefix": "li",
|
||||
"body": "<li>$1</li>$2",
|
||||
"description": "HTML - Defines a list item",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"link": {
|
||||
"prefix": "link",
|
||||
"body": "<link rel=\"$1\" type=\"$2\" href=\"$3\">$4",
|
||||
"description": "HTML - Defines a resource reference",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"main": {
|
||||
"prefix": "main",
|
||||
"body": ["<main>", "\t$1", "</main>"],
|
||||
"description": "HTML - Defines an image map",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"map": {
|
||||
"prefix": "map",
|
||||
"body": ["<map name=\"$1\">", "\t$2", "</map>"],
|
||||
"description": "HTML - Defines an image map",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"mark": {
|
||||
"prefix": "mark",
|
||||
"body": "<mark>$1</mark>$2",
|
||||
"description": "HTML - Defines marked text",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"menu": {
|
||||
"prefix": "menu",
|
||||
"body": ["<menu>", "\t$1", "</menu>"],
|
||||
"description": "HTML - Defines a menu list",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"menuitem": {
|
||||
"prefix": "menuitem",
|
||||
"body": "<menuitem>$1</menuitem>$2",
|
||||
"description": "HTML - Defines a menu item [firefox only]",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"meta": {
|
||||
"prefix": "meta",
|
||||
"body": "<meta name=\"$1\" content=\"$2\">$3",
|
||||
"description": "HTML - Defines meta information",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"meter": {
|
||||
"prefix": "meter",
|
||||
"body": "<meter value=\"$1\">$2</meter>$3",
|
||||
"description": "HTML - Defines measurement within a predefined range",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"nav": {
|
||||
"prefix": "nav",
|
||||
"body": ["<nav>", "\t$1", "</nav>"],
|
||||
"description": "HTML - Defines navigation links",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"noscript": {
|
||||
"prefix": "noscript",
|
||||
"body": ["<noscript>", "$1", "</noscript>"],
|
||||
"description": "HTML - Defines a noscript section",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"object": {
|
||||
"prefix": "object",
|
||||
"body": "<object width=\"$1\" height=\"$2\" data=\"$3\">$4</object>$5",
|
||||
"description": "HTML - Defines an embedded object",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"ol": {
|
||||
"prefix": "ol",
|
||||
"body": ["<ol>", "\t$1", "</ol>"],
|
||||
"description": "HTML - Defines an ordered list",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"optgroup": {
|
||||
"prefix": "optgroup",
|
||||
"body": ["<optgroup>", "\t$1", "</optgroup>"],
|
||||
"description": "HTML - Defines an option group",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"option": {
|
||||
"prefix": "option",
|
||||
"body": "<option value=\"$1\">$2</option>$3",
|
||||
"description": "HTML - Defines an option in a drop-down list",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"output": {
|
||||
"prefix": "output",
|
||||
"body": "<output name=\"$1\" for=\"$2\">$3</output>$4",
|
||||
"description": "HTML - Defines some types of output",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"p": {
|
||||
"prefix": "p",
|
||||
"body": "<p>$1</p>$2",
|
||||
"description": "HTML - Defines a paragraph",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"param": {
|
||||
"prefix": "param",
|
||||
"body": "<param name=\"$1\" value=\"$2\">$3",
|
||||
"description": "HTML - Defines a parameter for an object",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"pre": {
|
||||
"prefix": "pre",
|
||||
"body": ["<pre>$1</pre>"],
|
||||
"description": "HTML - Defines preformatted text",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"progress": {
|
||||
"prefix": "progress",
|
||||
"body": "<progress value=\"$1\" max=\"$2\">$3</progress>$4",
|
||||
"description": "HTML - Defines progress of a task of any kind",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"q": {
|
||||
"prefix": "q",
|
||||
"body": "<q>$1</q>$2",
|
||||
"description": "HTML - Defines a short quotation",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"rp": {
|
||||
"prefix": "rp",
|
||||
"body": "<rp>$1</rp>$2",
|
||||
"description": "HTML - Used in ruby annotations to define what to show browsers that do not support the ruby element",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"rt": {
|
||||
"prefix": "rt",
|
||||
"body": "<rt>$1</rt>$2",
|
||||
"description": "HTML - Defines explanation to ruby annotations",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"ruby": {
|
||||
"prefix": "ruby",
|
||||
"body": ["<ruby>", "$1", "</ruby>"],
|
||||
"description": "HTML - Defines ruby annotations",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"s": {
|
||||
"prefix": "s",
|
||||
"body": "<s>$1</s>$2",
|
||||
"description": "HTML - Used to define strikethrough text",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"samp": {
|
||||
"prefix": "samp",
|
||||
"body": "<samp>$1</samp>$2",
|
||||
"description": "HTML - Defines sample computer code",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"script": {
|
||||
"prefix": "script",
|
||||
"body": ["<script>", "\t$1", "</script>"],
|
||||
"description": "HTML - Defines a script",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"section": {
|
||||
"prefix": "section",
|
||||
"body": ["<section>", "\t$1", "</section>"],
|
||||
"description": "HTML - Defines a section",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"select": {
|
||||
"prefix": "select",
|
||||
"body": ["<select>", "\t$1", "</select>"],
|
||||
"description": "HTML - Defines a selectable list",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"small": {
|
||||
"prefix": "small",
|
||||
"body": "<small>$1</small>$2",
|
||||
"description": "HTML - Defines small text",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"source": {
|
||||
"prefix": "source",
|
||||
"body": "<source src=\"$1\" type=\"$2\">$3",
|
||||
"description": "HTML - Defines media resource",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"span": {
|
||||
"prefix": "span",
|
||||
"body": "<span>$1</span>$2",
|
||||
"description": "HTML - Defines a section in a document",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"strong": {
|
||||
"prefix": "strong",
|
||||
"body": "<strong>$1</strong>$2",
|
||||
"description": "HTML - Defines strong text",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"style": {
|
||||
"prefix": "style",
|
||||
"body": ["<style>", "$1", "</style>"],
|
||||
"description": "HTML - Defines a style definition",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"sub": {
|
||||
"prefix": "sub",
|
||||
"body": "<sub>$1</sub>$2",
|
||||
"description": "HTML - Defines sub-scripted text",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"sup": {
|
||||
"prefix": "sup",
|
||||
"body": "<sup>$1</sup>$2",
|
||||
"description": "HTML - Defines super-scripted text",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"summary": {
|
||||
"prefix": "summary",
|
||||
"body": "<summary>$1</summary>$2",
|
||||
"description": "HTML - Defines a visible heading for the detail element [limited support]",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"table": {
|
||||
"prefix": "table",
|
||||
"body": ["<table>", "\t$1", "</table>"],
|
||||
"description": "HTML - Defines a table",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"tbody": {
|
||||
"prefix": "tbody",
|
||||
"body": ["<tbody>", "\t$1", "</tbody>"],
|
||||
"description": "HTML - Defines a table body",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"td": {
|
||||
"prefix": "td",
|
||||
"body": "<td>$1</td>$2",
|
||||
"description": "HTML - Defines a table cell",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"textarea": {
|
||||
"prefix": "textarea",
|
||||
"body": "<textarea rows=\"$1\" cols=\"$2\">$3</textarea>$4",
|
||||
"description": "HTML - Defines a text area",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"tfoot": {
|
||||
"prefix": "tfoot",
|
||||
"body": ["<tfoot>", "\t$1", "</tfoot>"],
|
||||
"description": "HTML - Defines a table footer",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"thead": {
|
||||
"prefix": "thead",
|
||||
"body": ["<thead>", "$1", "</thead>"],
|
||||
"description": "HTML - Defines a table head",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"th": {
|
||||
"prefix": "th",
|
||||
"body": "<th>$1</th>$2",
|
||||
"description": "HTML - Defines a table header",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"time": {
|
||||
"prefix": "time",
|
||||
"body": "<time datetime=\"$1\">$2</time>$3",
|
||||
"description": "HTML - Defines a date/time",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"title": {
|
||||
"prefix": "title",
|
||||
"body": "<title>$1</title>$2",
|
||||
"description": "HTML - Defines the document title",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"tr": {
|
||||
"prefix": "tr",
|
||||
"body": "<tr>$1</tr>$2",
|
||||
"description": "HTML - Defines a table row",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"track": {
|
||||
"prefix": "track",
|
||||
"body": "<track src=\"$1\" kind=\"$2\" srclang=\"$3\" label=\"$4\">$5",
|
||||
"description": "HTML - Defines a table row",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"u": {
|
||||
"prefix": "u",
|
||||
"body": "<u>$1</u>$2",
|
||||
"description": "HTML - Used to define underlined text",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"ul": {
|
||||
"prefix": "ul",
|
||||
"body": ["<ul>", "\t$1", "</ul>"],
|
||||
"description": "HTML - Defines an unordered list",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"var": {
|
||||
"prefix": "var",
|
||||
"body": "<var>$1</var>$2",
|
||||
"description": "HTML - Defines a variable",
|
||||
"scope": "text.html"
|
||||
},
|
||||
"video": {
|
||||
"prefix": "video",
|
||||
"body": ["<video width=\"$1\" height=\"$2\" controls>", "\t$3", "</video>"],
|
||||
"description": "HTML - Defines a video",
|
||||
"scope": "text.html"
|
||||
}
|
||||
}
|
||||
161
dot_vim/plugged/friendly-snippets/snippets/java.json
Normal file
161
dot_vim/plugged/friendly-snippets/snippets/java.json
Normal file
@@ -0,0 +1,161 @@
|
||||
{
|
||||
"main": {
|
||||
"prefix": "main",
|
||||
"body": ["public static void main(String[] args) {", "\t$0", "}"],
|
||||
"description": "Public static main method"
|
||||
},
|
||||
"class": {
|
||||
"prefix": "class",
|
||||
"body": ["public class ${TM_FILENAME_BASE} {", "\t$0", "}"],
|
||||
"description": "Public class"
|
||||
},
|
||||
"sysout": {
|
||||
"prefix": "sysout",
|
||||
"body": ["System.out.println($0);"],
|
||||
"description": "Print to standard out"
|
||||
},
|
||||
"syserr": {
|
||||
"prefix": "syserr",
|
||||
"body": ["System.err.println($0);"],
|
||||
"description": "Print to standard err"
|
||||
},
|
||||
"fori": {
|
||||
"prefix": "fori",
|
||||
"body": [
|
||||
"for (${1:int} ${2:i} = ${3:0}; $2 < ${4:max}; $2++) {",
|
||||
"\t$0",
|
||||
"}"
|
||||
],
|
||||
"description": "Indexed for loop"
|
||||
},
|
||||
"foreach": {
|
||||
"prefix": "foreach",
|
||||
"body": ["for (${1:type} ${2:var} : ${3:iterable}) {", "\t$0", "}"],
|
||||
"description": "Enhanced for loop"
|
||||
},
|
||||
"Public constructor": {
|
||||
"prefix": "ctor",
|
||||
"body": ["public ${1:${TM_FILENAME_BASE}}($2) {", "\t${0:super();}", "}"],
|
||||
"description": "Public constructor"
|
||||
},
|
||||
"if": {
|
||||
"prefix": "if",
|
||||
"body": ["if (${1:condition}) {", "\t$0", "}"],
|
||||
"description": "if statement"
|
||||
},
|
||||
"ifelse": {
|
||||
"prefix": "ifelse",
|
||||
"body": ["if (${1:condition}) {", "\t$2", "} else {", "\t$0", "}"],
|
||||
"description": "if/else statement"
|
||||
},
|
||||
"ifnull": {
|
||||
"prefix": "ifnull",
|
||||
"body": ["if (${1:condition} == null) {", "\t$0", "}"],
|
||||
"description": "if statement checking for null"
|
||||
},
|
||||
"ifnotnull": {
|
||||
"prefix": "ifnotnull",
|
||||
"body": ["if (${1:condition} != null) {", "\t$0", "}"],
|
||||
"description": "if statement checking for not null"
|
||||
},
|
||||
"trycatch": {
|
||||
"prefix": "try_catch",
|
||||
"body": [
|
||||
"try {",
|
||||
"\t$1",
|
||||
"} catch (${2:Exception} ${3:e}) {",
|
||||
"\t$4//${0:TODO}: handle exception",
|
||||
"}"
|
||||
],
|
||||
"description": "try/catch block"
|
||||
},
|
||||
"tryresources": {
|
||||
"prefix": "try_resources",
|
||||
"body": [
|
||||
"try ($1) {",
|
||||
"\t$2",
|
||||
"} catch (${3:Exception} ${4:e}) {",
|
||||
"\t$5//${0:TODO}: handle exception",
|
||||
"}"
|
||||
]
|
||||
},
|
||||
"private_method": {
|
||||
"prefix": "private_method",
|
||||
"body": ["private ${1:void} ${2:name}($3) {", "\t$0", "}"],
|
||||
"description": "private method"
|
||||
},
|
||||
"Public method": {
|
||||
"prefix": "public_method",
|
||||
"body": ["public ${1:void} ${2:name}(${3}) {", "\t$0", "}"],
|
||||
"description": "public method"
|
||||
},
|
||||
"Private static method": {
|
||||
"prefix": "private_static_method",
|
||||
"body": ["private static ${1:Type} ${2:name}(${3}) {", "\t$0", "}"],
|
||||
"description": "private static method"
|
||||
},
|
||||
"Public static method": {
|
||||
"prefix": "public_static_method",
|
||||
"body": ["public static ${1:void} ${2:name}(${3}) {", "\t$0", "}"],
|
||||
"description": "public static method"
|
||||
},
|
||||
"Protected Method": {
|
||||
"prefix": "protected_method",
|
||||
"body": ["protected ${1:void} ${2:name}(${3}) {", "\t$0", "}"],
|
||||
"description": "Protected method"
|
||||
},
|
||||
"Switch Statement": {
|
||||
"prefix": "switch",
|
||||
"body": [
|
||||
"switch (${1:key}) {",
|
||||
"\tcase ${2:value}:",
|
||||
"\t\t$0",
|
||||
"\t\tbreak;",
|
||||
"",
|
||||
"\tdefault:",
|
||||
"\t\tbreak;",
|
||||
"}"
|
||||
],
|
||||
"description": "Switch Statement"
|
||||
},
|
||||
"While Statement": {
|
||||
"prefix": "while",
|
||||
"body": ["while (${1:condition}) {", "\t$0", "}"],
|
||||
"description": "While Statement"
|
||||
},
|
||||
"Do-While Statement": {
|
||||
"prefix": "dowhile",
|
||||
"body": ["do {", "\t$0", "} while (${1:condition});"],
|
||||
"description": "Do-While Statement"
|
||||
},
|
||||
"newObject": {
|
||||
"prefix": "new",
|
||||
"body": ["${1:Object} ${2:foo} = new ${1:Object}();"],
|
||||
"description": "Create new Object"
|
||||
},
|
||||
"Public field": {
|
||||
"prefix": "public_field",
|
||||
"body": ["public ${1:String} ${2:name};"],
|
||||
"description": "Public field"
|
||||
},
|
||||
"Private field": {
|
||||
"prefix": "private_field",
|
||||
"body": ["private ${1:String} ${2:name};"],
|
||||
"description": "Private field"
|
||||
},
|
||||
"Protected field": {
|
||||
"prefix": "protected_field",
|
||||
"body": ["protected ${1:String} ${2:name};"],
|
||||
"description": "Protected field"
|
||||
},
|
||||
"package": {
|
||||
"prefix": "package",
|
||||
"body": ["package ${1:PackageName}"],
|
||||
"description": "Package statement"
|
||||
},
|
||||
"import": {
|
||||
"prefix": "import",
|
||||
"body": ["import ${1:PackageName}"],
|
||||
"description": "Import statement"
|
||||
}
|
||||
}
|
||||
208
dot_vim/plugged/friendly-snippets/snippets/java/java-tests.json
Normal file
208
dot_vim/plugged/friendly-snippets/snippets/java/java-tests.json
Normal file
@@ -0,0 +1,208 @@
|
||||
{
|
||||
"JUnit 4 - Imports for Tests": {
|
||||
"prefix": "imports_junit4",
|
||||
"body": [
|
||||
"import static org.hamcrest.Matchers.*;",
|
||||
"import static org.junit.Assert.assertEquals;",
|
||||
"import static org.junit.Assert.assertThat;",
|
||||
"import static org.mockito.Mockito.*;",
|
||||
"import org.hamcrest.CoreMatchers;",
|
||||
"import org.junit.After;",
|
||||
"import org.junit.Before;",
|
||||
"import org.junit.Test;",
|
||||
"import org.mockito.ArgumentCaptor;",
|
||||
"import org.mockito.Mock;"
|
||||
],
|
||||
"description": "Imports to write tests with JUnit 4, Mockito and Hamcrest"
|
||||
},
|
||||
"JUnit 5 - Imports for Tests": {
|
||||
"prefix": "imports_junit5",
|
||||
"body": [
|
||||
"import static org.hamcrest.Matchers.*;",
|
||||
"import static org.hamcrest.MatcherAssert.assertThat;",
|
||||
"import static org.junit.jupiter.api.Assertions.assertEquals;",
|
||||
"import static org.mockito.Mockito.*;",
|
||||
"import org.hamcrest.CoreMatchers;",
|
||||
"import org.junit.jupiter.api.AfterEach;",
|
||||
"import org.junit.jupiter.api.BeforeEach;",
|
||||
"import org.junit.jupiter.api.DisplayName;",
|
||||
"import org.junit.jupiter.api.Test;",
|
||||
"import org.junit.jupiter.api.extension.ExtendWith;",
|
||||
"import org.junit.jupiter.params.ParameterizedTest;",
|
||||
"import org.junit.jupiter.params.provider.CsvSource;",
|
||||
"import org.mockito.ArgumentCaptor;",
|
||||
"import org.mockito.junit.jupiter.MockitoExtension;",
|
||||
"import org.mockito.Mock;"
|
||||
],
|
||||
"description": "Imports to write tests with JUnit 4, Mockito and Hamcrest"
|
||||
},
|
||||
"Assert - equals": {
|
||||
"prefix": "test_equals",
|
||||
"body": [
|
||||
"assertEquals(${1:anObject}, ${2:anotherObject});"
|
||||
],
|
||||
"description": "assert equals"
|
||||
},
|
||||
"Assert - is": {
|
||||
"prefix": "test_is",
|
||||
"body": [
|
||||
"assertThat(${1:mockedService.executeMagic()}, is(${2:\"42\"}));"
|
||||
],
|
||||
"description": "assert that is"
|
||||
},
|
||||
"Assert - is null": {
|
||||
"prefix": "test_null",
|
||||
"body": [
|
||||
"assertThat(${1:mockedService.executeMagic()}, nullValue());"
|
||||
],
|
||||
"description": "assert that is null"
|
||||
},
|
||||
"Assert - is not null": {
|
||||
"prefix": "test_not_null",
|
||||
"body": [
|
||||
"assertThat(${1:mockedService.executeMagic()}, notNullValue());"
|
||||
],
|
||||
"description": "assert that is not null"
|
||||
},
|
||||
"Assert - string is null or empty": {
|
||||
"prefix": "test_nullorempty",
|
||||
"body": [
|
||||
"assertThat(${1:mockedService.executeMagic()}, emptyOrNullString());"
|
||||
],
|
||||
"description": "assert that a string is null or empty"
|
||||
},
|
||||
"Assert - string is not null and not empty": {
|
||||
"prefix": "test_not_nullorempty",
|
||||
"body": [
|
||||
"assertThat(${1:mockedService.executeMagic()}, not(emptyOrNullString()));"
|
||||
],
|
||||
"description": "assert that string is not null or empty"
|
||||
},
|
||||
"Assert - isOneOf": {
|
||||
"prefix": "test_isOneOf",
|
||||
"body": [
|
||||
"assertThat(${1:\"Test\"}, isOneOf(${2:\"Test\", \"TDD\"}));"
|
||||
],
|
||||
"description": "assert that isOneOf"
|
||||
},
|
||||
"Assert - hasSize": {
|
||||
"prefix": "test_hasSize",
|
||||
"body": [
|
||||
"assertThat(List.of(\"Test\", \"TDD\"), hasSize(2));"
|
||||
],
|
||||
"description": "assert that hasSize"
|
||||
},
|
||||
"Assert - hasItem": {
|
||||
"prefix": "test_hasItem",
|
||||
"body": [
|
||||
"assertThat(${1:List.of(\"Test\", \"TDD\")}, hasItem(${2:\"Test\"}));"
|
||||
],
|
||||
"description": "assert that hasItem"
|
||||
},
|
||||
"Assert - hasItems": {
|
||||
"prefix": "test_hasItems",
|
||||
"body": [
|
||||
"assertThat(${1:List.of(\"Test\", \"TDD\")}, hasItem(${2:List.of(\"Test\", \"TDD\")}));"
|
||||
],
|
||||
"description": "assert that hasItem"
|
||||
},
|
||||
"Assert - isIn": {
|
||||
"prefix": "test_isIn",
|
||||
"body": [
|
||||
"assertThat(${1:\"test\"}, isIn(${2:List.of(\"test\", \"TDD\")}));"
|
||||
],
|
||||
"description": "assert that isIn"
|
||||
},
|
||||
"Mockito - Create mock": {
|
||||
"prefix": "mock_class",
|
||||
"body": [
|
||||
"${1:MyService} ${2:mockedService} = mock(${1:MyService}.class);"
|
||||
],
|
||||
"description": "Create a mock object of a class"
|
||||
},
|
||||
"Mock - Method return": {
|
||||
"prefix": "mock_method_return",
|
||||
"body": [
|
||||
"when(${1:mockedService.executeMagicWith(any())}).thenReturn(${2:\"42\"});"
|
||||
],
|
||||
"description": "Mock a method's return"
|
||||
},
|
||||
"Mock - Method throws": {
|
||||
"prefix": "mock_method_throw",
|
||||
"body": [
|
||||
"when(${1:mockedService.executeMagic()}).thenThrow(new ${2:IllegalArgumentException()};"
|
||||
],
|
||||
"description": "Mock a method to throw exception"
|
||||
},
|
||||
"Mockito - Verify call only": {
|
||||
"prefix": "mock_verify_only",
|
||||
"body": [
|
||||
"verify(${1:mockedService}, only()).${2:executeMagic()};"
|
||||
],
|
||||
"description": "Verify if a mocked method was the only one called"
|
||||
},
|
||||
"Mockito - Verify call once": {
|
||||
"prefix": "mock_verify_once",
|
||||
"body": [
|
||||
"verify(${1:mockedService}).${2:executeMagic()};"
|
||||
],
|
||||
"description": "Verify if a mocked method was called only once"
|
||||
},
|
||||
"Mockito - Verify call N times": {
|
||||
"prefix": "mock_verify_times",
|
||||
"body": [
|
||||
"verify(${1:mockedService}, times(${2:2})).${3:executeMagic()};"
|
||||
],
|
||||
"description": "Verify if a mocked method was called `n` times"
|
||||
},
|
||||
"Mockito - Verify never called": {
|
||||
"prefix": "mock_verify_never",
|
||||
"body": [
|
||||
"verify(${1:mockedService}, never()).${2:executeMagic()};"
|
||||
],
|
||||
"description": "Verify if a mocked method was never called"
|
||||
},
|
||||
"Mock - Argument captor": {
|
||||
"prefix": "mock_arg_capture",
|
||||
"body": [
|
||||
"ArgumentCaptor<${1:Object}> ${2:argCaptor} = ArgumentCaptor.forClass(${1:Object}.class);",
|
||||
"verify(${3:mockedService}).${4:executeMagicWith}(${2:argCaptor}.capture());",
|
||||
"${1:Object} ${5:actualArg} = ${2:argCaptor}.getValue();"
|
||||
],
|
||||
"description": "Capture an argument given to a mocked method"
|
||||
},
|
||||
"JUnit 4 - Before each": {
|
||||
"prefix": "test_before_junit4",
|
||||
"body": "@Before\npublic void setup() {\n\t${1}\n}",
|
||||
"description": "Create setup method with `@Before`"
|
||||
},
|
||||
"JUnit 4 - After each": {
|
||||
"prefix": "test_after_junit4",
|
||||
"body": "@After\npublic void tearDown() {\n\t${1}\n}",
|
||||
"description": "Create tear down method with `@After`"
|
||||
},
|
||||
"JUnit 5 - Before each": {
|
||||
"prefix": "test_before",
|
||||
"body": "@BeforeEach\npublic void setup() {\n\t${1}\n}",
|
||||
"description": "Create setup method with `@BeforeEach`"
|
||||
},
|
||||
"JUnit 5 - After each": {
|
||||
"prefix": "test_after",
|
||||
"body": "@AfterEach\npublic void tearDown() {\n\t${1}\n}",
|
||||
"description": "Create tear down method with `@AfterEach`"
|
||||
},
|
||||
"JUnit 5 - Assert Throws": {
|
||||
"prefix": "test_exception",
|
||||
"body": "Assertions.assertThrows(${1:Exception}.class, () -> {\n\t${0}\n});",
|
||||
"description": "Assertion to verify if an exception was thrown"
|
||||
},
|
||||
"JUnit 5 - Parameterized Test": {
|
||||
"prefix": "test_parameterized",
|
||||
"description": "Create parameterized test",
|
||||
"body": [
|
||||
"@ParameterizedTest(name = \"${1:{0\\} plus {1\\} should be {2\\}}\"",
|
||||
"@CsvSource({\n\t${2:\"0, 0, 0\",\n\t\"1, 0, 1\",\n\t\"1, 1, 2\"}\n})",
|
||||
"public void shouldAddTwoNumbers(int x, int y, int expectedSum) {\n\t${0}\n}"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,933 @@
|
||||
{
|
||||
"setImmediate": {
|
||||
"prefix": "sim",
|
||||
"body": "setImmediate(() => {\n\t${0}\n})"
|
||||
},
|
||||
"await": {
|
||||
"prefix": "a",
|
||||
"body": "await ${0}"
|
||||
},
|
||||
"await Promise.all": {
|
||||
"prefix": "apa",
|
||||
"body": "await Promise.all(${1:value})"
|
||||
},
|
||||
"await Promise.all with destructuring": {
|
||||
"prefix": "apad",
|
||||
"body": "const [${0}] = await Promise.all(${1:value})"
|
||||
},
|
||||
"await Promise.all map": {
|
||||
"prefix": "apm",
|
||||
"body": "await Promise.all(${1:array}.map(async (${2:value}) => {\n\t${0}\n}))"
|
||||
},
|
||||
"await sleep": {
|
||||
"prefix": "ast",
|
||||
"body": "await new Promise((r) => setTimeout(r, ${0}))"
|
||||
},
|
||||
"Node callback": {
|
||||
"prefix": "cb",
|
||||
"body": "function (err, ${1:value}) {\n\tif (err) throw err\n\t${0}\n}"
|
||||
},
|
||||
"process.env": {
|
||||
"prefix": "pe",
|
||||
"body": "process.env"
|
||||
},
|
||||
"Promise.all": {
|
||||
"prefix": "pa",
|
||||
"body": "Promise.all(${1:value})"
|
||||
},
|
||||
"Promise.resolve": {
|
||||
"prefix": "prs",
|
||||
"body": "Promise.resolve(${1:value})"
|
||||
},
|
||||
"Promise.reject": {
|
||||
"prefix": "prj",
|
||||
"body": "Promise.reject(${1:value})"
|
||||
},
|
||||
"Promise": {
|
||||
"prefix": "p",
|
||||
"body": "Promise"
|
||||
},
|
||||
"new Promise": {
|
||||
"prefix": "np",
|
||||
"body": "new Promise((resolve, reject) => {\n\t${0}\n})"
|
||||
},
|
||||
"Promise.then": {
|
||||
"prefix": "pt",
|
||||
"body": "${1:promise}.then((${2:value}) => {\n\t${0}\n})"
|
||||
},
|
||||
"Promise.catch": {
|
||||
"prefix": "pc",
|
||||
"body": "${1:promise}.catch(error => {\n\t${0}\n})"
|
||||
},
|
||||
"describe": {
|
||||
"prefix": "desc",
|
||||
"body": "describe('${1:description}', () => {\n\t${0}\n})"
|
||||
},
|
||||
"describe top level": {
|
||||
"prefix": "dt",
|
||||
"body": "describe('${TM_FILENAME_BASE}', () => {\n\t${0}\n})"
|
||||
},
|
||||
"it asynchronous": {
|
||||
"prefix": "it",
|
||||
"body": "it('${1:description}', async () => {\n\t${0}\n})"
|
||||
},
|
||||
"it.todo": {
|
||||
"prefix": "itt",
|
||||
"body": "it.todo('${1:description}')"
|
||||
},
|
||||
"it with a callback": {
|
||||
"prefix": "itd",
|
||||
"body": "it('${1:description}', (done) => {\n\t${0}\n})"
|
||||
},
|
||||
"it synchronous": {
|
||||
"prefix": "its",
|
||||
"body": "it('${1:description}', () => {\n\t${0}\n})"
|
||||
},
|
||||
"before": {
|
||||
"prefix": "bf",
|
||||
"body": "before(async () => {\n\t${0}\n})"
|
||||
},
|
||||
"beforeAll": {
|
||||
"prefix": "ba",
|
||||
"body": "beforeAll(async () => {\n\t${0}\n})"
|
||||
},
|
||||
"beforeEach": {
|
||||
"prefix": "bfe",
|
||||
"body": "beforeEach(async () => {\n\t${0}\n})"
|
||||
},
|
||||
"after": {
|
||||
"prefix": "aft",
|
||||
"body": "after(() => {\n\t${0}\n})"
|
||||
},
|
||||
"afterEach": {
|
||||
"prefix": "afe",
|
||||
"body": "afterEach(() => {\n\t${0}\n})"
|
||||
},
|
||||
"require": {
|
||||
"prefix": "rq",
|
||||
"body": "require('${1:module}')"
|
||||
},
|
||||
"const module = require('module')": {
|
||||
"prefix": "cr",
|
||||
"body": "const ${1:module} = require('${1:module}')"
|
||||
},
|
||||
"exports.member": {
|
||||
"prefix": "em",
|
||||
"body": "exports.${1:member} = ${2:value}"
|
||||
},
|
||||
"module.exports": {
|
||||
"prefix": "me",
|
||||
"body": "module.exports = ${1:name}"
|
||||
},
|
||||
"module as class": {
|
||||
"prefix": "mec",
|
||||
"body": "class ${1:name} {\n\tconstructor (${2:arguments}) {\n\t\t${0}\n\t}\n}\n\nmodule.exports = ${1:name}\n"
|
||||
},
|
||||
"event handler": {
|
||||
"prefix": "on",
|
||||
"body": "${1:emitter}.on('${2:event}', (${3:arguments}) => {\n\t${0}\n})"
|
||||
},
|
||||
"dom event cancel default and propagation": {
|
||||
"prefix": "evc",
|
||||
"body": "ev.preventDefault()\nev.stopPropagation()\nreturn false"
|
||||
},
|
||||
"addEventListener": {
|
||||
"prefix": "ae",
|
||||
"body": "${1:document}.addEventListener('${2:event}', ${3:ev} => {\n\t${0}\n})"
|
||||
},
|
||||
"removeEventListener": {
|
||||
"prefix": "rel",
|
||||
"body": "${1:document}.removeEventListener('${2:event}', ${3:listener})"
|
||||
},
|
||||
"getElementById": {
|
||||
"prefix": "gi",
|
||||
"body": "${1:document}.getElementById('${2:id}')"
|
||||
},
|
||||
"getElementsByClassName": {
|
||||
"prefix": "gc",
|
||||
"body": "Array.from(${1:document}.getElementsByClassName('${2:class}'))"
|
||||
},
|
||||
"getElementsByTagName": {
|
||||
"prefix": "gt",
|
||||
"body": "Array.from(${1:document}.getElementsByTagName('${2:tag}'))"
|
||||
},
|
||||
"querySelector": {
|
||||
"prefix": "qs",
|
||||
"body": "${1:document}.querySelector('${2:selector}')"
|
||||
},
|
||||
"querySelectorAll": {
|
||||
"prefix": "qsa",
|
||||
"body": "Array.from(${1:document}.querySelectorAll('${2:selector}'))"
|
||||
},
|
||||
"createDocumentFragment": {
|
||||
"prefix": "cdf",
|
||||
"body": "${1:document}.createDocumentFragment(${2:elem})"
|
||||
},
|
||||
"createElement": {
|
||||
"prefix": "cel",
|
||||
"body": "${1:document}.createElement(${2:elem})"
|
||||
},
|
||||
"classList.add": {
|
||||
"prefix": "hecla",
|
||||
"body": "${1:el}.classList.add('${2:class}')"
|
||||
},
|
||||
"classList.remove": {
|
||||
"prefix": "heclr",
|
||||
"body": "${1:el}.classList.remove('${2:class}')"
|
||||
},
|
||||
"classList.toggle": {
|
||||
"prefix": "hect",
|
||||
"body": "${1:el}.classList.toggle('${2:class}')"
|
||||
},
|
||||
"getAttribute": {
|
||||
"prefix": "hega",
|
||||
"body": "${1:el}.getAttribute('${2:attr}')"
|
||||
},
|
||||
"removeAttribute": {
|
||||
"prefix": "hera",
|
||||
"body": "${1:el}.removeAttribute('${2:attr}')"
|
||||
},
|
||||
"setAttribute": {
|
||||
"prefix": "hesa",
|
||||
"body": "${1:el}.setAttribute('${2:attr}', ${3:value})"
|
||||
},
|
||||
"appendChild": {
|
||||
"prefix": "heac",
|
||||
"body": "${1:el}.appendChild(${2:elem})"
|
||||
},
|
||||
"removeChild": {
|
||||
"prefix": "herc",
|
||||
"body": "${1:el}.removeChild(${2:elem})"
|
||||
},
|
||||
"forEach loop": {
|
||||
"prefix": "fe",
|
||||
"body": "${1:iterable}.forEach((${2:item}) => {\n\t${0}\n})"
|
||||
},
|
||||
"map": {
|
||||
"prefix": "map",
|
||||
"body": "${1:iterable}.map((${2:item}) => {\n\t${0}\n})"
|
||||
},
|
||||
"reduce": {
|
||||
"prefix": "reduce",
|
||||
"body": "${1:iterable}.reduce((${2:previous}, ${3:current}) => {\n\t${0}\n}${4:, initial})"
|
||||
},
|
||||
"filter": {
|
||||
"prefix": "filter",
|
||||
"body": "${1:iterable}.filter((${2:item}) => {\n\t${0}\n})"
|
||||
},
|
||||
"find": {
|
||||
"prefix": "find",
|
||||
"body": "${1:iterable}.find((${2:item}) => {\n\t${0}\n})"
|
||||
},
|
||||
"every": {
|
||||
"prefix": "every",
|
||||
"body": "${1:iterable}.every((${2:item}) => {\n\t${0}\n})"
|
||||
},
|
||||
"some": {
|
||||
"prefix": "some",
|
||||
"body": "${1:iterable}.some((${2:item}) => {\n\t${0}\n})"
|
||||
},
|
||||
"var statement": {
|
||||
"prefix": "v",
|
||||
"body": "var ${1:name}"
|
||||
},
|
||||
"var assignment": {
|
||||
"prefix": "va",
|
||||
"body": "var ${1:name} = ${2:value}"
|
||||
},
|
||||
"let statement": {
|
||||
"prefix": "l",
|
||||
"body": "let ${1:name}"
|
||||
},
|
||||
"const statement": {
|
||||
"prefix": "c",
|
||||
"body": "const ${1:name}"
|
||||
},
|
||||
"const statement from destructuring": {
|
||||
"prefix": "cd",
|
||||
"body": "const { ${2:prop} } = ${1:value}"
|
||||
},
|
||||
"const statement from array destructuring": {
|
||||
"prefix": "cad",
|
||||
"body": "const [ ${2:prop} ] = ${1:value}"
|
||||
},
|
||||
"const assignment awaited": {
|
||||
"prefix": "ca",
|
||||
"body": "const ${1:name} = await ${2:value}"
|
||||
},
|
||||
"const destructuring assignment awaited": {
|
||||
"prefix": "cda",
|
||||
"body": "const { ${1:name} } = await ${2:value}"
|
||||
},
|
||||
"const arrow function assignment": {
|
||||
"prefix": "cf",
|
||||
"body": "const ${1:name} = (${2:arguments}) => {\n\treturn ${0}\n}"
|
||||
},
|
||||
"let assignment awaited": {
|
||||
"prefix": "la",
|
||||
"body": "let ${1:name} = await ${2:value}"
|
||||
},
|
||||
"const assignment yielded": {
|
||||
"prefix": "cy",
|
||||
"body": "const ${1:name} = yield ${2:value}"
|
||||
},
|
||||
"let assignment yielded": {
|
||||
"prefix": "ly",
|
||||
"body": "let ${1:name} = yield ${2:value}"
|
||||
},
|
||||
"const object": {
|
||||
"prefix": "co",
|
||||
"body": "const ${1:name} = {\n\t${0}\n}"
|
||||
},
|
||||
"const array": {
|
||||
"prefix": "car",
|
||||
"body": "const ${1:name} = [\n\t${0}\n]"
|
||||
},
|
||||
"generate array of integers starting with 1": {
|
||||
"prefix": "gari",
|
||||
"body": "Array.from({ length: ${1:length} }, (v, k) => k + 1)"
|
||||
},
|
||||
"generate array of integers starting with 0": {
|
||||
"prefix": "gari0",
|
||||
"body": "[...Array(${1:length}).keys()]"
|
||||
},
|
||||
"class": {
|
||||
"prefix": "cs",
|
||||
"body": "class ${1:name} {\n\tconstructor (${2:arguments}) {\n\t\t${0}\n\t}\n}"
|
||||
},
|
||||
"class extends": {
|
||||
"prefix": "csx",
|
||||
"body": "class ${1:name} extends ${2:base} {\n\tconstructor (${3:arguments}) {\n\t\tsuper(${3:arguments})\n\t\t${0}\n\t}\n}"
|
||||
},
|
||||
"module export": {
|
||||
"prefix": "e",
|
||||
"body": "export ${1:member}"
|
||||
},
|
||||
"module export const": {
|
||||
"prefix": "ec",
|
||||
"body": "export const ${1:member} = ${2:value}"
|
||||
},
|
||||
"export named function": {
|
||||
"prefix": "ef",
|
||||
"body": "export function ${1:member} (${2:arguments}) {\n\t${0}\n}"
|
||||
},
|
||||
"module default export": {
|
||||
"prefix": "ed",
|
||||
"body": "export default ${1:member}"
|
||||
},
|
||||
"module default export function": {
|
||||
"prefix": "edf",
|
||||
"body": "export default function ${1:name} (${2:arguments}) {\n\t${0}\n}"
|
||||
},
|
||||
"import module": {
|
||||
"prefix": "im",
|
||||
"body": "import ${2:*} from '${1:module}'"
|
||||
},
|
||||
"import module as": {
|
||||
"prefix": "ia",
|
||||
"body": "import ${2:*} as ${3:name} from '${1:module}'"
|
||||
},
|
||||
"import module destructured": {
|
||||
"prefix": "id",
|
||||
"body": "import {$2} from '${1:module}'"
|
||||
},
|
||||
"typeof": {
|
||||
"prefix": "to",
|
||||
"body": "typeof ${1:source} === '${2:undefined}'"
|
||||
},
|
||||
"this": {
|
||||
"prefix": "t",
|
||||
"body": "this."
|
||||
},
|
||||
"instanceof": {
|
||||
"prefix": "iof",
|
||||
"body": "${1:source} instanceof ${2:Object}"
|
||||
},
|
||||
"let and if statement": {
|
||||
"prefix": "lif",
|
||||
"body": "let ${0} \n if (${2:condition}) {\n\t${1}\n}"
|
||||
},
|
||||
"else statement": {
|
||||
"prefix": "el",
|
||||
"body": "else {\n\t${0}\n}"
|
||||
},
|
||||
"else if statement": {
|
||||
"prefix": "ei",
|
||||
"body": "else if (${1:condition}) {\n\t${0}\n}"
|
||||
},
|
||||
"while iteration decrementing": {
|
||||
"prefix": "wid",
|
||||
"body": "let ${1:array}Index = ${1:array}.length\nwhile (${1:array}Index--) {\n\t${0}\n}"
|
||||
},
|
||||
"throw new Error": {
|
||||
"prefix": "tn",
|
||||
"body": "throw new ${0:error}"
|
||||
},
|
||||
"try/catch": {
|
||||
"prefix": "tc",
|
||||
"body": "try {\n\t${0}\n} catch (${1:err}) {\n\t\n}"
|
||||
},
|
||||
"try/finally": {
|
||||
"prefix": "tf",
|
||||
"body": "try {\n\t${0}\n} finally {\n\t\n}"
|
||||
},
|
||||
"try/catch/finally": {
|
||||
"prefix": "tcf",
|
||||
"body": "try {\n\t${0}\n} catch (${1:err}) {\n\t\n} finally {\n\t\n}"
|
||||
},
|
||||
"anonymous function": {
|
||||
"prefix": "fan",
|
||||
"body": "function (${1:arguments}) {${0}}"
|
||||
},
|
||||
"named function": {
|
||||
"prefix": "fn",
|
||||
"body": "function ${1:name} (${2:arguments}) {\n\t${0}\n}"
|
||||
},
|
||||
"async function": {
|
||||
"prefix": "asf",
|
||||
"body": "async function (${1:arguments}) {\n\t${0}\n}"
|
||||
},
|
||||
"async arrow function": {
|
||||
"prefix": "aa",
|
||||
"body": "async (${1:arguments}) => {\n\t${0}\n}"
|
||||
},
|
||||
"immediately-invoked function expression": {
|
||||
"prefix": "iife",
|
||||
"body": ";(function (${1:arguments}) {\n\t${0}\n})(${2})"
|
||||
},
|
||||
"async immediately-invoked function expression": {
|
||||
"prefix": "aiife",
|
||||
"body": ";(async (${1:arguments}) => {\n\t${0}\n})(${2})"
|
||||
},
|
||||
"arrow function": {
|
||||
"prefix": "af",
|
||||
"body": "(${1:arguments}) => ${2:statement}"
|
||||
},
|
||||
"arrow function with destructuring": {
|
||||
"prefix": "fd",
|
||||
"body": "({${1:arguments}}) => ${2:statement}"
|
||||
},
|
||||
"arrow function with destructuring returning destructured": {
|
||||
"prefix": "fdr",
|
||||
"body": "({${1:arguments}}) => ${1:arguments}"
|
||||
},
|
||||
"arrow function with body": {
|
||||
"prefix": "f",
|
||||
"body": "(${1:arguments}) => {\n\t${0}\n}"
|
||||
},
|
||||
"arrow function with return": {
|
||||
"prefix": "fr",
|
||||
"body": "(${1:arguments}) => {\n\treturn ${0}\n}"
|
||||
},
|
||||
"generator function": {
|
||||
"prefix": "gf",
|
||||
"body": "function* (${1:arguments}) {\n\t${0}\n}"
|
||||
},
|
||||
"named generator": {
|
||||
"prefix": "gfn",
|
||||
"body": "function* ${1:name}(${2:arguments}) {\n\t${0}\n}"
|
||||
},
|
||||
"console.log": {
|
||||
"prefix": "cl",
|
||||
"body": "console.log(${0})"
|
||||
},
|
||||
"console.log a variable": {
|
||||
"prefix": "cv",
|
||||
"body": "console.log('${1}:', ${1})"
|
||||
},
|
||||
"console.error": {
|
||||
"prefix": "ce",
|
||||
"body": "console.error(${0})"
|
||||
},
|
||||
"console.warn": {
|
||||
"prefix": "cw",
|
||||
"body": "console.warn(${0})"
|
||||
},
|
||||
"console.dir": {
|
||||
"prefix": "cod",
|
||||
"body": "console.dir('${1}:', ${1})"
|
||||
},
|
||||
"constructor": {
|
||||
"prefix": "cn",
|
||||
"body": "constructor () {\n\t${0}\n}"
|
||||
},
|
||||
"use strict": {
|
||||
"prefix": "uss",
|
||||
"body": "'use strict'"
|
||||
},
|
||||
"JSON.stringify()": {
|
||||
"prefix": "js",
|
||||
"body": "JSON.stringify($0)"
|
||||
},
|
||||
"JSON.parse()": {
|
||||
"prefix": "jp",
|
||||
"body": "JSON.parse($0)"
|
||||
},
|
||||
"method": {
|
||||
"prefix": "m",
|
||||
"body": "${1:method} (${2:arguments}) {\n\t${0}\n}"
|
||||
},
|
||||
"getter": {
|
||||
"prefix": "get",
|
||||
"body": "get ${1:property} () {\n\t${0}\n}"
|
||||
},
|
||||
"setter": {
|
||||
"prefix": "set",
|
||||
"body": "set ${1:property} (${2:value}) {\n\t${0}\n}"
|
||||
},
|
||||
"getter + setter": {
|
||||
"prefix": "gs",
|
||||
"body": "get ${1:property} () {\n\t${0}\n}\nset ${1:property} (${2:value}) {\n\t\n}"
|
||||
},
|
||||
"prototype method": {
|
||||
"prefix": "proto",
|
||||
"body": "${1:Class}.prototype.${2:method} = function (${3:arguments}) {\n\t${0}\n}"
|
||||
},
|
||||
"Object.assign": {
|
||||
"prefix": "oa",
|
||||
"body": "Object.assign(${1:dest}, ${2:source})"
|
||||
},
|
||||
"Object.create": {
|
||||
"prefix": "oc",
|
||||
"body": "Object.create(${1:obj})"
|
||||
},
|
||||
"Object.getOwnPropertyDescriptor": {
|
||||
"prefix": "og",
|
||||
"body": "Object.getOwnPropertyDescriptor(${1:obj}, '${2:prop}')"
|
||||
},
|
||||
"ternary": {
|
||||
"prefix": "te",
|
||||
"body": "${1:cond} ? ${2:true} : ${3:false}"
|
||||
},
|
||||
"ternary assignment": {
|
||||
"prefix": "ta",
|
||||
"body": "const ${0} = ${1:cond} ? ${2:true} : ${3:false}"
|
||||
},
|
||||
"Object.defineProperty": {
|
||||
"prefix": "od",
|
||||
"body": "Object.defineProperty(${1:dest}, '${2:prop}', {\n\t${0}\n})"
|
||||
},
|
||||
"Object.keys": {
|
||||
"prefix": "ok",
|
||||
"body": "Object.keys(${1:obj})"
|
||||
},
|
||||
"Object.values": {
|
||||
"prefix": "ov",
|
||||
"body": "Object.values(${1:obj})"
|
||||
},
|
||||
"Object.entries": {
|
||||
"prefix": "oe",
|
||||
"body": "Object.entries(${1:obj})"
|
||||
},
|
||||
"return": {
|
||||
"prefix": "r",
|
||||
"body": "return ${0}"
|
||||
},
|
||||
"return arrow function": {
|
||||
"prefix": "rf",
|
||||
"body": "return (${1:arguments}) => ${2:statement}"
|
||||
},
|
||||
"yield": {
|
||||
"prefix": "y",
|
||||
"body": "yield ${0}"
|
||||
},
|
||||
"return this": {
|
||||
"prefix": "rt",
|
||||
"body": "return ${0:this}"
|
||||
},
|
||||
"return null": {
|
||||
"prefix": "rn",
|
||||
"body": "return null"
|
||||
},
|
||||
"return new object": {
|
||||
"prefix": "ro",
|
||||
"body": "return {\n\t${0}\n}"
|
||||
},
|
||||
"return new array": {
|
||||
"prefix": "ra",
|
||||
"body": "return [\n\t${0}\n]"
|
||||
},
|
||||
"return promise": {
|
||||
"prefix": "rp",
|
||||
"body": "return new Promise((resolve, reject) => {\n\t${0}\n})"
|
||||
},
|
||||
"wrap selection in arrow function": {
|
||||
"prefix": "wrap selection in arrow function",
|
||||
"body": "() => {\n\t{$TM_SELECTED_TEXT}\n}",
|
||||
"description": "wraps text in arrow function"
|
||||
},
|
||||
"wrap selection in async arrow function": {
|
||||
"prefix": "wrap selection in async arrow function",
|
||||
"body": "async () => {\n\t{$TM_SELECTED_TEXT}\n}",
|
||||
"description": "wraps text in arrow function"
|
||||
},
|
||||
"define module": {
|
||||
"prefix": "define",
|
||||
"body": [
|
||||
"define([",
|
||||
"\t'require',",
|
||||
"\t'${1:dependency}'",
|
||||
"], function(require, ${2:factory}) {",
|
||||
"\t'use strict';",
|
||||
"\t$0",
|
||||
"});"
|
||||
],
|
||||
"description": "define module"
|
||||
},
|
||||
"For Loop": {
|
||||
"prefix": "for",
|
||||
"body": [
|
||||
"for (let ${1:index} = 0; ${1:index} < ${2:array}.length; ${1:index}++) {",
|
||||
"\tconst ${3:element} = ${2:array}[${1:index}];",
|
||||
"\t$0",
|
||||
"}"
|
||||
],
|
||||
"description": "For Loop"
|
||||
},
|
||||
"For-Each Loop": {
|
||||
"prefix": "foreach",
|
||||
"body": ["${1:array}.forEach(${2:element} => {", "\t$0", "});"],
|
||||
"description": "For-Each Loop"
|
||||
},
|
||||
"For-In Loop": {
|
||||
"prefix": "forin",
|
||||
"body": [
|
||||
"for (const ${1:key} in ${2:object}) {",
|
||||
"\tif (${2:object}.hasOwnProperty(${1:key})) {",
|
||||
"\t\tconst ${3:element} = ${2:object}[${1:key}];",
|
||||
"\t\t$0",
|
||||
"\t}",
|
||||
"}"
|
||||
],
|
||||
"description": "For-In Loop"
|
||||
},
|
||||
"For-Of Loop": {
|
||||
"prefix": "forof",
|
||||
"body": ["for (const ${1:iterator} of ${2:object}) {", "\t$0", "}"],
|
||||
"description": "For-Of Loop"
|
||||
},
|
||||
"For-Await-Of Loop": {
|
||||
"prefix": "forawaitof",
|
||||
"body": ["for await (const ${1:iterator} of ${2:object}) {", "\t$0", "}"],
|
||||
"description": "For-Of Loop"
|
||||
},
|
||||
"Function Statement": {
|
||||
"prefix": "function",
|
||||
"body": ["function ${1:name}(${2:params}) {", "\t$0", "}"],
|
||||
"description": "Function Statement"
|
||||
},
|
||||
"If Statement": {
|
||||
"prefix": "if",
|
||||
"body": ["if (${1:condition}) {", "\t$0", "}"],
|
||||
"description": "If Statement"
|
||||
},
|
||||
"If-Else Statement": {
|
||||
"prefix": "ifelse",
|
||||
"body": ["if (${1:condition}) {", "\t$0", "} else {", "\t", "}"],
|
||||
"description": "If-Else Statement"
|
||||
},
|
||||
"New Statement": {
|
||||
"prefix": "new",
|
||||
"body": ["const ${1:name} = new ${2:type}(${3:arguments});$0"],
|
||||
"description": "New Statement"
|
||||
},
|
||||
"Switch Statement": {
|
||||
"prefix": "switch",
|
||||
"body": [
|
||||
"switch (${1:key}) {",
|
||||
"\tcase ${2:value}:",
|
||||
"\t\t$0",
|
||||
"\t\tbreak;",
|
||||
"",
|
||||
"\tdefault:",
|
||||
"\t\tbreak;",
|
||||
"}"
|
||||
],
|
||||
"description": "Switch Statement"
|
||||
},
|
||||
"While Statement": {
|
||||
"prefix": "while",
|
||||
"body": ["while (${1:condition}) {", "\t$0", "}"],
|
||||
"description": "While Statement"
|
||||
},
|
||||
"Do-While Statement": {
|
||||
"prefix": "dowhile",
|
||||
"body": ["do {", "\t$0", "} while (${1:condition});"],
|
||||
"description": "Do-While Statement"
|
||||
},
|
||||
"Try-Catch Statement": {
|
||||
"prefix": "trycatch",
|
||||
"body": ["try {", "\t$0", "} catch (${1:error}) {", "\t", "}"],
|
||||
"description": "Try-Catch Statement"
|
||||
},
|
||||
"Set Timeout Function": {
|
||||
"prefix": "settimeout",
|
||||
"body": ["setTimeout(() => {", "\t$0", "}, ${1:timeout});"],
|
||||
"description": "Set Timeout Function"
|
||||
},
|
||||
"Set Interval Function": {
|
||||
"prefix": "setinterval",
|
||||
"body": ["setInterval(() => {", "\t$0", "}, ${1:interval});"],
|
||||
"description": "Set Interval Function"
|
||||
},
|
||||
"Import external module.": {
|
||||
"prefix": "import statement",
|
||||
"body": ["import { $0 } from \"${1:module}\";"],
|
||||
"description": "Import external module."
|
||||
},
|
||||
"Region Start": {
|
||||
"prefix": "#region",
|
||||
"body": ["//#region $0"],
|
||||
"description": "Folding Region Start"
|
||||
},
|
||||
"Region End": {
|
||||
"prefix": "#endregion",
|
||||
"body": ["//#endregion"],
|
||||
"description": "Folding Region End"
|
||||
},
|
||||
"Log warning to console": {
|
||||
"prefix": "warn",
|
||||
"body": ["console.warn($1);", "$0"],
|
||||
"description": "Log warning to the console"
|
||||
},
|
||||
"Log error to console": {
|
||||
"prefix": "error",
|
||||
"body": ["console.error($1);", "$0"],
|
||||
"description": "Log error to the console"
|
||||
},
|
||||
"concat": {
|
||||
"prefix": "concat",
|
||||
"body": ["concat($1);", "$0"],
|
||||
"description": "The concat() method concatenates the string arguments to the calling string and returns a new string."
|
||||
},
|
||||
"endsWith": {
|
||||
"prefix": "endsWith",
|
||||
"body": ["endsWith($1);", "$0"],
|
||||
"description": "The endsWith() method determines whether a string ends with the characters of a specified string, returning true or false as appropriate. "
|
||||
},
|
||||
"fromCharCode": {
|
||||
"prefix": "fromCharCode",
|
||||
"body": ["fromCharCode($1);", "$0"],
|
||||
"description": "The static String.fromCharCode() method returns a string created from the specified sequence of UTF-16 code units."
|
||||
},
|
||||
"includes": {
|
||||
"prefix": "includes",
|
||||
"body": ["includes($1);", "$0"],
|
||||
"description": "The includes() method performs a case-sensitive search to determine whether one string may be found within another string, returning true or false as appropriate."
|
||||
},
|
||||
"indexOf": {
|
||||
"prefix": "indexOf",
|
||||
"body": ["indexOf($1);", "$0"],
|
||||
"description": "The indexOf() method, given one argument: a substring to search for, searches the entire calling string, and returns the index of the first occurrence of the specified substring. Given a second argument: a number, the method returns the first occurrence of the specified substring at an index greater than or equal to the specified number."
|
||||
},
|
||||
"lastIndexOf": {
|
||||
"prefix": "lastIndexOf",
|
||||
"body": ["lastIndexOf($1);", "$0"],
|
||||
"description": "The lastIndexOf() method, given one argument: a substring to search for, searches the entire calling string, and returns the index of the last occurrence of the specified substring. Given a second argument: a number, the method returns the last occurrence of the specified substring at an index less than or equal to the specified number."
|
||||
},
|
||||
"localeCompare": {
|
||||
"prefix": "localeCompare",
|
||||
"body": ["localeCompare($1);", "$0"],
|
||||
"description": "The localeCompare() method returns a number indicating whether a reference string comes before, or after, or is the same as the given string in sort order. In implementations with Intl.Collator API support, this method simply calls Intl.Collator."
|
||||
},
|
||||
"match": {
|
||||
"prefix": "match",
|
||||
"body": ["match($1);", "$0"],
|
||||
"description": "The match() method retrieves the result of matching a string against a regular expression."
|
||||
},
|
||||
"matchAll": {
|
||||
"prefix": "matchAll",
|
||||
"body": ["matchAll($1);", "$0"],
|
||||
"description": "The matchAll() method returns an iterator of all results matching a string against a regular expression, including capturing groups."
|
||||
},
|
||||
"normalize": {
|
||||
"prefix": "normalize",
|
||||
"body": ["normalize($1);", "$0"],
|
||||
"description": "The normalize() method returns the Unicode Normalization Form of the string."
|
||||
},
|
||||
"repeat": {
|
||||
"prefix": "repeat",
|
||||
"body": ["repeat($1);", "$0"],
|
||||
"description": "The repeat() method constructs and returns a new string which contains the specified number of copies of the string on which it was called, concatenated together."
|
||||
},
|
||||
"replace": {
|
||||
"prefix": "replace",
|
||||
"body": ["replace($1, $2);", "$0"],
|
||||
"description": "The replace() method returns a new string with one, some, or all matches of a pattern replaced by a replacement. The pattern can be a string or a RegExp, and the replacement can be a string or a function called for each match. If pattern is a string, only the first occurrence will be replaced. The original string is left unchanged."
|
||||
},
|
||||
"replaceAll": {
|
||||
"prefix": "replaceAll",
|
||||
"body": ["replaceAll($1, $2);", "$0"],
|
||||
"description": "The replaceAll() method returns a new string with all matches of a pattern replaced by a replacement. The pattern can be a string or a RegExp, and the replacement can be a string or a function to be called for each match. The original string is left unchanged."
|
||||
},
|
||||
"search": {
|
||||
"prefix": "search",
|
||||
"body": ["search($1);", "$0"],
|
||||
"description": "The search() method executes a search for a match between a regular expression and this String object."
|
||||
},
|
||||
"slice": {
|
||||
"prefix": "slice",
|
||||
"body": ["slice($1);", "$0"],
|
||||
"description": "The slice() method extracts a section of a string and returns it as a new string, without modifying the original string."
|
||||
},
|
||||
"split": {
|
||||
"prefix": "split",
|
||||
"body": ["split($1);", "$0"],
|
||||
"description": "The split() method takes a pattern and divides a String into an ordered list of substrings by searching for the pattern, puts these substrings into an array, and returns the array."
|
||||
},
|
||||
"startsWith": {
|
||||
"prefix": "startsWith",
|
||||
"body": ["startsWith($1);", "$0"],
|
||||
"description": "The startsWith() method determines whether a string begins with the characters of a specified string, returning true or false as appropriate."
|
||||
},
|
||||
"substring": {
|
||||
"prefix": "substring",
|
||||
"body": ["substring($1);", "$0"],
|
||||
"description": "The substring() method returns the part of the string between the start and end indexes, or to the end of the string."
|
||||
},
|
||||
"toLocaleLowerCase": {
|
||||
"prefix": "toLocaleLowerCase",
|
||||
"body": ["toLocaleLowerCase($1);", "$0"],
|
||||
"description": "The toLocaleLowerCase() method returns the calling string value converted to lower case, according to any locale-specific case mappings."
|
||||
},
|
||||
"toLocaleUpperCase": {
|
||||
"prefix": "toLocaleUpperCase",
|
||||
"body": ["toLocaleUpperCase($1);", "$0"],
|
||||
"description": "The toLocaleUpperCase() method returns the calling string value converted to upper case, according to any locale-specific case mappings."
|
||||
},
|
||||
"toLowerCase": {
|
||||
"prefix": "toLowerCase",
|
||||
"body": ["toLowerCase()"],
|
||||
"description": "The toLowerCase() method returns the calling string value converted to lower case."
|
||||
},
|
||||
"toString": {
|
||||
"prefix": "toString",
|
||||
"body": ["toString()"],
|
||||
"description": "The toString() method returns a string representing the specified string value."
|
||||
},
|
||||
"toUpperCase": {
|
||||
"prefix": "toUpperCase",
|
||||
"body": ["toUpperCase()"],
|
||||
"description": "The toUpperCase() method returns the calling string value converted to uppercase (the value will be converted to a string if it isn't one)."
|
||||
},
|
||||
"valueOf": {
|
||||
"prefix": "valueOf",
|
||||
"body": ["valueOf()"],
|
||||
"description": "The valueOf() method returns the primitive value of a String object."
|
||||
},
|
||||
"isFinite": {
|
||||
"prefix": "isFinite",
|
||||
"body": ["isFinite($1);", "$0"],
|
||||
"description": "The Number.isFinite() method determines whether the passed value is a finite number — that is, it checks that a given value is a number, and the number is neither positive Infinity, negative Infinity, nor NaN."
|
||||
},
|
||||
"parseFloat": {
|
||||
"prefix": "parseFloat",
|
||||
"body": ["parseFloat($1);", "$0"],
|
||||
"description": "The Number.parseFloat() method parses an argument and returns a floating point number. If a number cannot be parsed from the argument, it returns NaN."
|
||||
},
|
||||
"isNaN": {
|
||||
"prefix": "isNaN",
|
||||
"body": ["isNaN($1);", "$0"],
|
||||
"description": "The Number.isNaN() method determines whether the passed value is the number value NaN, and returns false if the input is not of the Number type. It is a more robust version of the original, global isNaN() function."
|
||||
},
|
||||
"parseInt": {
|
||||
"prefix": "parseInt",
|
||||
"body": ["parseInt($1);", "$0"],
|
||||
"description": "The Number.parseInt() method parses a string argument and returns an integer of the specified radix or base."
|
||||
},
|
||||
"toFixed": {
|
||||
"prefix": "toFixed",
|
||||
"body": ["toFixed($1);", "$0"],
|
||||
"description": "The toFixed() method formats a number using fixed-point notation."
|
||||
},
|
||||
"toLocaleString": {
|
||||
"prefix": "toLocaleString",
|
||||
"body": ["toLocaleString($1);", "$0"],
|
||||
"description": "The toLocaleString() method returns a string with a language-sensitive representation of this number. In implementations with Intl.NumberFormat API support, this method simply calls Intl.NumberFormat."
|
||||
},
|
||||
"apply": {
|
||||
"prefix": "apply",
|
||||
"body": ["apply($1);", "$0"],
|
||||
"description": "The apply() method calls the specified function with a given this value, and arguments provided as an array (or an array-like object)."
|
||||
},
|
||||
"bind": {
|
||||
"prefix": "bind",
|
||||
"body": ["bind($1);", "$0"],
|
||||
"description": "The bind() method creates a new function that, when called, has its this keyword set to the provided value, with a given sequence of arguments preceding any provided when the new function is called."
|
||||
},
|
||||
"call": {
|
||||
"prefix": "call",
|
||||
"body": ["call($1);", "$0"],
|
||||
"description": "The call() method calls the function with a given this value and arguments provided individually."
|
||||
},
|
||||
"defineProperties": {
|
||||
"prefix": "defineProperties",
|
||||
"body": ["defineProperties($1, $2);", "$0"],
|
||||
"description": ""
|
||||
},
|
||||
"entries": {
|
||||
"prefix": "entries",
|
||||
"body": ["entries($1);", "$0"],
|
||||
"description": "The Object.entries() method returns an array of a given object's own enumerable string-keyed property key-value pairs."
|
||||
},
|
||||
"values": {
|
||||
"prefix": "values",
|
||||
"body": ["values($1);", "$0"],
|
||||
"description": "The Object.values() method returns an array of a given object's own enumerable string-keyed property values."
|
||||
},
|
||||
"focus": {
|
||||
"prefix": "focus",
|
||||
"body": ["focus()"],
|
||||
"description": "The HTMLElement.focus() method sets focus on the specified element, if it can be focused. The focused element is the element that will receive keyboard and similar events by default."
|
||||
},
|
||||
"blur": {
|
||||
"prefix": "blur",
|
||||
"body": ["blur()"],
|
||||
"description": ""
|
||||
},
|
||||
"innerText": {
|
||||
"prefix": "innerText",
|
||||
"body": ["innerText"],
|
||||
"description": "The innerText property of the HTMLElement interface represents the rendered text content of a node and its descendants."
|
||||
},
|
||||
"push": {
|
||||
"prefix": "push",
|
||||
"body": ["push($1);", "$0"],
|
||||
"description": "The push() method adds one or more elements to the end of an array and returns the new length of the array."
|
||||
},
|
||||
"reverse": {
|
||||
"prefix": "reverse",
|
||||
"body": ["reverse();", "$0"],
|
||||
"description": "The reverse() method reverses an array in place and returns the reference to the same array, the first array element now becoming the last, and the last array element becoming the first. In other words, elements order in the array will be turned towards the direction opposite to that previously stated."
|
||||
},
|
||||
"sort": {
|
||||
"prefix": "sort",
|
||||
"body": ["sort($1);", "$0"],
|
||||
"description": "The sort() method sorts the elements of an array in place and returns the reference to the same array, now sorted. The default sort order is ascending, built upon converting the elements into strings, then comparing their sequences of UTF-16 code units values."
|
||||
},
|
||||
"splice": {
|
||||
"prefix": "splice",
|
||||
"body": ["splice($1);", "$0"],
|
||||
"description": "The splice() method changes the contents of an array by removing or replacing existing elements and/or adding new elements in place. To access part of an array without modifying it, see slice()."
|
||||
},
|
||||
"toJSON": {
|
||||
"prefix": "toJSON",
|
||||
"body": ["toJSON();", "$0"],
|
||||
"description": "The toJSON() method returns a string representation of the Date object."
|
||||
},
|
||||
"toDateString": {
|
||||
"prefix": "toDateString",
|
||||
"body": ["toDateString();", "$0"],
|
||||
"description": ""
|
||||
},
|
||||
"setTime": {
|
||||
"prefix": "setTime",
|
||||
"body": ["setTime($1);", "$0"],
|
||||
"description": "The setTime() method sets the Date object to the time represented by a number of milliseconds since January 1, 1970, 00:00:00 UTC."
|
||||
},
|
||||
"setDate": {
|
||||
"prefix": "setDate",
|
||||
"body": ["setDate($1);", "$0"],
|
||||
"description": "The setDate() method changes the day of the month of a given Date instance, based on local time."
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
{
|
||||
"JSDoc Comment": {
|
||||
"prefix": "/*",
|
||||
"body": [
|
||||
"/**\n",
|
||||
" * ${1:Comment}$0\n",
|
||||
"*/"
|
||||
],
|
||||
"description": "A JSDoc comment"
|
||||
},
|
||||
"author email": {
|
||||
"prefix": "@au",
|
||||
"body": [
|
||||
"@author ${1:author_name} [${2:author_email}]"
|
||||
],
|
||||
"description": "@author email (First Last)"
|
||||
},
|
||||
"Lisense desc": {
|
||||
"prefix": "@li",
|
||||
"body": [
|
||||
"@license ${1:MIT}$0"
|
||||
],
|
||||
"description": "@lisence Description"
|
||||
},
|
||||
"Semantic version": {
|
||||
"prefix": "@ver",
|
||||
"body": [
|
||||
"@version ${1:0.1.0}$0"
|
||||
],
|
||||
"description": "@version Semantic version"
|
||||
},
|
||||
"File overview": {
|
||||
"prefix": "@fileo",
|
||||
"body": [
|
||||
"/**\n",
|
||||
" * @fileoverview ${1:Description_of_the_file}$0",
|
||||
"*/"
|
||||
],
|
||||
"description": "@fileoverview Description"
|
||||
},
|
||||
"Contructor": {
|
||||
"prefix": "@constr",
|
||||
"body": [
|
||||
"@contructor"
|
||||
],
|
||||
"description": "@constructor"
|
||||
},
|
||||
"varname": {
|
||||
"prefix": "@p",
|
||||
"body": [
|
||||
"@param ${1:Type} ${2:varname} ${3:Description}"
|
||||
],
|
||||
"description": "@param {Type} varname Description"
|
||||
},
|
||||
"return type desc": {
|
||||
"prefix": "@ret",
|
||||
"body": [
|
||||
"@return ${1:Type} ${2:Description}"
|
||||
],
|
||||
"description": "@return {Type} Description"
|
||||
},
|
||||
"private": {
|
||||
"prefix": "@pri",
|
||||
"body": [
|
||||
"@private"
|
||||
],
|
||||
"description": "@private"
|
||||
},
|
||||
"override": {
|
||||
"prefix": "@over",
|
||||
"body": [
|
||||
"@override"
|
||||
],
|
||||
"description": "@override"
|
||||
},
|
||||
"protected": {
|
||||
"prefix": "@pro",
|
||||
"body": [
|
||||
"@protected"
|
||||
],
|
||||
"description": "@protected"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,95 @@
|
||||
{
|
||||
"import Next.js GetStaticProps type": {
|
||||
"prefix": "igsp",
|
||||
"body": "import { GetStaticProps } from 'next';",
|
||||
"description": "Next.js GetStaticProps type import"
|
||||
},
|
||||
"import Next.js InferGetStaticPropsType": {
|
||||
"prefix": "infg",
|
||||
"body": "import { InferGetStaticPropsType } from 'next'",
|
||||
"description": "Next.js InferGetStaticPropsType import"
|
||||
},
|
||||
"use Next.js InferGetStaticPropsType": {
|
||||
"prefix": "uifg",
|
||||
"body": [
|
||||
"function ${1:${TM_FILENAME_BASE}}({ posts }: InferGetStaticPropsType<typeof getStaticProps>) {",
|
||||
"\treturn $2",
|
||||
"}"
|
||||
],
|
||||
"description": "use InferGetStaticPropsType snippet"
|
||||
},
|
||||
"Next.js Get initial props outside Component": {
|
||||
"prefix": "gip",
|
||||
"body": [
|
||||
"${1:${TM_FILENAME_BASE}}.getInitialProps = async ({ req }) => {",
|
||||
"\treturn $2",
|
||||
"}"
|
||||
],
|
||||
"description": "Next.js Get initial props outside Component"
|
||||
},
|
||||
"Next.js getInitialProps() inside Class Component": {
|
||||
"prefix": "cgip",
|
||||
"body": ["static async getInitialProps() {", "\treturn { $1 };", "}"],
|
||||
"description": "Next.js static async getInitialProps() inside Class Component"
|
||||
},
|
||||
"Next.js getStaticProps() export": {
|
||||
"prefix": "gsp",
|
||||
"body": [
|
||||
"export const getStaticProps: GetStaticProps = async (context) => {",
|
||||
"\treturn {",
|
||||
"\t\tprops: {$1}",
|
||||
"\t};",
|
||||
"}"
|
||||
],
|
||||
"description": "Next.js getStaticProps() export"
|
||||
},
|
||||
"Next.js getStaticPaths() export": {
|
||||
"prefix": "gspt",
|
||||
"body": [
|
||||
"export const getStaticPaths: GetStaticPaths = async () => {",
|
||||
"\treturn {",
|
||||
"\t\tpaths: [",
|
||||
"\t\t\t{ params: { $1 }}",
|
||||
"\t\t],",
|
||||
"\t\tfallback: $2",
|
||||
"\t};",
|
||||
"}"
|
||||
],
|
||||
"description": "Next.js pre-renders all the static paths https://nextjs.org/docs/basic-features/data-fetching#getstaticpaths-static-generation"
|
||||
},
|
||||
"import Next.js GetStaticPaths type": {
|
||||
"prefix": "igspt",
|
||||
"body": "import { GetStaticPaths } from 'next'",
|
||||
"description": "Next.js GetStaticPaths type import"
|
||||
},
|
||||
"Next.js getServerSideProps() export": {
|
||||
"prefix": "gssp",
|
||||
"body": [
|
||||
"export const getServerSideProps: GetServerSideProps = async (context) => {",
|
||||
"\treturn {",
|
||||
"\t\tprops: {$1}",
|
||||
"\t};",
|
||||
"}"
|
||||
],
|
||||
"description": "Next.js getServerSideProps() export https://nextjs.org/docs/basic-features/data-fetching#getserversideprops-server-side-rendering"
|
||||
},
|
||||
"import Next.js GetServerSideProps type": {
|
||||
"prefix": "igss",
|
||||
"body": "import { GetServerSideProps } from 'next'",
|
||||
"description": "Next.js GetServerSideProps type import"
|
||||
},
|
||||
"import Next.js InferGetServerSidePropsType": {
|
||||
"prefix": "ifgss",
|
||||
"body": "import { InferGetServerSidePropsType } from 'next'",
|
||||
"description": "Next.js InferGetServerSidePropsType import"
|
||||
},
|
||||
"use Next.js InferGetServerSidePropsType": {
|
||||
"prefix": "ufgss",
|
||||
"body": [
|
||||
"function ${1:${TM_FILENAME_BASE}}({ data }: InferGetServerSidePropsType<typeof getServerSideProps>) {",
|
||||
"\treturn $2",
|
||||
"}"
|
||||
],
|
||||
"description": "use InferGetServerSidePropsType snippet"
|
||||
}
|
||||
}
|
||||
125
dot_vim/plugged/friendly-snippets/snippets/javascript/next.json
Normal file
125
dot_vim/plugged/friendly-snippets/snippets/javascript/next.json
Normal file
@@ -0,0 +1,125 @@
|
||||
{
|
||||
"Next.js Get initial props outside Component": {
|
||||
"prefix": "gip",
|
||||
"body": "${1:${TM_FILENAME_BASE}}.getInitialProps = ({ req }) => {\treturn $2}",
|
||||
"description": "Next.js Get initial props outside Component"
|
||||
},
|
||||
"Next.js getInitialProps() inside Class Component": {
|
||||
"prefix": "cgip",
|
||||
"body": ["static async getInitialProps() {", "\treturn { $1 };", "}"],
|
||||
"description": "Next.js static async getInitialProps() inside Class Component"
|
||||
},
|
||||
"Next.js getStaticProps() export": {
|
||||
"prefix": "gsp",
|
||||
"body": [
|
||||
"export async function getStaticProps(context) {",
|
||||
"\treturn {",
|
||||
"\t\tprops: {$1}",
|
||||
"\t};",
|
||||
"}"
|
||||
],
|
||||
"description": "Next.js getStaticProps() export"
|
||||
},
|
||||
"Next.js getStaticPaths() export": {
|
||||
"prefix": "gspt",
|
||||
"body": [
|
||||
"export async function getStaticPaths() {",
|
||||
"\treturn {",
|
||||
"\t\tpaths: [",
|
||||
"\t\t\t{ params: { $1 }}",
|
||||
"\t\t],",
|
||||
"\t\tfallback: $2",
|
||||
"\t};",
|
||||
"}"
|
||||
],
|
||||
"description": "Next.js pre-renders all the static paths https://nextjs.org/docs/basic-features/data-fetching#getstaticpaths-static-generation"
|
||||
},
|
||||
"Next.js getServerSideProps() export": {
|
||||
"prefix": "gssp",
|
||||
"body": [
|
||||
"export async function getServerSideProps(context) {",
|
||||
"\treturn {",
|
||||
"\t\tprops: {$1}",
|
||||
"\t};",
|
||||
"}"
|
||||
],
|
||||
"description": "Next.js getServerSideProps() export https://nextjs.org/docs/basic-features/data-fetching#getserversideprops-server-side-rendering"
|
||||
},
|
||||
"import Next.js Head": {
|
||||
"prefix": "imh",
|
||||
"body": "import Head from 'next/head';",
|
||||
"description": "Next.js Head import"
|
||||
},
|
||||
"import Next.js Link": {
|
||||
"prefix": "iml",
|
||||
"body": "import Link from 'next/link';",
|
||||
"description": "Next.js Link import"
|
||||
},
|
||||
"Use Next.js Link": {
|
||||
"prefix": "usl",
|
||||
"body": ["<Link href=\"$1\">", "\t<a>", "\t\t$0", "\t</a>", "</Link>"],
|
||||
"description": "Next.js Link Tag with <a>"
|
||||
},
|
||||
"Use Next.js Link With Pathname": {
|
||||
"prefix": "uslp",
|
||||
"body": [
|
||||
"<Link href={{ pathname: \"$1\", query: { queryName: queryValue } }}>",
|
||||
"\t<a>",
|
||||
"\t\t$0",
|
||||
"\t</a>",
|
||||
"</Link>"
|
||||
],
|
||||
"description": "Next.js Link with Pathname"
|
||||
},
|
||||
"Use Next.js LinkTagWithDynmicRoute": {
|
||||
"prefix": "usld",
|
||||
"body": [
|
||||
"<Link href=\"/[$1]\" as={`/${2:SLUG_NAME}`}>",
|
||||
"\t<a>",
|
||||
"\t\t$0",
|
||||
"\t</a>",
|
||||
"</Link>"
|
||||
],
|
||||
"description": "Next.js Link Tag with Dynamic Route"
|
||||
},
|
||||
"importNextRouter": {
|
||||
"prefix": "imro",
|
||||
"body": "import Router from 'next/router';",
|
||||
"description": "Next.js Router import"
|
||||
},
|
||||
"Next.js Router from useRouter": {
|
||||
"prefix": "usro",
|
||||
"body": "const router = useRouter();",
|
||||
"description": "Declare Next.js Router from useRouter"
|
||||
},
|
||||
"Next.js query param from useRouter": {
|
||||
"prefix": "nroq",
|
||||
"body": "const { $1 } = router.query;",
|
||||
"description": "Destructure Next.js query param from Router from useRouter"
|
||||
},
|
||||
"importNextRouterWithRouter": {
|
||||
"prefix": "imrow",
|
||||
"body": "import Router, { withRouter } from 'next/router';",
|
||||
"description": "Next.js Router and { withRouter } import"
|
||||
},
|
||||
"importNextUseRouter": {
|
||||
"prefix": "imuro",
|
||||
"body": "import { useRouter } from 'next/router';",
|
||||
"description": "Next.js { useRouter } import"
|
||||
},
|
||||
"Import Next Image component": {
|
||||
"prefix": "imni",
|
||||
"body": "import Image from 'next/image';",
|
||||
"description": "Next.js 10 Image component import"
|
||||
},
|
||||
"Use sized Next Image component": {
|
||||
"prefix": "usim",
|
||||
"body": "<Image alt=\"$1\" src=\"$1\" width=\"$1\" height=\"$1\" />",
|
||||
"description": "Use sized Next Image component"
|
||||
},
|
||||
"Use unsized Next Image component": {
|
||||
"prefix": "usimu",
|
||||
"body": "<Image alt=\"$1\" src=\"$1\" unsized=\"$1\" />",
|
||||
"description": "Use sized Next Image component"
|
||||
}
|
||||
}
|
||||
1557
dot_vim/plugged/friendly-snippets/snippets/javascript/react-es7.json
Normal file
1557
dot_vim/plugged/friendly-snippets/snippets/javascript/react-es7.json
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,445 @@
|
||||
{
|
||||
"statefulComponent": {
|
||||
"prefix": "rnc",
|
||||
"body": [
|
||||
"import React, { Component } from 'react';",
|
||||
"",
|
||||
"import { View } from 'react-native';",
|
||||
"",
|
||||
"// import { Container } from './styles';",
|
||||
"",
|
||||
"export default class ${1:${TM_DIRECTORY/^.*(\\/|\\\\)([^(\\/|\\\\)]+)$/$2/}} extends Component {",
|
||||
" render() {",
|
||||
" return <View />;",
|
||||
" }",
|
||||
"}",
|
||||
""
|
||||
],
|
||||
"description": "Create React Native Stateful Component"
|
||||
},
|
||||
"statelessComponent": {
|
||||
"prefix": "rnsc",
|
||||
"body": [
|
||||
"import React from 'react';",
|
||||
"",
|
||||
"import { View } from 'react-native';",
|
||||
"",
|
||||
"// import { Container } from './styles';",
|
||||
"",
|
||||
"const ${1:${TM_DIRECTORY/^.*(\\/|\\\\)([^(\\/|\\\\)]+)$/$2/}} = () => <View />;",
|
||||
"",
|
||||
"export default ${1:${TM_DIRECTORY/^.*(\\/|\\\\)([^(\\/|\\\\)]+)$/$2/}};",
|
||||
""
|
||||
],
|
||||
"description": "Create React Native Stateless Component"
|
||||
},
|
||||
"componentFunctional": {
|
||||
"prefix": "rnfc",
|
||||
"body": [
|
||||
"import React from 'react';",
|
||||
"import { View } from 'react-native';",
|
||||
"",
|
||||
"// import { Container } from './styles';",
|
||||
"",
|
||||
"export default function ${1:${TM_DIRECTORY/^.*(\\/|\\\\)([^(\\/|\\\\)]+)$/$2/}}() {",
|
||||
" return (",
|
||||
" <View />",
|
||||
" );",
|
||||
"}",
|
||||
""
|
||||
],
|
||||
"description": "Create React Native Functional Component"
|
||||
},
|
||||
"componentFunctionalTypescript": {
|
||||
"prefix": "rnfcc",
|
||||
"body": [
|
||||
"import React from 'react';",
|
||||
"import { View } from 'react-native';",
|
||||
"",
|
||||
"// import { Container } from './styles';",
|
||||
"",
|
||||
"const ${1:${TM_DIRECTORY/^.*(\\/|\\\\)([^(\\/|\\\\)]+)$/$2/}}: React.FC = () => {",
|
||||
" return <View />;",
|
||||
"}",
|
||||
"",
|
||||
"export default ${1:${TM_DIRECTORY/^.*(\\/|\\\\)([^(\\/|\\\\)]+)$/$2/}};"
|
||||
],
|
||||
"description": "Create React Native TypeScript Functional Component"
|
||||
},
|
||||
"styles": {
|
||||
"prefix": "styled-rn",
|
||||
"body": [
|
||||
"import styled from 'styled-components/native';",
|
||||
"",
|
||||
"export const ${1:Container} = styled.${2:View}`",
|
||||
" ${3}",
|
||||
"`;",
|
||||
""
|
||||
],
|
||||
"description": "Create React Native Styled Components file"
|
||||
},
|
||||
"StyleSheet": {
|
||||
"prefix": "rn-stylesheet",
|
||||
"body": [
|
||||
"const ${1:styles} = StyleSheet.create({",
|
||||
" ${2:container}: {",
|
||||
" ${3}",
|
||||
" },",
|
||||
"});",
|
||||
""
|
||||
],
|
||||
"description": "Create React Native Styled Components StyleSheet"
|
||||
},
|
||||
"justifyContent": {
|
||||
"prefix": "just",
|
||||
"body": "justifyContent: '${1:center}',",
|
||||
"description": "justifyContent"
|
||||
},
|
||||
"alignItems": {
|
||||
"prefix": "align",
|
||||
"body": "alignItems: '${1:center}',",
|
||||
"description": "alignItems"
|
||||
},
|
||||
"alignSelf": {
|
||||
"prefix": "align",
|
||||
"body": "alignSelf: '${1:center}',",
|
||||
"description": "alignSelf"
|
||||
},
|
||||
"alignContent": {
|
||||
"prefix": "align",
|
||||
"body": "alignContent: '${1}',",
|
||||
"description": "alignContent"
|
||||
},
|
||||
"aspectRatio": {
|
||||
"prefix": "as",
|
||||
"body": "aspectRatio: '${1}',",
|
||||
"description": "aspectRatio"
|
||||
},
|
||||
"borderBottomWidth": {
|
||||
"prefix": "bor",
|
||||
"body": "borderBottomWidth: ${1},",
|
||||
"description": "borderBottomWidth"
|
||||
},
|
||||
"borderLeftWidth": {
|
||||
"prefix": "bor",
|
||||
"body": "borderLeftWidth: ${1},",
|
||||
"description": "borderLeftWidth"
|
||||
},
|
||||
"borderRightWidth": {
|
||||
"prefix": "bor",
|
||||
"body": "borderRightWidth: ${1},",
|
||||
"description": "borderRightWidth"
|
||||
},
|
||||
"borderTopWidth": {
|
||||
"prefix": "bor",
|
||||
"body": "borderTopWidth: ${1},",
|
||||
"description": "borderTopWidth"
|
||||
},
|
||||
"borderWidth": {
|
||||
"prefix": "bor",
|
||||
"body": "borderWidth: ${1},",
|
||||
"description": "borderWidth"
|
||||
},
|
||||
"borderColor": {
|
||||
"prefix": "bor",
|
||||
"body": "borderColor: ${1},",
|
||||
"description": "borderColor"
|
||||
},
|
||||
"borderRadius": {
|
||||
"prefix": "bor",
|
||||
"body": "borderRadius: ${1},",
|
||||
"description": "borderRadius"
|
||||
},
|
||||
"borderLeftColor": {
|
||||
"prefix": "bor",
|
||||
"body": "borderLeftColor: ${1},",
|
||||
"description": "borderLeftColor"
|
||||
},
|
||||
"borderRightColor": {
|
||||
"prefix": "bor",
|
||||
"body": "borderRightColor: ${1},",
|
||||
"description": "borderRightColor"
|
||||
},
|
||||
"borderTopColor": {
|
||||
"prefix": "bor",
|
||||
"body": "borderTopColor: ${1},",
|
||||
"description": "borderTopColor"
|
||||
},
|
||||
"borderBottomColor": {
|
||||
"prefix": "bor",
|
||||
"body": "borderBottomColor: ${1},",
|
||||
"description": "borderBottomColor"
|
||||
},
|
||||
"borderBottomLeftRadius": {
|
||||
"prefix": "bor",
|
||||
"body": "borderBottomLeftRadius: ${1},",
|
||||
"description": "borderBottomLeftRadius"
|
||||
},
|
||||
"borderBottomRightRadius": {
|
||||
"prefix": "bor",
|
||||
"body": "borderBottomRightRadius: ${1},",
|
||||
"description": "borderBottomRightRadius"
|
||||
},
|
||||
"borderTopLeftRadius": {
|
||||
"prefix": "bor",
|
||||
"body": "borderTopLeftRadius: ${1},",
|
||||
"description": "borderTopLeftRadius"
|
||||
},
|
||||
"borderTopRightRadius": {
|
||||
"prefix": "bor",
|
||||
"body": "borderTopRightRadius: ${1},",
|
||||
"description": "borderTopRightRadius"
|
||||
},
|
||||
"backgroundColor": {
|
||||
"prefix": "bac",
|
||||
"body": "backgroundColor: ${1},",
|
||||
"description": "backgroundColor"
|
||||
},
|
||||
"display": {
|
||||
"prefix": "di",
|
||||
"body": "display: '${1:none}',",
|
||||
"description": "display"
|
||||
},
|
||||
"opacity": {
|
||||
"prefix": "op",
|
||||
"body": "opacity: ${1},",
|
||||
"description": "opacity"
|
||||
},
|
||||
"shadowColor": {
|
||||
"prefix": "sha",
|
||||
"body": "shadowColor: '${1:none}',",
|
||||
"description": "shadowColor"
|
||||
},
|
||||
"shadowOffset": {
|
||||
"prefix": "sha",
|
||||
"body": "shadowOffset: ${1},",
|
||||
"description": "shadowOffset"
|
||||
},
|
||||
"shadowOpacity": {
|
||||
"prefix": "sha",
|
||||
"body": "shadowOpacity: ${1},",
|
||||
"description": "shadowOpacity"
|
||||
},
|
||||
"shadowRadius": {
|
||||
"prefix": "sha",
|
||||
"body": "shadowRadius: ${1},",
|
||||
"description": "shadowRadius"
|
||||
},
|
||||
"elevation": {
|
||||
"prefix": "e",
|
||||
"body": "elevation: ${1},",
|
||||
"description": "elevation"
|
||||
},
|
||||
"flex": {
|
||||
"prefix": "flex",
|
||||
"body": "flex: ${1},",
|
||||
"description": "flex"
|
||||
},
|
||||
"flexBasis": {
|
||||
"prefix": "flex",
|
||||
"body": "flexBasis: '${1}',",
|
||||
"description": "flexBasis"
|
||||
},
|
||||
"flexDirection": {
|
||||
"prefix": "flex",
|
||||
"body": "flexDirection: '${1:column}',",
|
||||
"description": "flexDirection"
|
||||
},
|
||||
"flexGrow": {
|
||||
"prefix": "flex",
|
||||
"body": "flexGrow: '${1}',",
|
||||
"description": "flexGrow"
|
||||
},
|
||||
"flexShrink": {
|
||||
"prefix": "flex",
|
||||
"body": "flexShrink: '${1}',",
|
||||
"description": "flexShrink"
|
||||
},
|
||||
"flexWrap": {
|
||||
"prefix": "flex",
|
||||
"body": "flexWrap: '${1}',",
|
||||
"description": "flexWrap"
|
||||
},
|
||||
"fontSize": {
|
||||
"prefix": "fo",
|
||||
"body": "fontSize: ${1},",
|
||||
"description": "fontSize"
|
||||
},
|
||||
"fontStyle": {
|
||||
"prefix": "fo",
|
||||
"body": "fontStyle: '${1:normal}',",
|
||||
"description": "fontStyle"
|
||||
},
|
||||
"fontFamily": {
|
||||
"prefix": "fo",
|
||||
"body": "fontFamily: '${1}',",
|
||||
"description": "fontFamily"
|
||||
},
|
||||
"fontWeight": {
|
||||
"prefix": "fo",
|
||||
"body": "fontWeight: '${1:normal}',",
|
||||
"description": "fontWeight"
|
||||
},
|
||||
"height": {
|
||||
"prefix": "h",
|
||||
"body": "height: ${1},",
|
||||
"description": "height"
|
||||
},
|
||||
"left": {
|
||||
"prefix": "l",
|
||||
"body": "left: ${1},",
|
||||
"description": "left"
|
||||
},
|
||||
"margin": {
|
||||
"prefix": "mar",
|
||||
"body": "margin: '${1}',",
|
||||
"description": "margin"
|
||||
},
|
||||
"marginBottom": {
|
||||
"prefix": "mar",
|
||||
"body": "marginBottom: ${1},",
|
||||
"description": "marginBottom"
|
||||
},
|
||||
"marginHorizontal": {
|
||||
"prefix": "mar",
|
||||
"body": "marginHorizontal: '${1}',",
|
||||
"description": "marginHorizontal"
|
||||
},
|
||||
"marginLeft": {
|
||||
"prefix": "mar",
|
||||
"body": "marginLeft: ${1},",
|
||||
"description": "marginLeft"
|
||||
},
|
||||
"marginRight": {
|
||||
"prefix": "mar",
|
||||
"body": "marginRight: ${1},",
|
||||
"description": "marginRight"
|
||||
},
|
||||
"marginTop": {
|
||||
"prefix": "mar",
|
||||
"body": "marginTop: ${1},",
|
||||
"description": "marginTop"
|
||||
},
|
||||
"marginVertical": {
|
||||
"prefix": "mar",
|
||||
"body": "marginVertical: '${1}',",
|
||||
"description": "marginVertical"
|
||||
},
|
||||
"maxHeight": {
|
||||
"prefix": "max",
|
||||
"body": "maxHeight: ${1},",
|
||||
"description": "maxHeight"
|
||||
},
|
||||
"maxWidth": {
|
||||
"prefix": "max",
|
||||
"body": "maxWidth: ${1},",
|
||||
"description": "maxWidth"
|
||||
},
|
||||
"minHeight": {
|
||||
"prefix": "min",
|
||||
"body": "minHeight: ${1},",
|
||||
"description": "minHeight"
|
||||
},
|
||||
"minWidth": {
|
||||
"prefix": "min",
|
||||
"body": "minWidth: ${1},",
|
||||
"description": "minWidth"
|
||||
},
|
||||
"overflow": {
|
||||
"prefix": "over",
|
||||
"body": "overflow: '${1}',",
|
||||
"description": "overflow"
|
||||
},
|
||||
"padding": {
|
||||
"prefix": "padding",
|
||||
"body": "padding: ${1},",
|
||||
"description": "padding"
|
||||
},
|
||||
"paddingBottom": {
|
||||
"prefix": "padding",
|
||||
"body": "paddingBottom: ${1},",
|
||||
"description": "paddingBottom"
|
||||
},
|
||||
"paddingHorizontal": {
|
||||
"prefix": "padding",
|
||||
"body": "paddingHorizontal: ${1},",
|
||||
"description": "paddingHorizontal"
|
||||
},
|
||||
"paddingLeft": {
|
||||
"prefix": "padding",
|
||||
"body": "paddingLeft: ${1},",
|
||||
"description": "paddingLeft"
|
||||
},
|
||||
"paddingRight": {
|
||||
"prefix": "padding",
|
||||
"body": "paddingRight: ${1},",
|
||||
"description": "paddingRight"
|
||||
},
|
||||
"paddingTop": {
|
||||
"prefix": "padding",
|
||||
"body": "paddingTop: ${1},",
|
||||
"description": "paddingTop"
|
||||
},
|
||||
"paddingVertical": {
|
||||
"prefix": "padding",
|
||||
"body": "paddingVertical: ${1},",
|
||||
"description": "paddingVertical"
|
||||
},
|
||||
"position": {
|
||||
"prefix": "pos",
|
||||
"body": "position: ${1},",
|
||||
"description": "position"
|
||||
},
|
||||
"right": {
|
||||
"prefix": "ri",
|
||||
"body": "right: ${1},",
|
||||
"description": "right"
|
||||
},
|
||||
"top": {
|
||||
"prefix": "top",
|
||||
"body": "top: ${1},",
|
||||
"description": "top"
|
||||
},
|
||||
"width": {
|
||||
"prefix": "w",
|
||||
"body": "width: ${1},",
|
||||
"description": "width"
|
||||
},
|
||||
"zIndex": {
|
||||
"prefix": "z",
|
||||
"body": "zIndex: ${1},",
|
||||
"description": "zIndex"
|
||||
},
|
||||
"api": {
|
||||
"prefix": "api",
|
||||
"body": [
|
||||
"import axios from 'axios';",
|
||||
"",
|
||||
"const api = axios.create({",
|
||||
" baseURL: ${1},",
|
||||
"});",
|
||||
"",
|
||||
"export default api;",
|
||||
""
|
||||
],
|
||||
"description": "Create Axios Configuration file"
|
||||
},
|
||||
"region": {
|
||||
"prefix": "region",
|
||||
"body": [
|
||||
"//#region ${1}",
|
||||
"${2}",
|
||||
"//#endregion"
|
||||
],
|
||||
"description": "Create region"
|
||||
},
|
||||
"regionStartEnd": {
|
||||
"prefix": "#regionStartEnd",
|
||||
"body": [
|
||||
"//#region ${1}",
|
||||
"${2}",
|
||||
"//#endregion"
|
||||
],
|
||||
"description": "Create region"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,476 @@
|
||||
{
|
||||
"statefulComponent": {
|
||||
"prefix": "rnc",
|
||||
"body": [
|
||||
"import React, { Component } from 'react';",
|
||||
"",
|
||||
"import { View } from 'react-native';",
|
||||
"",
|
||||
"// import { Container } from './styles';",
|
||||
"",
|
||||
"export default class ${1:${TM_DIRECTORY/^.*(\\/|\\\\)([^(\\/|\\\\)]+)$/$2/}} extends Component {",
|
||||
" render() {",
|
||||
" return <View />;",
|
||||
" }",
|
||||
"}",
|
||||
""
|
||||
],
|
||||
"description": "Create React Native Stateful Component"
|
||||
},
|
||||
"statefulReduxComponent": {
|
||||
"prefix": "rnrc",
|
||||
"body": [
|
||||
"import React, { Component } from 'react';",
|
||||
"",
|
||||
"import { View } from 'react-native';",
|
||||
"",
|
||||
"import { bindActionCreators } from 'redux';",
|
||||
"import { connect } from 'react-redux';",
|
||||
"",
|
||||
"// import { Container } from './styles';",
|
||||
"",
|
||||
"class ${1:${TM_DIRECTORY/^.*(\\/|\\\\)([^(\\/|\\\\)]+)$/$2/}} extends Component {",
|
||||
" render() {",
|
||||
" return <View />;",
|
||||
" }",
|
||||
"}",
|
||||
"",
|
||||
"const mapStateToProps = state => ({});",
|
||||
"",
|
||||
"// const mapDispatchToProps = dispatch =>",
|
||||
"// bindActionCreators(Actions, dispatch);",
|
||||
"",
|
||||
"export default connect(",
|
||||
" mapStateToProps,",
|
||||
" // mapDispatchToProps",
|
||||
")(${1:${TM_DIRECTORY/^.*(\\/|\\\\)([^(\\/|\\\\)]+)$/$2/}});",
|
||||
""
|
||||
],
|
||||
"description": "Create React Native Stateful Redux Component"
|
||||
},
|
||||
"statelessComponent": {
|
||||
"prefix": "rnsc",
|
||||
"body": [
|
||||
"import React from 'react';",
|
||||
"",
|
||||
"import { View } from 'react-native';",
|
||||
"",
|
||||
"// import { Container } from './styles';",
|
||||
"",
|
||||
"const ${1:${TM_DIRECTORY/^.*(\\/|\\\\)([^(\\/|\\\\)]+)$/$2/}} = () => <View />;",
|
||||
"",
|
||||
"export default ${1:${TM_DIRECTORY/^.*(\\/|\\\\)([^(\\/|\\\\)]+)$/$2/}};",
|
||||
""
|
||||
],
|
||||
"description": "Create React Native Stateless Component"
|
||||
},
|
||||
"componentFunctional": {
|
||||
"prefix": "rnfc",
|
||||
"body": [
|
||||
"import React from 'react';",
|
||||
"import { View } from 'react-native';",
|
||||
"",
|
||||
"// import { Container } from './styles';",
|
||||
"",
|
||||
"export default function ${1:${TM_DIRECTORY/^.*(\\/|\\\\)([^(\\/|\\\\)]+)$/$2/}}() {",
|
||||
" return (",
|
||||
" <View />",
|
||||
" );",
|
||||
"}",
|
||||
""
|
||||
],
|
||||
"description": "Create React Native Functional Component"
|
||||
},
|
||||
"componentFunctionalTypescript": {
|
||||
"prefix": "rnfcc",
|
||||
"body": [
|
||||
"import React from 'react';",
|
||||
"import { View } from 'react-native';",
|
||||
"",
|
||||
"// import { Container } from './styles';",
|
||||
"",
|
||||
"const ${1:${TM_DIRECTORY/^.*(\\/|\\\\)([^(\\/|\\\\)]+)$/$2/}} = () => {",
|
||||
" return <View />;",
|
||||
"}",
|
||||
"",
|
||||
"export default ${1:${TM_DIRECTORY/^.*(\\/|\\\\)([^(\\/|\\\\)]+)$/$2/}};"
|
||||
],
|
||||
"description": "Create React Native Functional Component"
|
||||
},
|
||||
"styles": {
|
||||
"prefix": "styled-rn",
|
||||
"body": [
|
||||
"import styled from 'styled-components/native';",
|
||||
"",
|
||||
"export const ${1:Container} = styled.${2:View}`",
|
||||
" ${3}",
|
||||
"`;",
|
||||
""
|
||||
],
|
||||
"description": "Create React Native Styled Components file"
|
||||
},
|
||||
"StyleSheet": {
|
||||
"prefix": "rn-stylesheet",
|
||||
"body": [
|
||||
"const ${1:styles} = StyleSheet.create({",
|
||||
" ${2:container}: {",
|
||||
" ${3}",
|
||||
" },",
|
||||
"});",
|
||||
""
|
||||
],
|
||||
"description": "Create React Native Styled Components StyleSheet"
|
||||
},
|
||||
"justifyContent": {
|
||||
"prefix": "just",
|
||||
"body": "justifyContent: '${1:center}',",
|
||||
"description": "justifyContent"
|
||||
},
|
||||
"alignItems": {
|
||||
"prefix": "align",
|
||||
"body": "alignItems: '${1:center}',",
|
||||
"description": "alignItems"
|
||||
},
|
||||
"alignSelf": {
|
||||
"prefix": "align",
|
||||
"body": "alignSelf: '${1:center}',",
|
||||
"description": "alignSelf"
|
||||
},
|
||||
"alignContent": {
|
||||
"prefix": "align",
|
||||
"body": "alignContent: '${1}',",
|
||||
"description": "alignContent"
|
||||
},
|
||||
"aspectRatio": {
|
||||
"prefix": "as",
|
||||
"body": "aspectRatio: '${1}',",
|
||||
"description": "aspectRatio"
|
||||
},
|
||||
"borderBottomWidth": {
|
||||
"prefix": "bor",
|
||||
"body": "borderBottomWidth: ${1},",
|
||||
"description": "borderBottomWidth"
|
||||
},
|
||||
"borderLeftWidth": {
|
||||
"prefix": "bor",
|
||||
"body": "borderLeftWidth: ${1},",
|
||||
"description": "borderLeftWidth"
|
||||
},
|
||||
"borderRightWidth": {
|
||||
"prefix": "bor",
|
||||
"body": "borderRightWidth: ${1},",
|
||||
"description": "borderRightWidth"
|
||||
},
|
||||
"borderTopWidth": {
|
||||
"prefix": "bor",
|
||||
"body": "borderTopWidth: ${1},",
|
||||
"description": "borderTopWidth"
|
||||
},
|
||||
"borderWidth": {
|
||||
"prefix": "bor",
|
||||
"body": "borderWidth: ${1},",
|
||||
"description": "borderWidth"
|
||||
},
|
||||
"borderColor": {
|
||||
"prefix": "bor",
|
||||
"body": "borderColor: ${1},",
|
||||
"description": "borderColor"
|
||||
},
|
||||
"borderRadius": {
|
||||
"prefix": "bor",
|
||||
"body": "borderRadius: ${1},",
|
||||
"description": "borderRadius"
|
||||
},
|
||||
"borderLeftColor": {
|
||||
"prefix": "bor",
|
||||
"body": "borderLeftColor: ${1},",
|
||||
"description": "borderLeftColor"
|
||||
},
|
||||
"borderRightColor": {
|
||||
"prefix": "bor",
|
||||
"body": "borderRightColor: ${1},",
|
||||
"description": "borderRightColor"
|
||||
},
|
||||
"borderTopColor": {
|
||||
"prefix": "bor",
|
||||
"body": "borderTopColor: ${1},",
|
||||
"description": "borderTopColor"
|
||||
},
|
||||
"borderBottomColor": {
|
||||
"prefix": "bor",
|
||||
"body": "borderBottomColor: ${1},",
|
||||
"description": "borderBottomColor"
|
||||
},
|
||||
"borderBottomLeftRadius": {
|
||||
"prefix": "bor",
|
||||
"body": "borderBottomLeftRadius: ${1},",
|
||||
"description": "borderBottomLeftRadius"
|
||||
},
|
||||
"borderBottomRightRadius": {
|
||||
"prefix": "bor",
|
||||
"body": "borderBottomRightRadius: ${1},",
|
||||
"description": "borderBottomRightRadius"
|
||||
},
|
||||
"borderTopLeftRadius": {
|
||||
"prefix": "bor",
|
||||
"body": "borderTopLeftRadius: ${1},",
|
||||
"description": "borderTopLeftRadius"
|
||||
},
|
||||
"borderTopRightRadius": {
|
||||
"prefix": "bor",
|
||||
"body": "borderTopRightRadius: ${1},",
|
||||
"description": "borderTopRightRadius"
|
||||
},
|
||||
"backgroundColor": {
|
||||
"prefix": "bac",
|
||||
"body": "backgroundColor: ${1},",
|
||||
"description": "backgroundColor"
|
||||
},
|
||||
"display": {
|
||||
"prefix": "di",
|
||||
"body": "display: '${1:none}',",
|
||||
"description": "display"
|
||||
},
|
||||
"opacity": {
|
||||
"prefix": "op",
|
||||
"body": "opacity: ${1},",
|
||||
"description": "opacity"
|
||||
},
|
||||
"shadowColor": {
|
||||
"prefix": "sha",
|
||||
"body": "shadowColor: '${1:none}',",
|
||||
"description": "shadowColor"
|
||||
},
|
||||
"shadowOffset": {
|
||||
"prefix": "sha",
|
||||
"body": "shadowOffset: ${1},",
|
||||
"description": "shadowOffset"
|
||||
},
|
||||
"shadowOpacity": {
|
||||
"prefix": "sha",
|
||||
"body": "shadowOpacity: ${1},",
|
||||
"description": "shadowOpacity"
|
||||
},
|
||||
"shadowRadius": {
|
||||
"prefix": "sha",
|
||||
"body": "shadowRadius: ${1},",
|
||||
"description": "shadowRadius"
|
||||
},
|
||||
"elevation": {
|
||||
"prefix": "e",
|
||||
"body": "elevation: ${1},",
|
||||
"description": "elevation"
|
||||
},
|
||||
"flex": {
|
||||
"prefix": "flex",
|
||||
"body": "flex: ${1},",
|
||||
"description": "flex"
|
||||
},
|
||||
"flexBasis": {
|
||||
"prefix": "flex",
|
||||
"body": "flexBasis: '${1}',",
|
||||
"description": "flexBasis"
|
||||
},
|
||||
"flexDirection": {
|
||||
"prefix": "flex",
|
||||
"body": "flexDirection: '${1:column}',",
|
||||
"description": "flexDirection"
|
||||
},
|
||||
"flexGrow": {
|
||||
"prefix": "flex",
|
||||
"body": "flexGrow: '${1}',",
|
||||
"description": "flexGrow"
|
||||
},
|
||||
"flexShrink": {
|
||||
"prefix": "flex",
|
||||
"body": "flexShrink: '${1}',",
|
||||
"description": "flexShrink"
|
||||
},
|
||||
"flexWrap": {
|
||||
"prefix": "flex",
|
||||
"body": "flexWrap: '${1}',",
|
||||
"description": "flexWrap"
|
||||
},
|
||||
"fontSize": {
|
||||
"prefix": "fo",
|
||||
"body": "fontSize: ${1},",
|
||||
"description": "fontSize"
|
||||
},
|
||||
"fontStyle": {
|
||||
"prefix": "fo",
|
||||
"body": "fontStyle: '${1:normal}',",
|
||||
"description": "fontStyle"
|
||||
},
|
||||
"fontFamily": {
|
||||
"prefix": "fo",
|
||||
"body": "fontFamily: '${1}',",
|
||||
"description": "fontFamily"
|
||||
},
|
||||
"fontWeight": {
|
||||
"prefix": "fo",
|
||||
"body": "fontWeight: '${1:normal}',",
|
||||
"description": "fontWeight"
|
||||
},
|
||||
"height": {
|
||||
"prefix": "h",
|
||||
"body": "height: ${1},",
|
||||
"description": "height"
|
||||
},
|
||||
"left": {
|
||||
"prefix": "l",
|
||||
"body": "left: ${1},",
|
||||
"description": "left"
|
||||
},
|
||||
"margin": {
|
||||
"prefix": "mar",
|
||||
"body": "margin: '${1}',",
|
||||
"description": "margin"
|
||||
},
|
||||
"marginBottom": {
|
||||
"prefix": "mar",
|
||||
"body": "marginBottom: ${1},",
|
||||
"description": "marginBottom"
|
||||
},
|
||||
"marginHorizontal": {
|
||||
"prefix": "mar",
|
||||
"body": "marginHorizontal: '${1}',",
|
||||
"description": "marginHorizontal"
|
||||
},
|
||||
"marginLeft": {
|
||||
"prefix": "mar",
|
||||
"body": "marginLeft: ${1},",
|
||||
"description": "marginLeft"
|
||||
},
|
||||
"marginRight": {
|
||||
"prefix": "mar",
|
||||
"body": "marginRight: ${1},",
|
||||
"description": "marginRight"
|
||||
},
|
||||
"marginTop": {
|
||||
"prefix": "mar",
|
||||
"body": "marginTop: ${1},",
|
||||
"description": "marginTop"
|
||||
},
|
||||
"marginVertical": {
|
||||
"prefix": "mar",
|
||||
"body": "marginVertical: '${1}',",
|
||||
"description": "marginVertical"
|
||||
},
|
||||
"maxHeight": {
|
||||
"prefix": "max",
|
||||
"body": "maxHeight: ${1},",
|
||||
"description": "maxHeight"
|
||||
},
|
||||
"maxWidth": {
|
||||
"prefix": "max",
|
||||
"body": "maxWidth: ${1},",
|
||||
"description": "maxWidth"
|
||||
},
|
||||
"minHeight": {
|
||||
"prefix": "min",
|
||||
"body": "minHeight: ${1},",
|
||||
"description": "minHeight"
|
||||
},
|
||||
"minWidth": {
|
||||
"prefix": "min",
|
||||
"body": "minWidth: ${1},",
|
||||
"description": "minWidth"
|
||||
},
|
||||
"overflow": {
|
||||
"prefix": "over",
|
||||
"body": "overflow: '${1}',",
|
||||
"description": "overflow"
|
||||
},
|
||||
"padding": {
|
||||
"prefix": "padding",
|
||||
"body": "padding: ${1},",
|
||||
"description": "padding"
|
||||
},
|
||||
"paddingBottom": {
|
||||
"prefix": "padding",
|
||||
"body": "paddingBottom: ${1},",
|
||||
"description": "paddingBottom"
|
||||
},
|
||||
"paddingHorizontal": {
|
||||
"prefix": "padding",
|
||||
"body": "paddingHorizontal: ${1},",
|
||||
"description": "paddingHorizontal"
|
||||
},
|
||||
"paddingLeft": {
|
||||
"prefix": "padding",
|
||||
"body": "paddingLeft: ${1},",
|
||||
"description": "paddingLeft"
|
||||
},
|
||||
"paddingRight": {
|
||||
"prefix": "padding",
|
||||
"body": "paddingRight: ${1},",
|
||||
"description": "paddingRight"
|
||||
},
|
||||
"paddingTop": {
|
||||
"prefix": "padding",
|
||||
"body": "paddingTop: ${1},",
|
||||
"description": "paddingTop"
|
||||
},
|
||||
"paddingVertical": {
|
||||
"prefix": "padding",
|
||||
"body": "paddingVertical: ${1},",
|
||||
"description": "paddingVertical"
|
||||
},
|
||||
"position": {
|
||||
"prefix": "pos",
|
||||
"body": "position: ${1},",
|
||||
"description": "position"
|
||||
},
|
||||
"right": {
|
||||
"prefix": "ri",
|
||||
"body": "right: ${1},",
|
||||
"description": "right"
|
||||
},
|
||||
"top": {
|
||||
"prefix": "top",
|
||||
"body": "top: ${1},",
|
||||
"description": "top"
|
||||
},
|
||||
"width": {
|
||||
"prefix": "w",
|
||||
"body": "width: ${1},",
|
||||
"description": "width"
|
||||
},
|
||||
"zIndex": {
|
||||
"prefix": "z",
|
||||
"body": "zIndex: ${1},",
|
||||
"description": "zIndex"
|
||||
},
|
||||
"api": {
|
||||
"prefix": "api",
|
||||
"body": [
|
||||
"import axios from 'axios';",
|
||||
"",
|
||||
"const api = axios.create({",
|
||||
" baseURL: ${1},",
|
||||
"});",
|
||||
"",
|
||||
"export default api;",
|
||||
""
|
||||
],
|
||||
"description": "Create Axios Configuration file"
|
||||
},
|
||||
"region": {
|
||||
"prefix": "region",
|
||||
"body": [
|
||||
"//#region ${1}",
|
||||
"${2}",
|
||||
"//#endregion"
|
||||
],
|
||||
"description": "Create region"
|
||||
},
|
||||
"regionStartEnd": {
|
||||
"prefix": "#regionStartEnd",
|
||||
"body": [
|
||||
"//#region ${1}",
|
||||
"${2}",
|
||||
"//#endregion"
|
||||
],
|
||||
"description": "Create region"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,385 @@
|
||||
{
|
||||
"destructuring of props": {
|
||||
"prefix": "dp",
|
||||
"body": ["const { ${1:name} } = this.props"]
|
||||
},
|
||||
"destructuring of state": {
|
||||
"prefix": "ds",
|
||||
"body": ["const { ${1:name} } = this.state"]
|
||||
},
|
||||
"reactClassCompoment": {
|
||||
"prefix": "rcc",
|
||||
"body": "import React, { Component } from 'react'\n\nclass ${TM_FILENAME_BASE} extends Component {\n\trender () {\n\t\treturn (\n\t\t\t<div>\n\t\t\t\t$0\n\t\t\t</div>\n\t\t)\n\t}\n}\n\nexport default ${1}",
|
||||
"description": "Creates a React component class"
|
||||
},
|
||||
"reactJustClassCompoment": {
|
||||
"prefix": "rcjc",
|
||||
"body": "class ${TM_FILENAME_BASE} extends Component {\n\trender () {\n\t\treturn (\n\t\t\t<div>\n\t\t\t\t$0\n\t\t\t</div>\n\t\t)\n\t}\n}\n",
|
||||
"description": "Creates a React component class"
|
||||
},
|
||||
"reactClassCompomentPropTypes": {
|
||||
"prefix": "rccp",
|
||||
"body": "import React, { Component, PropTypes } from 'react'\n\nclass ${TM_FILENAME_BASE} extends Component {\n\trender () {\n\t\treturn (\n\t\t\t<div>\n\t\t\t\t$0\n\t\t\t</div>\n\t\t)\n\t}\n}\n\n${1}.propTypes = {\n\n}\n\nexport default ${1}",
|
||||
"description": "Creates a React component class with PropTypes"
|
||||
},
|
||||
"reactClassCompomentWithMethods": {
|
||||
"prefix": "rcfc",
|
||||
"body": "import React, { Component, PropTypes } from 'react'\n\nclass ${TM_FILENAME_BASE} extends Component {\n\tconstructor(props) {\n\t\tsuper(props)\n\n\t}\n\n\tcomponentWillMount () {\n\n\t}\n\n\tcomponentDidMount () {\n\n\t}\n\n\tcomponentWillReceiveProps (nextProps) {\n\n\t}\n\n\tshouldComponentUpdate (nextProps, nextState) {\n\n\t}\n\n\tcomponentWillUpdate (nextProps, nextState) {\n\n\t}\n\n\tcomponentDidUpdate (prevProps, prevState) {\n\n\t}\n\n\tcomponentWillUnmount () {\n\n\t}\n\n\trender () {\n\t\treturn (\n\t\t\t<div>\n\n\t\t\t</div>\n\t\t)\n\t}\n}\n\n${1}.propTypes = {\n\n}\n\nexport default ${1}",
|
||||
"description": "Creates a React component class with PropTypes and all lifecycle methods"
|
||||
},
|
||||
"reactFunctionComponent": {
|
||||
"prefix": "rfc",
|
||||
"body": "import React from 'react'\n\nexport const ${TM_FILENAME_BASE} = (props : {}) => {\n\treturn (\n\t\t<div>\n\t\t\t$0\n\t\t</div>\n\t)\n}",
|
||||
"description": "Creates a React functional component without PropTypes"
|
||||
},
|
||||
"reactFunctionComponentWithEmotion": {
|
||||
"prefix": "rfce",
|
||||
"body": "import { css } from '@emotion/core'\nimport React from 'react'\n\nexport const ${TM_FILENAME_BASE} = (props: {}) => {\n\treturn (\n\t\t<div css={css``}>\n\t\t\t$0\n\t\t</div>\n\t)\n}",
|
||||
"description": "Creates a React functional component with emotion import"
|
||||
},
|
||||
"classConstructor": {
|
||||
"prefix": "con",
|
||||
"body": "constructor (props) {\n\tsuper(props)\n\t$0\n}\n",
|
||||
"description": "Adds a default constructor for the class that contains props as arguments"
|
||||
},
|
||||
"classConstructorContext": {
|
||||
"prefix": "conc",
|
||||
"body": "constructor (props, context) {\n\tsuper(props, context)\n\t$0\n}\n",
|
||||
"description": "Adds a default constructor for the class that contains props and context as arguments"
|
||||
},
|
||||
"componentWillMount": {
|
||||
"prefix": "cwm",
|
||||
"body": "\ncomponentWillMount () {\n\t$0\n}\n",
|
||||
"description": "Invoked once, both on the client and server, immediately before the initial rendering occurs"
|
||||
},
|
||||
"componentDidMount": {
|
||||
"prefix": "cdm",
|
||||
"body": "componentDidMount () {\n\t$0\n}\n",
|
||||
"description": "Invoked once, only on the client (not on the server), immediately after the initial rendering occurs."
|
||||
},
|
||||
"componentWillReceiveProps": {
|
||||
"prefix": "cwr",
|
||||
"body": "componentWillReceiveProps (nextProps) {\n\t$0\n}\n",
|
||||
"description": "Invoked when a component is receiving new props. This method is not called for the initial render."
|
||||
},
|
||||
"componentGetDerivedStateFromProps": {
|
||||
"prefix": "cgd",
|
||||
"body": "\nstatic getDerivedStateFromProps(nextProps, prevState) {\n\t$0\n}\n",
|
||||
"description": "Invoked after a component is instantiated as well as when it receives new props. It should return an object to update state, or null to indicate that the new props do not require any state updates."
|
||||
},
|
||||
"shouldComponentUpdate": {
|
||||
"prefix": "scu",
|
||||
"body": "shouldComponentUpdate (nextProps, nextState) {\n\t$0\n}\n",
|
||||
"description": "Invoked before rendering when new props or state are being received. "
|
||||
},
|
||||
"componentWillUpdate": {
|
||||
"prefix": "cwup",
|
||||
"body": "componentWillUpdate (nextProps, nextState) {\n\t$0\n}\n",
|
||||
"description": "Invoked immediately before rendering when new props or state are being received."
|
||||
},
|
||||
"componentDidUpdate": {
|
||||
"prefix": "cdup",
|
||||
"body": "componentDidUpdate (prevProps, prevState) {\n\t$0\n}\n",
|
||||
"description": "Invoked immediately after the component's updates are flushed to the DOM."
|
||||
},
|
||||
"componentWillUnmount": {
|
||||
"prefix": "cwun",
|
||||
"body": "componentWillUnmount () {\n\t$0\n}\n",
|
||||
"description": "Invoked immediately before a component is unmounted from the DOM."
|
||||
},
|
||||
"componentRender": {
|
||||
"prefix": "ren",
|
||||
"body": "render () {\n\treturn (\n\t\t<div>\n\t\t\t$0\n\t\t</div>\n\t)\n}",
|
||||
"description": "When called, it should examine this.props and this.state and return a single child element."
|
||||
},
|
||||
"componentSetStateObject": {
|
||||
"prefix": "sst",
|
||||
"body": "this.setState($0)",
|
||||
"description": "Performs a shallow merge of nextState into current state"
|
||||
},
|
||||
"componentSetStateFunc": {
|
||||
"prefix": "ssf",
|
||||
"body": "this.setState((state, props) => { return { $0 }})\n",
|
||||
"description": "Performs a shallow merge of nextState into current state"
|
||||
},
|
||||
"componentProps": {
|
||||
"prefix": "tp",
|
||||
"body": "this.props.$0",
|
||||
"description": "Access component's props"
|
||||
},
|
||||
"componentState": {
|
||||
"prefix": "ts",
|
||||
"body": "this.state.$0",
|
||||
"description": "Access component's state"
|
||||
},
|
||||
"propTypes": {
|
||||
"prefix": "rpt",
|
||||
"body": "$1.propTypes = {\n\t$2\n}",
|
||||
"description": "Creates empty propTypes declaration"
|
||||
},
|
||||
"propTypeArray": {
|
||||
"prefix": "pta",
|
||||
"body": "PropTypes.array,",
|
||||
"description": "Array prop type"
|
||||
},
|
||||
"propTypeArrayRequired": {
|
||||
"prefix": "ptar",
|
||||
"body": "PropTypes.array.isRequired,",
|
||||
"description": "Array prop type required"
|
||||
},
|
||||
"propTypeBool": {
|
||||
"prefix": "ptb",
|
||||
"body": "PropTypes.bool,",
|
||||
"description": "Bool prop type"
|
||||
},
|
||||
"propTypeBoolRequired": {
|
||||
"prefix": "ptbr",
|
||||
"body": "PropTypes.bool.isRequired,",
|
||||
"description": "Bool prop type required"
|
||||
},
|
||||
"propTypeFunc": {
|
||||
"prefix": "ptf",
|
||||
"body": "PropTypes.func,",
|
||||
"description": "Func prop type"
|
||||
},
|
||||
"propTypeFuncRequired": {
|
||||
"prefix": "ptfr",
|
||||
"body": "PropTypes.func.isRequired,",
|
||||
"description": "Func prop type required"
|
||||
},
|
||||
"propTypeNumber": {
|
||||
"prefix": "ptn",
|
||||
"body": "PropTypes.number,",
|
||||
"description": "Number prop type"
|
||||
},
|
||||
"propTypeNumberRequired": {
|
||||
"prefix": "ptnr",
|
||||
"body": "PropTypes.number.isRequired,",
|
||||
"description": "Number prop type required"
|
||||
},
|
||||
"propTypeObject": {
|
||||
"prefix": "pto",
|
||||
"body": "PropTypes.object,",
|
||||
"description": "Object prop type"
|
||||
},
|
||||
"propTypeObjectRequired": {
|
||||
"prefix": "ptor",
|
||||
"body": "PropTypes.object.isRequired,",
|
||||
"description": "Object prop type required"
|
||||
},
|
||||
"propTypeString": {
|
||||
"prefix": "pts",
|
||||
"body": "PropTypes.string,",
|
||||
"description": "String prop type"
|
||||
},
|
||||
"propTypeStringRequired": {
|
||||
"prefix": "ptsr",
|
||||
"body": "PropTypes.string.isRequired,",
|
||||
"description": "String prop type required"
|
||||
},
|
||||
"propTypeNode": {
|
||||
"prefix": "ptnd",
|
||||
"body": "PropTypes.node,",
|
||||
"description": "Anything that can be rendered: numbers, strings, elements or an array"
|
||||
},
|
||||
"propTypeNodeRequired": {
|
||||
"prefix": "ptndr",
|
||||
"body": "PropTypes.node.isRequired,",
|
||||
"description": "Anything that can be rendered: numbers, strings, elements or an array required"
|
||||
},
|
||||
"propTypeElement": {
|
||||
"prefix": "ptel",
|
||||
"body": "PropTypes.element,",
|
||||
"description": "React element prop type"
|
||||
},
|
||||
"propTypeElementRequired": {
|
||||
"prefix": "ptelr",
|
||||
"body": "PropTypes.element.isRequired,",
|
||||
"description": "React element prop type required"
|
||||
},
|
||||
"propTypeInstanceOf": {
|
||||
"prefix": "pti",
|
||||
"body": "PropTypes.instanceOf($0),",
|
||||
"description": "Is an instance of a class prop type"
|
||||
},
|
||||
"propTypeInstanceOfRequired": {
|
||||
"prefix": "ptir",
|
||||
"body": "PropTypes.instanceOf($0).isRequired,",
|
||||
"description": "Is an instance of a class prop type required"
|
||||
},
|
||||
"propTypeEnum": {
|
||||
"prefix": "pte",
|
||||
"body": "PropTypes.oneOf(['$0']),",
|
||||
"description": "Prop type limited to specific values by treating it as an enum"
|
||||
},
|
||||
"propTypeEnumRequired": {
|
||||
"prefix": "pter",
|
||||
"body": "PropTypes.oneOf(['$0']).isRequired,",
|
||||
"description": "Prop type limited to specific values by treating it as an enum required"
|
||||
},
|
||||
"propTypeOneOfType": {
|
||||
"prefix": "ptet",
|
||||
"body": "PropTypes.oneOfType([\n\t$0\n]),",
|
||||
"description": "An object that could be one of many types"
|
||||
},
|
||||
"propTypeOneOfTypeRequired": {
|
||||
"prefix": "ptetr",
|
||||
"body": "PropTypes.oneOfType([\n\t$0\n]).isRequired,",
|
||||
"description": "An object that could be one of many types required"
|
||||
},
|
||||
"propTypeArrayOf": {
|
||||
"prefix": "ptao",
|
||||
"body": "PropTypes.arrayOf($0),",
|
||||
"description": "An array of a certain type"
|
||||
},
|
||||
"propTypeArrayOfRequired": {
|
||||
"prefix": "ptaor",
|
||||
"body": "PropTypes.arrayOf($0).isRequired,",
|
||||
"description": "An array of a certain type required"
|
||||
},
|
||||
"propTypeObjectOf": {
|
||||
"prefix": "ptoo",
|
||||
"body": "PropTypes.objectOf($0),",
|
||||
"description": "An object with property values of a certain type"
|
||||
},
|
||||
"propTypeObjectOfRequired": {
|
||||
"prefix": "ptoor",
|
||||
"body": "PropTypes.objectOf($0).isRequired,",
|
||||
"description": "An object with property values of a certain type required"
|
||||
},
|
||||
"propTypeShape": {
|
||||
"prefix": "ptsh",
|
||||
"body": "PropTypes.shape({\n\t$0\n}),",
|
||||
"description": "An object taking on a particular shape"
|
||||
},
|
||||
"propTypeShapeRequired": {
|
||||
"prefix": "ptshr",
|
||||
"body": "PropTypes.shape({\n\t$0\n}).isRequired,",
|
||||
"description": "An object taking on a particular shape required"
|
||||
},
|
||||
"jsx element": {
|
||||
"prefix": "j",
|
||||
"body": "<${1:elementName}>\n\t$0\n</${1}>",
|
||||
"description": "an element"
|
||||
},
|
||||
"jsx element self closed": {
|
||||
"prefix": "jc",
|
||||
"body": "<${1:elementName} />",
|
||||
"description": "an element self closed"
|
||||
},
|
||||
"jsx elements map": {
|
||||
"prefix": "jm",
|
||||
"body": "{${1:array}.map((item) => <${2:elementName} key={item.id}>\n\t$0\n</${2}>)}",
|
||||
"description": "an element self closed"
|
||||
},
|
||||
"jsx elements map with return": {
|
||||
"prefix": "jmr",
|
||||
"body": "{${1:array}.map((item) => {\n\treturn <${2:elementName} key={item.id}>\n\t$0\n</${2}>\n})}",
|
||||
"description": "an element self closed"
|
||||
},
|
||||
"jsx element wrap selection": {
|
||||
"prefix": "jsx wrap selection with element",
|
||||
"body": "<${1:elementName}>\n\t{$TM_SELECTED_TEXT}\n</${1}>",
|
||||
"description": "an element"
|
||||
},
|
||||
"useState": {
|
||||
"prefix": "us",
|
||||
"body": "const [${1:val}, set${2:setterName}] = useState(${3:defVal})",
|
||||
"description": "use state hook"
|
||||
},
|
||||
"useEffect": {
|
||||
"prefix": "ue",
|
||||
"body": ["useEffect(() => {", "\t$1", "}, [${3:dependencies}])$0"],
|
||||
"description": "React useEffect() hook"
|
||||
},
|
||||
"useEffect with cleanup": {
|
||||
"prefix": "uec",
|
||||
"body": [
|
||||
"useEffect(() => {",
|
||||
"\t$1",
|
||||
"\n\treturn () => {",
|
||||
"\t\t$2",
|
||||
"\t}",
|
||||
"}, [${3:dependencies}])$0"
|
||||
],
|
||||
"description": "React useEffect() hook with a cleanup function"
|
||||
},
|
||||
"createContext": {
|
||||
"prefix": "cc",
|
||||
"body": [
|
||||
"export const $1 = createContext<$2>(",
|
||||
"\t(null as any) as $2",
|
||||
")"
|
||||
],
|
||||
"description": "creates a react context"
|
||||
},
|
||||
"useContext": {
|
||||
"prefix": "uc",
|
||||
"body": ["const $1 = useContext($2)$0"],
|
||||
"description": "React useContext() hook"
|
||||
},
|
||||
"useRef": {
|
||||
"prefix": "ur",
|
||||
"body": ["const ${1:elName}El = useRef(null)$0"],
|
||||
"description": "React useRef() hook"
|
||||
},
|
||||
"useCallback": {
|
||||
"prefix": "ucb",
|
||||
"body": [
|
||||
"const ${1:memoizedCallback} = useCallback(",
|
||||
"\t() => {",
|
||||
"\t\t${2:doSomething}(${3:a}, ${4:b})",
|
||||
"\t},",
|
||||
"\t[${5:a}, ${6:b}],",
|
||||
")$0"
|
||||
],
|
||||
"description": "React useCallback() hook"
|
||||
},
|
||||
"useMemo": {
|
||||
"prefix": "ume",
|
||||
"body": [
|
||||
"const ${1:memoizedValue} = useMemo(() => ${2:computeExpensiveValue}(${3:a}, ${4:b}), [${5:a}, ${6:b}])$0"
|
||||
],
|
||||
"description": "React useMemo() hook"
|
||||
},
|
||||
"describeBlock": {
|
||||
"prefix": "desc",
|
||||
"body": [
|
||||
"describe('$1', () => {",
|
||||
" $0",
|
||||
"})",
|
||||
""
|
||||
],
|
||||
"description": "Testing `describe` block"
|
||||
},
|
||||
"testBlock": {
|
||||
"prefix": "test",
|
||||
"body": [
|
||||
"test('should $1', () => {",
|
||||
" $0",
|
||||
"})",
|
||||
""
|
||||
],
|
||||
"description": "Testing `test` block"
|
||||
},
|
||||
"itBlock": {
|
||||
"prefix": "tit",
|
||||
"body": [
|
||||
"it('should $1', () => {",
|
||||
" $0",
|
||||
"})",
|
||||
""
|
||||
],
|
||||
"description": "Testing `it` block"
|
||||
},
|
||||
"itAsyncBlock": {
|
||||
"prefix": "tita",
|
||||
"body": [
|
||||
"it('should $1', async () => {",
|
||||
" $0",
|
||||
"})",
|
||||
""
|
||||
],
|
||||
"description": "Testing async `it` block"
|
||||
}
|
||||
}
|
||||
394
dot_vim/plugged/friendly-snippets/snippets/javascript/react.json
Normal file
394
dot_vim/plugged/friendly-snippets/snippets/javascript/react.json
Normal file
@@ -0,0 +1,394 @@
|
||||
{
|
||||
"destructuring of props": {
|
||||
"prefix": "dp",
|
||||
"body": ["const { ${1:name} } = this.props"]
|
||||
},
|
||||
"destructuring of state": {
|
||||
"prefix": "ds",
|
||||
"body": ["const { ${1:name} } = this.state"]
|
||||
},
|
||||
"if falsy return null": {
|
||||
"prefix": "ifr",
|
||||
"body": "if (!${1:condition}) {\n\treturn null\n}"
|
||||
},
|
||||
"reactClassCompoment": {
|
||||
"prefix": "rcc",
|
||||
"body": "import { Component } from 'react'\n\nclass ${TM_FILENAME_BASE} extends Component {\n\trender () {\n\t\treturn (\n\t\t\t<div>\n\t\t\t\t$0\n\t\t\t</div>\n\t\t)\n\t}\n}\n\nexport default ${1}",
|
||||
"description": "Creates a React component class"
|
||||
},
|
||||
"reactJustClassCompoment": {
|
||||
"prefix": "rcjc",
|
||||
"body": "class ${TM_FILENAME_BASE} extends Component {\n\trender () {\n\t\treturn (\n\t\t\t<div>\n\t\t\t\t$0\n\t\t\t</div>\n\t\t)\n\t}\n}\n",
|
||||
"description": "Creates a React component class"
|
||||
},
|
||||
"reactClassCompomentPropTypes": {
|
||||
"prefix": "rccp",
|
||||
"body": "import { Component, PropTypes } from 'react'\n\nclass ${TM_FILENAME_BASE} extends Component {\n\trender () {\n\t\treturn (\n\t\t\t<div>\n\t\t\t\t$0\n\t\t\t</div>\n\t\t)\n\t}\n}\n\n${1}.propTypes = {\n\n}\n\nexport default ${1}",
|
||||
"description": "Creates a React component class with PropTypes"
|
||||
},
|
||||
"reactClassCompomentWithMethods": {
|
||||
"prefix": "rcfc",
|
||||
"body": "import { Component, PropTypes } from 'react'\n\nclass ${TM_FILENAME_BASE} extends Component {\n\tconstructor(props) {\n\t\tsuper(props)\n\n\t}\n\n\tcomponentWillMount () {\n\n\t}\n\n\tcomponentDidMount () {\n\n\t}\n\n\tcomponentWillReceiveProps (nextProps) {\n\n\t}\n\n\tshouldComponentUpdate (nextProps, nextState) {\n\n\t}\n\n\tcomponentWillUpdate (nextProps, nextState) {\n\n\t}\n\n\tcomponentDidUpdate (prevProps, prevState) {\n\n\t}\n\n\tcomponentWillUnmount () {\n\n\t}\n\n\trender () {\n\t\treturn (\n\t\t\t<div>\n\n\t\t\t</div>\n\t\t)\n\t}\n}\n\n${1}.propTypes = {\n\n}\n\nexport default ${1}",
|
||||
"description": "Creates a React component class with PropTypes and all lifecycle methods"
|
||||
},
|
||||
"reactFunctionComponent": {
|
||||
"prefix": "rfc",
|
||||
"body": "\nconst ${TM_FILENAME_BASE} = () => {\n\treturn (\n\t\t<div>\n\t\t\t$0\n\t\t</div>\n\t)\n}\n\nexport default ${TM_FILENAME_BASE}",
|
||||
"description": "Creates a React function component without PropTypes"
|
||||
},
|
||||
"reactFunctionComponentWithCustomName": {
|
||||
"prefix": "rfcn",
|
||||
"body": "\nconst ${1:functionname} = () => {\n\treturn (\n\t\t<div>\n\t\t\t$0\n\t\t</div>\n\t)\n}\n\nexport default ${1:functionname}",
|
||||
"description": "Creates a React function component with custom name"
|
||||
},
|
||||
"reactFunctionComponentWithEmotion": {
|
||||
"prefix": "rfce",
|
||||
"body": "import { css } from '@emotion/core'\n\nexport const ${TM_FILENAME_BASE} = () => {\n\treturn (\n\t\t<div css={css``}>\n\t\t\t$0\n\t\t</div>\n\t)\n}",
|
||||
"description": "Creates a React functional component with emotion"
|
||||
},
|
||||
"reactStatelessProps": {
|
||||
"prefix": "rfcp",
|
||||
"body": "import { PropTypes } from 'react'\n\nconst ${TM_FILENAME_BASE} = props => {\n\treturn (\n\t\t<div>\n\t\t\t\n\t\t</div>\n\t)\n}\n\n${1}.propTypes = {\n\t$0\n}\n\nexport default ${1}",
|
||||
"description": "Creates a React function component with PropTypes"
|
||||
},
|
||||
"classConstructor": {
|
||||
"prefix": "con",
|
||||
"body": "constructor (props) {\n\tsuper(props)\n\t$0\n}\n",
|
||||
"description": "Adds a default constructor for the class that contains props as arguments"
|
||||
},
|
||||
"classConstructorContext": {
|
||||
"prefix": "conc",
|
||||
"body": "constructor (props, context) {\n\tsuper(props, context)\n\t$0\n}\n",
|
||||
"description": "Adds a default constructor for the class that contains props and context as arguments"
|
||||
},
|
||||
"componentWillMount": {
|
||||
"prefix": "cwm",
|
||||
"body": "\ncomponentWillMount () {\n\t$0\n}\n",
|
||||
"description": "Invoked once, both on the client and server, immediately before the initial rendering occurs"
|
||||
},
|
||||
"componentDidMount": {
|
||||
"prefix": "cdm",
|
||||
"body": "componentDidMount () {\n\t$0\n}\n",
|
||||
"description": "Invoked once, only on the client (not on the server), immediately after the initial rendering occurs."
|
||||
},
|
||||
"componentWillReceiveProps": {
|
||||
"prefix": "cwr",
|
||||
"body": "componentWillReceiveProps (nextProps) {\n\t$0\n}\n",
|
||||
"description": "Invoked when a component is receiving new props. This method is not called for the initial render."
|
||||
},
|
||||
"componentGetDerivedStateFromProps": {
|
||||
"prefix": "cgd",
|
||||
"body": "\nstatic getDerivedStateFromProps(nextProps, prevState) {\n\t$0\n}\n",
|
||||
"description": "Invoked after a component is instantiated as well as when it receives new props. It should return an object to update state, or null to indicate that the new props do not require any state updates."
|
||||
},
|
||||
"shouldComponentUpdate": {
|
||||
"prefix": "scu",
|
||||
"body": "shouldComponentUpdate (nextProps, nextState) {\n\t$0\n}\n",
|
||||
"description": "Invoked before rendering when new props or state are being received. "
|
||||
},
|
||||
"componentWillUpdate": {
|
||||
"prefix": "cwup",
|
||||
"body": "componentWillUpdate (nextProps, nextState) {\n\t$0\n}\n",
|
||||
"description": "Invoked immediately before rendering when new props or state are being received."
|
||||
},
|
||||
"componentDidUpdate": {
|
||||
"prefix": "cdup",
|
||||
"body": "componentDidUpdate (prevProps, prevState) {\n\t$0\n}\n",
|
||||
"description": "Invoked immediately after the component's updates are flushed to the DOM."
|
||||
},
|
||||
"componentWillUnmount": {
|
||||
"prefix": "cwun",
|
||||
"body": "componentWillUnmount () {\n\t$0\n}\n",
|
||||
"description": "Invoked immediately before a component is unmounted from the DOM."
|
||||
},
|
||||
"componentRender": {
|
||||
"prefix": "ren",
|
||||
"body": "render () {\n\treturn (\n\t\t<div>\n\t\t\t$0\n\t\t</div>\n\t)\n}",
|
||||
"description": "When called, it should examine this.props and this.state and return a single child element."
|
||||
},
|
||||
"componentSetStateObject": {
|
||||
"prefix": "sst",
|
||||
"body": "this.setState($0)",
|
||||
"description": "Performs a shallow merge of nextState into current state"
|
||||
},
|
||||
"componentSetStateFunc": {
|
||||
"prefix": "ssf",
|
||||
"body": "this.setState((state, props) => { return { $0 }})\n",
|
||||
"description": "Performs a shallow merge of nextState into current state"
|
||||
},
|
||||
"componentProps": {
|
||||
"prefix": "tp",
|
||||
"body": "this.props.$0",
|
||||
"description": "Access component's props"
|
||||
},
|
||||
"componentState": {
|
||||
"prefix": "ts",
|
||||
"body": "this.state.$0",
|
||||
"description": "Access component's state"
|
||||
},
|
||||
"propTypes": {
|
||||
"prefix": "rpt",
|
||||
"body": "$1.propTypes = {\n\t$2\n}",
|
||||
"description": "Creates empty propTypes declaration"
|
||||
},
|
||||
"propTypeArray": {
|
||||
"prefix": "pta",
|
||||
"body": "PropTypes.array,",
|
||||
"description": "Array prop type"
|
||||
},
|
||||
"propTypeArrayRequired": {
|
||||
"prefix": "ptar",
|
||||
"body": "PropTypes.array.isRequired,",
|
||||
"description": "Array prop type required"
|
||||
},
|
||||
"propTypeBool": {
|
||||
"prefix": "ptb",
|
||||
"body": "PropTypes.bool,",
|
||||
"description": "Bool prop type"
|
||||
},
|
||||
"propTypeBoolRequired": {
|
||||
"prefix": "ptbr",
|
||||
"body": "PropTypes.bool.isRequired,",
|
||||
"description": "Bool prop type required"
|
||||
},
|
||||
"propTypeFunc": {
|
||||
"prefix": "ptf",
|
||||
"body": "PropTypes.func,",
|
||||
"description": "Func prop type"
|
||||
},
|
||||
"propTypeFuncRequired": {
|
||||
"prefix": "ptfr",
|
||||
"body": "PropTypes.func.isRequired,",
|
||||
"description": "Func prop type required"
|
||||
},
|
||||
"propTypeNumber": {
|
||||
"prefix": "ptn",
|
||||
"body": "PropTypes.number,",
|
||||
"description": "Number prop type"
|
||||
},
|
||||
"propTypeNumberRequired": {
|
||||
"prefix": "ptnr",
|
||||
"body": "PropTypes.number.isRequired,",
|
||||
"description": "Number prop type required"
|
||||
},
|
||||
"propTypeObject": {
|
||||
"prefix": "pto",
|
||||
"body": "PropTypes.object,",
|
||||
"description": "Object prop type"
|
||||
},
|
||||
"propTypeObjectRequired": {
|
||||
"prefix": "ptor",
|
||||
"body": "PropTypes.object.isRequired,",
|
||||
"description": "Object prop type required"
|
||||
},
|
||||
"propTypeString": {
|
||||
"prefix": "pts",
|
||||
"body": "PropTypes.string,",
|
||||
"description": "String prop type"
|
||||
},
|
||||
"propTypeStringRequired": {
|
||||
"prefix": "ptsr",
|
||||
"body": "PropTypes.string.isRequired,",
|
||||
"description": "String prop type required"
|
||||
},
|
||||
"propTypeNode": {
|
||||
"prefix": "ptnd",
|
||||
"body": "PropTypes.node,",
|
||||
"description": "Anything that can be rendered: numbers, strings, elements or an array"
|
||||
},
|
||||
"propTypeNodeRequired": {
|
||||
"prefix": "ptndr",
|
||||
"body": "PropTypes.node.isRequired,",
|
||||
"description": "Anything that can be rendered: numbers, strings, elements or an array required"
|
||||
},
|
||||
"propTypeElement": {
|
||||
"prefix": "ptel",
|
||||
"body": "PropTypes.element,",
|
||||
"description": "React element prop type"
|
||||
},
|
||||
"propTypeElementRequired": {
|
||||
"prefix": "ptelr",
|
||||
"body": "PropTypes.element.isRequired,",
|
||||
"description": "React element prop type required"
|
||||
},
|
||||
"propTypeInstanceOf": {
|
||||
"prefix": "pti",
|
||||
"body": "PropTypes.instanceOf($0),",
|
||||
"description": "Is an instance of a class prop type"
|
||||
},
|
||||
"propTypeInstanceOfRequired": {
|
||||
"prefix": "ptir",
|
||||
"body": "PropTypes.instanceOf($0).isRequired,",
|
||||
"description": "Is an instance of a class prop type required"
|
||||
},
|
||||
"propTypeEnum": {
|
||||
"prefix": "pte",
|
||||
"body": "PropTypes.oneOf(['$0']),",
|
||||
"description": "Prop type limited to specific values by treating it as an enum"
|
||||
},
|
||||
"propTypeEnumRequired": {
|
||||
"prefix": "pter",
|
||||
"body": "PropTypes.oneOf(['$0']).isRequired,",
|
||||
"description": "Prop type limited to specific values by treating it as an enum required"
|
||||
},
|
||||
"propTypeOneOfType": {
|
||||
"prefix": "ptet",
|
||||
"body": "PropTypes.oneOfType([\n\t$0\n]),",
|
||||
"description": "An object that could be one of many types"
|
||||
},
|
||||
"propTypeOneOfTypeRequired": {
|
||||
"prefix": "ptetr",
|
||||
"body": "PropTypes.oneOfType([\n\t$0\n]).isRequired,",
|
||||
"description": "An object that could be one of many types required"
|
||||
},
|
||||
"propTypeArrayOf": {
|
||||
"prefix": "ptao",
|
||||
"body": "PropTypes.arrayOf($0),",
|
||||
"description": "An array of a certain type"
|
||||
},
|
||||
"propTypeArrayOfRequired": {
|
||||
"prefix": "ptaor",
|
||||
"body": "PropTypes.arrayOf($0).isRequired,",
|
||||
"description": "An array of a certain type required"
|
||||
},
|
||||
"propTypeObjectOf": {
|
||||
"prefix": "ptoo",
|
||||
"body": "PropTypes.objectOf($0),",
|
||||
"description": "An object with property values of a certain type"
|
||||
},
|
||||
"propTypeObjectOfRequired": {
|
||||
"prefix": "ptoor",
|
||||
"body": "PropTypes.objectOf($0).isRequired,",
|
||||
"description": "An object with property values of a certain type required"
|
||||
},
|
||||
"propTypeShape": {
|
||||
"prefix": "ptsh",
|
||||
"body": "PropTypes.shape({\n\t$0\n}),",
|
||||
"description": "An object taking on a particular shape"
|
||||
},
|
||||
"propTypeShapeRequired": {
|
||||
"prefix": "ptshr",
|
||||
"body": "PropTypes.shape({\n\t$0\n}).isRequired,",
|
||||
"description": "An object taking on a particular shape required"
|
||||
},
|
||||
"jsx element": {
|
||||
"prefix": "j",
|
||||
"body": "<${1:elementName}>\n\t$0\n</${1}>",
|
||||
"description": "an element"
|
||||
},
|
||||
"jsx element self closed": {
|
||||
"prefix": "jc",
|
||||
"body": "<${1:elementName} />",
|
||||
"description": "an element self closed"
|
||||
},
|
||||
"jsx elements map": {
|
||||
"prefix": "jm",
|
||||
"body": "{${1:array}.map((item) => <${2:elementName} key={item.id}>\n\t$0\n</${2}>)}",
|
||||
"description": "an element self closed"
|
||||
},
|
||||
"jsx elements map with return": {
|
||||
"prefix": "jmr",
|
||||
"body": "{${1:array}.map((item) => {\n\treturn <${2:elementName} key={item.id}>\n\t$0\n</${2}>\n})}",
|
||||
"description": "an element self closed"
|
||||
},
|
||||
"jsx element wrap selection": {
|
||||
"prefix": "jsx wrap selection with element",
|
||||
"body": "<${1:elementName}>\n\t{$TM_SELECTED_TEXT}\n</${1}>",
|
||||
"description": "an element"
|
||||
},
|
||||
"useState": {
|
||||
"prefix": "us",
|
||||
"body": "const [${1:setterName}, set${1:setterName}] = useState(${2:defVal})$0",
|
||||
"description": "use state hook"
|
||||
},
|
||||
"useEffect": {
|
||||
"prefix": "ue",
|
||||
"body": [
|
||||
"useEffect(() => {",
|
||||
"\t$1",
|
||||
"}, [${3:dependencies}])$0"
|
||||
],
|
||||
"description": "React useEffect() hook"
|
||||
},
|
||||
"useEffect with return": {
|
||||
"prefix": "uer",
|
||||
"body": [
|
||||
"useEffect(() => {",
|
||||
"\t$1",
|
||||
"\n\treturn () => {",
|
||||
"\t\t$2",
|
||||
"\t}",
|
||||
"}, [${3:dependencies}])$0"
|
||||
],
|
||||
"description": "React useEffect() hook with return statement"
|
||||
},
|
||||
"useContext": {
|
||||
"prefix": "uc",
|
||||
"body": ["const $1 = useContext($2)$0"],
|
||||
"description": "React useContext() hook"
|
||||
},
|
||||
"useRef": {
|
||||
"prefix": "ur",
|
||||
"body": ["const ${1:elName}El = useRef(null)$0"],
|
||||
"description": "React useContext() hook"
|
||||
},
|
||||
"useCallback": {
|
||||
"prefix": "ucb",
|
||||
"body": [
|
||||
"const ${1:memoizedCallback} = useCallback(",
|
||||
"\t() => {",
|
||||
"\t\t${2:doSomething}(${3:a}, ${4:b})",
|
||||
"\t},",
|
||||
"\t[${5:a}, ${6:b}],",
|
||||
")$0"
|
||||
],
|
||||
"description": "React useCallback() hook"
|
||||
},
|
||||
"useMemo": {
|
||||
"prefix": "ume",
|
||||
"body": [
|
||||
"const ${1:memoizedValue} = useMemo(() => ${2:computeExpensiveValue}(${3:a}, ${4:b}), [${5:a}, ${6:b}])$0"
|
||||
],
|
||||
"description": "React useMemo() hook"
|
||||
},
|
||||
"describeBlock": {
|
||||
"prefix": "desc",
|
||||
"body": [
|
||||
"describe('$1', () => {",
|
||||
" $0",
|
||||
"})",
|
||||
""
|
||||
],
|
||||
"description": "Testing `describe` block"
|
||||
},
|
||||
"testBlock": {
|
||||
"prefix": "test",
|
||||
"body": [
|
||||
"test('should $1', () => {",
|
||||
" $0",
|
||||
"})",
|
||||
""
|
||||
],
|
||||
"description": "Testing `test` block"
|
||||
},
|
||||
"itBlock": {
|
||||
"prefix": "tit",
|
||||
"body": [
|
||||
"it('should $1', () => {",
|
||||
" $0",
|
||||
"})",
|
||||
""
|
||||
],
|
||||
"description": "Testing `it` block"
|
||||
},
|
||||
"itAsyncBlock": {
|
||||
"prefix": "tita",
|
||||
"body": [
|
||||
"it('should $1', async () => {",
|
||||
" $0",
|
||||
"})",
|
||||
""
|
||||
],
|
||||
"description": "Testing async `it` block"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,291 @@
|
||||
{
|
||||
"Constructor": {
|
||||
"prefix": "ctor",
|
||||
"body": [
|
||||
"/**",
|
||||
" *",
|
||||
" */",
|
||||
"constructor() {",
|
||||
"\tsuper();",
|
||||
"\t$0",
|
||||
"}"
|
||||
],
|
||||
"description": "Constructor"
|
||||
},
|
||||
"Class Definition": {
|
||||
"prefix": "class",
|
||||
"body": [
|
||||
"class ${1:name} {",
|
||||
"\tconstructor(${2:parameters}) {",
|
||||
"\t\t$0",
|
||||
"\t}",
|
||||
"}"
|
||||
],
|
||||
"description": "Class Definition"
|
||||
},
|
||||
"Interface Definition": {
|
||||
"prefix": "iface",
|
||||
"body": [
|
||||
"interface ${1:name} {",
|
||||
"\t$0",
|
||||
"}"
|
||||
],
|
||||
"description": "Interface Definition"
|
||||
},
|
||||
"Public Method Definition": {
|
||||
"prefix": "public method",
|
||||
"body": [
|
||||
"/**",
|
||||
" * ${1:name}",
|
||||
" */",
|
||||
"public ${1:name}() {",
|
||||
"\t$0",
|
||||
"}"
|
||||
],
|
||||
"description": "Public Method Definition"
|
||||
},
|
||||
"Private Method Definition": {
|
||||
"prefix": "private method",
|
||||
"body": [
|
||||
"private ${1:name}() {",
|
||||
"\t$0",
|
||||
"}"
|
||||
],
|
||||
"description": "Private Method Definition"
|
||||
},
|
||||
"Import external module.": {
|
||||
"prefix": "import statement",
|
||||
"body": [
|
||||
"import { $0 } from \"${1:module}\";"
|
||||
],
|
||||
"description": "Import external module."
|
||||
},
|
||||
"Property getter": {
|
||||
"prefix": "get",
|
||||
"body": [
|
||||
"",
|
||||
"public get ${1:value}() : ${2:string} {",
|
||||
"\t${3:return $0}",
|
||||
"}",
|
||||
""
|
||||
],
|
||||
"description": "Property getter"
|
||||
},
|
||||
"Log to the console": {
|
||||
"prefix": "log",
|
||||
"body": [
|
||||
"console.log($1);",
|
||||
"$0"
|
||||
],
|
||||
"description": "Log to the console"
|
||||
},
|
||||
"Log warning to console": {
|
||||
"prefix": "warn",
|
||||
"body": [
|
||||
"console.warn($1);",
|
||||
"$0"
|
||||
],
|
||||
"description": "Log warning to the console"
|
||||
},
|
||||
"Log error to console": {
|
||||
"prefix": "error",
|
||||
"body": [
|
||||
"console.error($1);",
|
||||
"$0"
|
||||
],
|
||||
"description": "Log error to the console"
|
||||
},
|
||||
"Define a full property": {
|
||||
"prefix": "prop",
|
||||
"body": [
|
||||
"",
|
||||
"private _${1:value} : ${2:string};",
|
||||
"public get ${1:value}() : ${2:string} {",
|
||||
"\treturn this._${1:value};",
|
||||
"}",
|
||||
"public set ${1:value}(v : ${2:string}) {",
|
||||
"\tthis._${1:value} = v;",
|
||||
"}",
|
||||
""
|
||||
],
|
||||
"description": "Define a full property"
|
||||
},
|
||||
"Triple-slash reference": {
|
||||
"prefix": "ref",
|
||||
"body": [
|
||||
"/// <reference path=\"$1\" />",
|
||||
"$0"
|
||||
],
|
||||
"description": "Triple-slash reference"
|
||||
},
|
||||
"Property setter": {
|
||||
"prefix": "set",
|
||||
"body": [
|
||||
"",
|
||||
"public set ${1:value}(v : ${2:string}) {",
|
||||
"\tthis.$3 = v;",
|
||||
"}",
|
||||
""
|
||||
],
|
||||
"description": "Property setter"
|
||||
},
|
||||
"Throw Exception": {
|
||||
"prefix": "throw",
|
||||
"body": [
|
||||
"throw \"$1\";",
|
||||
"$0"
|
||||
],
|
||||
"description": "Throw Exception"
|
||||
},
|
||||
"For Loop": {
|
||||
"prefix": "for",
|
||||
"body": [
|
||||
"for (let ${1:index} = 0; ${1:index} < ${2:array}.length; ${1:index}++) {",
|
||||
"\tconst ${3:element} = ${2:array}[${1:index}];",
|
||||
"\t$0",
|
||||
"}"
|
||||
],
|
||||
"description": "For Loop"
|
||||
},
|
||||
"For-Each Loop using =>": {
|
||||
"prefix": "foreach =>",
|
||||
"body": [
|
||||
"${1:array}.forEach(${2:element} => {",
|
||||
"\t$0",
|
||||
"});"
|
||||
],
|
||||
"description": "For-Each Loop using =>"
|
||||
},
|
||||
"For-In Loop": {
|
||||
"prefix": "forin",
|
||||
"body": [
|
||||
"for (const ${1:key} in ${2:object}) {",
|
||||
"\tif (${2:object}.hasOwnProperty(${1:key})) {",
|
||||
"\t\tconst ${3:element} = ${2:object}[${1:key}];",
|
||||
"\t\t$0",
|
||||
"\t}",
|
||||
"}"
|
||||
],
|
||||
"description": "For-In Loop"
|
||||
},
|
||||
"For-Of Loop": {
|
||||
"prefix": "forof",
|
||||
"body": [
|
||||
"for (const ${1:iterator} of ${2:object}) {",
|
||||
"\t$0",
|
||||
"}"
|
||||
],
|
||||
"description": "For-Of Loop"
|
||||
},
|
||||
"For-Await-Of Loop": {
|
||||
"prefix": "forawaitof",
|
||||
"body": [
|
||||
"for await (const ${1:iterator} of ${2:object}) {",
|
||||
"\t$0",
|
||||
"}"
|
||||
],
|
||||
"description": "For-Of Loop"
|
||||
},
|
||||
"Function Statement": {
|
||||
"prefix": "function",
|
||||
"body": [
|
||||
"function ${1:name}(${2:params}:${3:type}) {",
|
||||
"\t$0",
|
||||
"}"
|
||||
],
|
||||
"description": "Function Statement"
|
||||
},
|
||||
"If Statement": {
|
||||
"prefix": "if",
|
||||
"body": [
|
||||
"if (${1:condition}) {",
|
||||
"\t$0",
|
||||
"}"
|
||||
],
|
||||
"description": "If Statement"
|
||||
},
|
||||
"If-Else Statement": {
|
||||
"prefix": "ifelse",
|
||||
"body": [
|
||||
"if (${1:condition}) {",
|
||||
"\t$0",
|
||||
"} else {",
|
||||
"\t",
|
||||
"}"
|
||||
],
|
||||
"description": "If-Else Statement"
|
||||
},
|
||||
"New Statement": {
|
||||
"prefix": "new",
|
||||
"body": [
|
||||
"const ${1:name} = new ${2:type}(${3:arguments});$0"
|
||||
],
|
||||
"description": "New Statement"
|
||||
},
|
||||
"Switch Statement": {
|
||||
"prefix": "switch",
|
||||
"body": [
|
||||
"switch (${1:key}) {",
|
||||
"\tcase ${2:value}:",
|
||||
"\t\t$0",
|
||||
"\t\tbreak;",
|
||||
"",
|
||||
"\tdefault:",
|
||||
"\t\tbreak;",
|
||||
"}"
|
||||
],
|
||||
"description": "Switch Statement"
|
||||
},
|
||||
"While Statement": {
|
||||
"prefix": "while",
|
||||
"body": [
|
||||
"while (${1:condition}) {",
|
||||
"\t$0",
|
||||
"}"
|
||||
],
|
||||
"description": "While Statement"
|
||||
},
|
||||
"Do-While Statement": {
|
||||
"prefix": "dowhile",
|
||||
"body": [
|
||||
"do {",
|
||||
"\t$0",
|
||||
"} while (${1:condition});"
|
||||
],
|
||||
"description": "Do-While Statement"
|
||||
},
|
||||
"Try-Catch Statement": {
|
||||
"prefix": "trycatch",
|
||||
"body": [
|
||||
"try {",
|
||||
"\t$0",
|
||||
"} catch (${1:error}) {",
|
||||
"\t",
|
||||
"}"
|
||||
],
|
||||
"description": "Try-Catch Statement"
|
||||
},
|
||||
"Set Timeout Function": {
|
||||
"prefix": "settimeout",
|
||||
"body": [
|
||||
"setTimeout(() => {",
|
||||
"\t$0",
|
||||
"}, ${1:timeout});"
|
||||
],
|
||||
"description": "Set Timeout Function"
|
||||
},
|
||||
"Region Start": {
|
||||
"prefix": "#region",
|
||||
"body": [
|
||||
"//#region $0"
|
||||
],
|
||||
"description": "Folding Region Start"
|
||||
},
|
||||
"Region End": {
|
||||
"prefix": "#endregion",
|
||||
"body": [
|
||||
"//#endregion"
|
||||
],
|
||||
"description": "Folding Region End"
|
||||
}
|
||||
}
|
||||
278
dot_vim/plugged/friendly-snippets/snippets/julia.json
Normal file
278
dot_vim/plugged/friendly-snippets/snippets/julia.json
Normal file
@@ -0,0 +1,278 @@
|
||||
{
|
||||
"if": {
|
||||
"prefix": "if",
|
||||
"body": [
|
||||
"if ${1:condition}",
|
||||
"\t$0",
|
||||
"end"
|
||||
],
|
||||
"description": "Code snippet for if statement."
|
||||
},
|
||||
"else": {
|
||||
"prefix": "else",
|
||||
"body": [
|
||||
"else",
|
||||
"\t$0",
|
||||
"end"
|
||||
],
|
||||
"description": "Code snippet for else statement."
|
||||
},
|
||||
"else if": {
|
||||
"prefix": "elseif",
|
||||
"body": [
|
||||
"elseif ${1:condition}",
|
||||
"\t${2:block}",
|
||||
"end"
|
||||
],
|
||||
"description": "Code snippet for elseif statement."
|
||||
},
|
||||
"if/elseif/else": {
|
||||
"prefix": "ifelseif",
|
||||
"body": [
|
||||
"if ${1:condition}",
|
||||
"\t${2:block}",
|
||||
"elseif ${3:condition}",
|
||||
"\t${4:block}",
|
||||
"else",
|
||||
"\t${5:block}",
|
||||
"end"
|
||||
],
|
||||
"description": "Code snippet for if-elseif-else statement."
|
||||
},
|
||||
"ternary operator": {
|
||||
"prefix": "?:",
|
||||
"body": "${1:condition} ? ${2:expression} : ${3:expression}",
|
||||
"description": "Code snippet for ternary operator statement."
|
||||
},
|
||||
"and short-circuit evaluation": {
|
||||
"prefix": "&&",
|
||||
"body": "${1:condition} && ${2:expression}",
|
||||
"description": "In the expression a && b, the subexpression b is only evaluated if a evaluates to true."
|
||||
},
|
||||
"or short-circuit evaluation": {
|
||||
"prefix": "||",
|
||||
"body": "${1:condition} || ${2:expression}",
|
||||
"description": "In the expression a || b, the subexpression b is only evaluated if a evaluates to false."
|
||||
},
|
||||
"while": {
|
||||
"prefix": "while",
|
||||
"body": [
|
||||
"while ${1:condition}",
|
||||
"\t$0",
|
||||
"end"
|
||||
],
|
||||
"description": "Code snippet to create a while loop."
|
||||
},
|
||||
"for": {
|
||||
"prefix": "for",
|
||||
"body": [
|
||||
"for ${1:value}=${2:index}:${3:index}",
|
||||
"\t$0",
|
||||
"end"
|
||||
],
|
||||
"description": "Code snippet to create a for loop."
|
||||
},
|
||||
"foreach": {
|
||||
"prefix": ["foreach", "forin"],
|
||||
"body": [
|
||||
"for ${1:value} ∈ ${2:iterable}",
|
||||
"\t$0",
|
||||
"end"
|
||||
],
|
||||
"description": "Code snippet to iterate each element."
|
||||
},
|
||||
"iterate": {
|
||||
"prefix": ["iterate", "iter"],
|
||||
"body": [
|
||||
"next = iterate(${1:iterable})",
|
||||
"while next !== nothing",
|
||||
"\t(item, state) = next",
|
||||
"\t0",
|
||||
"\tnext = iterate(iter, state)",
|
||||
"end"
|
||||
],
|
||||
"description": "Code snippet to iterate each element."
|
||||
},
|
||||
"function": {
|
||||
"prefix": ["fun", "func", "function"],
|
||||
"body": [
|
||||
"function ${1:name}(${2:arguments})",
|
||||
"\t$0",
|
||||
"end"
|
||||
],
|
||||
"description": "Code snippet to create a function."
|
||||
},
|
||||
"begin": {
|
||||
"prefix": ["be", "begin"],
|
||||
"body": [
|
||||
"begin",
|
||||
"\t$0",
|
||||
"end"
|
||||
],
|
||||
"description": "Code snippet to create a begin block."
|
||||
},
|
||||
"main": {
|
||||
"prefix": "main",
|
||||
"body": [
|
||||
"function main()",
|
||||
"\t$0",
|
||||
"end",
|
||||
"\nmain()"
|
||||
],
|
||||
"description": "Code snippet to create a main block."
|
||||
},
|
||||
"bitwise not": {
|
||||
"prefix": "bnot",
|
||||
"body": "~${1:value}",
|
||||
"description": "Code snippet for bitwise not operator."
|
||||
},
|
||||
"bitwise and": {
|
||||
"prefix": "band",
|
||||
"body": "${1:value} & ${2:value}",
|
||||
"description": "Code snippet for bitwise and operator."
|
||||
},
|
||||
"bitwise or": {
|
||||
"prefix": "bor",
|
||||
"body": "${1:value} | ${2:value}",
|
||||
"description": "Code snippet for bitwise or operator."
|
||||
},
|
||||
"bitwise xor": {
|
||||
"prefix": "xor",
|
||||
"body": "${1:value} ⊻ ${2:value}",
|
||||
"description": "Code snippet for bitwise xor (exclusive or) operator."
|
||||
},
|
||||
"complex number": {
|
||||
"prefix": ["comp", "complex", "im"],
|
||||
"body": "(${1:Int} + ${2:Int}im)",
|
||||
"description": "Code snippet for complex number."
|
||||
},
|
||||
"parse Float": {
|
||||
"prefix": ["parsef", "pfloat"],
|
||||
"body": "parse(Float64, \"${1:value}\")",
|
||||
"description": "Code snippet for parsing a String to Float64."
|
||||
},
|
||||
"parse Int": {
|
||||
"prefix": ["parsei", "pint"],
|
||||
"body": "parse(Int64, \"${1:value}\")",
|
||||
"description": "Code snippet for parsing a String to Int64."
|
||||
},
|
||||
"map": {
|
||||
"prefix": "map",
|
||||
"body": "map(x -> ${1:expr}, ${2:iterable})",
|
||||
"description": "Code snippet for map."
|
||||
},
|
||||
"pipe": {
|
||||
"prefix": ["pipe", "pp"],
|
||||
"body": "${1:value} |> ${2:function}",
|
||||
"description": "Code snippet for pipe expression."
|
||||
},
|
||||
"pointwise pile": {
|
||||
"prefix": ["ppipe", "pipe.", "pp."],
|
||||
"body": "${1:value} .|> ${2:function}",
|
||||
"description": "Code snippet for pointwise pipe expression."
|
||||
},
|
||||
"function composition": {
|
||||
"prefix": ["composition", "fcomp"],
|
||||
"body": "(${1:fonction} ∘ ${2:fonction})(${3:args})",
|
||||
"description": "Code snippet for function composition."
|
||||
},
|
||||
"module": {
|
||||
"prefix": ["module", "mod"],
|
||||
"body": [
|
||||
"module ${1:name}",
|
||||
"export ${2:struct}",
|
||||
"struct ${2:struct} end",
|
||||
"\t$0",
|
||||
"end"
|
||||
],
|
||||
"description": "Code snippet for module block."
|
||||
},
|
||||
"baremodule": {
|
||||
"prefix": ["baremodule", "bmod", "bare"],
|
||||
"body": [
|
||||
"baremodule ${1:name}",
|
||||
"\t$0",
|
||||
"end"
|
||||
],
|
||||
"description": "Code snippet for module block."
|
||||
},
|
||||
"struct": {
|
||||
"prefix": "struct",
|
||||
"body": [
|
||||
"struct ${1:struct} <: ${2:type}",
|
||||
"\t$0",
|
||||
"end"
|
||||
],
|
||||
"description": "Code snippet for struct block."
|
||||
},
|
||||
"mutable struct": {
|
||||
"prefix": ["mutable", "mut", "mstruct"],
|
||||
"body": [
|
||||
"mutable struct ${1:struct} <: ${2:type}",
|
||||
"\t$0",
|
||||
"end"
|
||||
],
|
||||
"description": "Code snippet for mutable struct block."
|
||||
},
|
||||
"parse expression": {
|
||||
"prefix": ["meta", "parse"],
|
||||
"body": "Meta.parse(\"{$1:expression}\")",
|
||||
"description": "Code snippet for parse an expression."
|
||||
},
|
||||
"using": {
|
||||
"prefix": ["using", "us"],
|
||||
"body": "using $0",
|
||||
"description": "Code snippet for using a package."
|
||||
},
|
||||
"import": {
|
||||
"prefix": ["import", "im"],
|
||||
"body": "import $0",
|
||||
"description": "Code snippet for import a package."
|
||||
},
|
||||
"using from": {
|
||||
"prefix": ["using", "from", "us"],
|
||||
"body": "using ${1:package}: ${2:exports}",
|
||||
"description": "Code snippet for using something from a package."
|
||||
},
|
||||
"import from": {
|
||||
"prefix": ["import", "from", "im"],
|
||||
"body": "import ${1:package}: ${2:exports}",
|
||||
"description": "Code snippet for import something from a package."
|
||||
},
|
||||
"using as": {
|
||||
"prefix": ["using", "as", "us"],
|
||||
"body": "using ${1:package} as ${2:name}",
|
||||
"description": "Code snippet for using a package and rename."
|
||||
},
|
||||
"import as": {
|
||||
"prefix": ["import", "as", "im"],
|
||||
"body": "import ${1:package} as ${2:name}",
|
||||
"description": "Code snippet for import a package and rename."
|
||||
},
|
||||
"using from as": {
|
||||
"prefix": ["using", "from", "as", "us"],
|
||||
"body": "using ${1:package}: ${2:exports} as ${3:name}",
|
||||
"description": "Code snippet for using something from a package and rename."
|
||||
},
|
||||
"import from as": {
|
||||
"prefix": ["import", "from", "as", "im"],
|
||||
"body": "import ${1:package}: ${2:exports} as ${3:name}",
|
||||
"description": "Code snippet for import something from a package and rename."
|
||||
},
|
||||
"ccal/function": {
|
||||
"prefix": ["ccal", "cfun", "cfunction"],
|
||||
"body": [
|
||||
"function ${1:name}(a, b)::Cint",
|
||||
"\treturn a + b",
|
||||
"end",
|
||||
"\n${1:name}_c = @cfunction(${1:name}, Cint, (Cint, Cint))",
|
||||
"ccall(${1:name}_c, Cint, (Cint, Cint), 1, 1)"
|
||||
],
|
||||
"description": "An example for ccal."
|
||||
},
|
||||
"ccal/clock": {
|
||||
"prefix": ["cclock", "clock"],
|
||||
"body": "ccall(:clock, Int32, ())",
|
||||
"description": "Code snippet for calling the clock function from the standard C library."
|
||||
}
|
||||
}
|
||||
107
dot_vim/plugged/friendly-snippets/snippets/kotlin.json
Normal file
107
dot_vim/plugged/friendly-snippets/snippets/kotlin.json
Normal file
@@ -0,0 +1,107 @@
|
||||
{
|
||||
"open keyword": {
|
||||
"prefix": "open",
|
||||
"body": [ "open "],
|
||||
"description": "Snippet for open keyword"
|
||||
},
|
||||
"override keyword": {
|
||||
"prefix": "override",
|
||||
"body": [ "override "],
|
||||
"description": "Snippet for override keyword"
|
||||
},
|
||||
"class": {
|
||||
"prefix": "class",
|
||||
"body": ["class ${TM_FILENAME_BASE} {", "\t$0", "}"],
|
||||
"description": "Snippet for class declaration"
|
||||
},
|
||||
"init": {
|
||||
"prefix": "init",
|
||||
"body": ["init {\n\t$0\n}"],
|
||||
"description": "Snippet for init block"
|
||||
},
|
||||
"set": {
|
||||
"prefix": "set",
|
||||
"body": ["set(${1:arg}: ${2:type}) {\n\t$0\n}"],
|
||||
"description": "Snippet for set block"
|
||||
},
|
||||
"get": {
|
||||
"prefix": "get",
|
||||
"body": ["get() ${1:value}"],
|
||||
"description": "Snippet for get block"
|
||||
},
|
||||
"constructor": {
|
||||
"prefix": "constructor",
|
||||
"body": ["constructor(${1:arg}: ${2:type}) {\n\t$0\n}"],
|
||||
"description": "Snippet for constructor function"
|
||||
},
|
||||
"function declaration": {
|
||||
"prefix": "fun",
|
||||
"body": "fun ${1:main}(${2:args} : ${3:Array<String>}) {\n\t$0\n}",
|
||||
"description": "Snippet for function declaration"
|
||||
},
|
||||
"variable declaration": {
|
||||
"prefix": "var",
|
||||
"body": "var ${1:name} = ${2:value}",
|
||||
"description": "Snippet for a variable"
|
||||
},
|
||||
"variable declaration with val": {
|
||||
"prefix": "val",
|
||||
"body": "val ${1:name} = ${2:value}",
|
||||
"description": "Snippet for a variable"
|
||||
},
|
||||
"if": {
|
||||
"prefix": "if",
|
||||
"body": "if (${1:condition}) ${2:value}",
|
||||
"description": "Snippet for if expression"
|
||||
},
|
||||
"if...else": {
|
||||
"prefix": "ifelse",
|
||||
"body": "if (${1:condition}) \n\t${2:value}\nelse\n\t${3:value}",
|
||||
"description": "Snippet for if...else expression"
|
||||
},
|
||||
"when": {
|
||||
"prefix": "when",
|
||||
"body": "when (${1:value}) {\n\t${2:branch} -> ${3:branchValue}\n\n\telse -> ${4:defaultValue}\n}",
|
||||
"description": "Snippet for when expression"
|
||||
},
|
||||
"while": {
|
||||
"prefix": "while",
|
||||
"body": "while (${1:condition}) {\n\t$0\n}",
|
||||
"description": "Snippet for while expression"
|
||||
},
|
||||
"do...while": {
|
||||
"prefix": "do",
|
||||
"body": "do {\n\t$1\n} while (${2:condition})",
|
||||
"description": "Snippet for do...while expression"
|
||||
},
|
||||
"for": {
|
||||
"prefix": "for",
|
||||
"body": "for (${1:i} in ${2:0}..${3:5})\n\t${4:expression}",
|
||||
"description": "Snippet for iterating array with for loop"
|
||||
},
|
||||
"foreach": {
|
||||
"prefix": "foreach",
|
||||
"body": "for (${1:item} in ${2:list})\n\t${3:expression}",
|
||||
"description": "Snippet for iterating array with for loop"
|
||||
},
|
||||
"try...catch": {
|
||||
"prefix": "try",
|
||||
"body": "try {\n\t$1\n} catch(${2:e}: ${3:Type}){\n\t$4\n}",
|
||||
"description": "Snippet for try block"
|
||||
},
|
||||
"finally": {
|
||||
"prefix": "finally",
|
||||
"body": "finally {\n\t$1\n}",
|
||||
"description": "Snippet for finally block"
|
||||
},
|
||||
"package": {
|
||||
"prefix": "package",
|
||||
"body": "package ${1:packageName}",
|
||||
"description": "Snippet for package statement"
|
||||
},
|
||||
"import": {
|
||||
"prefix": "import",
|
||||
"body": "import ${1:packageName}",
|
||||
"description": "Snippet for import statement"
|
||||
}
|
||||
}
|
||||
464
dot_vim/plugged/friendly-snippets/snippets/kubernetes.json
Normal file
464
dot_vim/plugged/friendly-snippets/snippets/kubernetes.json
Normal file
@@ -0,0 +1,464 @@
|
||||
{
|
||||
"k8s Ingress with TLS": {
|
||||
"prefix": "k-ingress-tls",
|
||||
"description": "k8s Ingress with TLS",
|
||||
"body": [
|
||||
"# https://kubernetes.io/docs/concepts/services-networking/ingress/#tls",
|
||||
"apiVersion: v1",
|
||||
"kind: Secret",
|
||||
"metadata:",
|
||||
" name: ${1:testsecret-tls}",
|
||||
" namespace: ${2:default}",
|
||||
"type: kubernetes.io/tls",
|
||||
"# The TLS secret must contain keys named 'tls.crt' and 'tls.key' that contain the certificate and private key to use for TLS.",
|
||||
"data:",
|
||||
" tls.crt: base64 encoded cert",
|
||||
" tls.key: base64 encoded key",
|
||||
"",
|
||||
"---",
|
||||
"apiVersion: networking.k8s.io/v1",
|
||||
"kind: Ingress",
|
||||
"metadata:",
|
||||
" name: ${3:tls-example-ingress}",
|
||||
" namespace: ${2:default}",
|
||||
"spec:",
|
||||
" tls:",
|
||||
" - hosts:",
|
||||
" - ${4:https-example.foo.com}",
|
||||
" secretName: ${1:testsecret-tls}",
|
||||
" rules:",
|
||||
" - host: ${4:https-example.foo.com}",
|
||||
" http:",
|
||||
" paths:",
|
||||
" - path: /${5}",
|
||||
" pathType: Prefix",
|
||||
" backend:",
|
||||
" service:",
|
||||
" name: ${6:service1}",
|
||||
" port:",
|
||||
" number: ${7:80}",
|
||||
"---",
|
||||
"$0"
|
||||
]
|
||||
},
|
||||
"k8s Ingress": {
|
||||
"prefix": "k-ingress",
|
||||
"description": "k8s Ingress",
|
||||
"body": [
|
||||
"# https://kubernetes.io/docs/concepts/services-networking/ingress/",
|
||||
"apiVersion: networking.k8s.io/v1",
|
||||
"kind: Ingress",
|
||||
"metadata:",
|
||||
" name: ${1:example-ingress}",
|
||||
" namespace: ${2:default}",
|
||||
"spec:",
|
||||
" rules:",
|
||||
" - host: ${3:example.foo.com}",
|
||||
" http:",
|
||||
" paths:",
|
||||
" - path: /${4}",
|
||||
" pathType: ${5|Prefix,Exact|}",
|
||||
" backend:",
|
||||
" service:",
|
||||
" name: ${6:service1}",
|
||||
" port:",
|
||||
" number: ${7:80}",
|
||||
"---",
|
||||
"$0"
|
||||
]
|
||||
},
|
||||
"k8s Ingress with Rewrite rule": {
|
||||
"prefix": "k-ingress-rewrite",
|
||||
"description": "k8s Ingress with Rewrite rule",
|
||||
"body": [
|
||||
"# https://kubernetes.io/docs/concepts/services-networking/ingress/",
|
||||
"apiVersion: networking.k8s.io/v1",
|
||||
"kind: Ingress",
|
||||
"metadata:",
|
||||
" name: ${1:example-ingress}",
|
||||
" namespace: ${2:default}",
|
||||
" # https://kubernetes.github.io/ingress-nginx/examples/rewrite/",
|
||||
" annotations:",
|
||||
" nginx.ingress.kubernetes.io/rewrite-target: /\\$1",
|
||||
"spec:",
|
||||
" rules:",
|
||||
" - host: ${3:example.foo.com}",
|
||||
" http:",
|
||||
" paths:",
|
||||
" - path: ${4:/api/(.*)}",
|
||||
" pathType: Prefix",
|
||||
" backend:",
|
||||
" service:",
|
||||
" name: ${5:service1}",
|
||||
" port:",
|
||||
" number: ${6:80}",
|
||||
"---",
|
||||
"$0"
|
||||
]
|
||||
},
|
||||
"k8s Deployment": {
|
||||
"prefix": "k-deployment",
|
||||
"description": "k8s Deployment",
|
||||
"body": [
|
||||
"# https://kubernetes.io/docs/concepts/workloads/controllers/deployment/",
|
||||
"apiVersion: apps/v1",
|
||||
"kind: Deployment",
|
||||
"metadata:",
|
||||
" name: ${1:myjob}",
|
||||
" namespace: ${2:default}",
|
||||
" labels:",
|
||||
" app: ${1:myjob}",
|
||||
"spec:",
|
||||
" selector:",
|
||||
" matchLabels:",
|
||||
" app: ${1:myjob}",
|
||||
" replicas: 1",
|
||||
" strategy:",
|
||||
" rollingUpdate:",
|
||||
" maxSurge: 25%",
|
||||
" maxUnavailable: 25%",
|
||||
" type: RollingUpdate",
|
||||
" template:",
|
||||
" metadata:",
|
||||
" labels:",
|
||||
" app: ${1:myjob}",
|
||||
" spec:",
|
||||
" # initContainers:",
|
||||
" # Init containers are exactly like regular containers, except:",
|
||||
" # - Init containers always run to completion.",
|
||||
" # - Each init container must complete successfully before the next one starts.",
|
||||
" containers:",
|
||||
" - name: ${1:myjob}",
|
||||
" image: ${3:myjob:latest}",
|
||||
" imagePullPolicy: ${4|IfNotPresent,Always,Never|}",
|
||||
" resources:",
|
||||
" requests:",
|
||||
" cpu: 100m",
|
||||
" memory: 100Mi",
|
||||
" limits:",
|
||||
" cpu: 100m",
|
||||
" memory: 100Mi",
|
||||
" livenessProbe:",
|
||||
" tcpSocket:",
|
||||
" port: ${5:80}",
|
||||
" initialDelaySeconds: 5",
|
||||
" timeoutSeconds: 5",
|
||||
" successThreshold: 1",
|
||||
" failureThreshold: 3",
|
||||
" periodSeconds: 10",
|
||||
" readinessProbe:",
|
||||
" httpGet:",
|
||||
" path: /_status/healthz",
|
||||
" port: ${5:80}",
|
||||
" initialDelaySeconds: 5",
|
||||
" timeoutSeconds: 2",
|
||||
" successThreshold: 1",
|
||||
" failureThreshold: 3",
|
||||
" periodSeconds: 10",
|
||||
" env:",
|
||||
" - name: DB_HOST",
|
||||
" valueFrom:",
|
||||
" configMapKeyRef:",
|
||||
" name: ${1:myjob}",
|
||||
" key: DB_HOST",
|
||||
" ports:",
|
||||
" - containerPort: ${5:80}",
|
||||
" name: ${1:myjob}",
|
||||
" volumeMounts:",
|
||||
" - name: localtime",
|
||||
" mountPath: /etc/localtime",
|
||||
" volumes:",
|
||||
" - name: localtime",
|
||||
" hostPath:",
|
||||
" path: /usr/share/zoneinfo/Asia/Taipei",
|
||||
" restartPolicy: Always",
|
||||
"---",
|
||||
"$0"
|
||||
]
|
||||
},
|
||||
"k8s Service": {
|
||||
"prefix": "k-service",
|
||||
"description": "k8s Service",
|
||||
"body": [
|
||||
"# https://kubernetes.io/docs/concepts/services-networking/service/",
|
||||
"apiVersion: v1",
|
||||
"kind: Service",
|
||||
"metadata:",
|
||||
" name: ${1:myjob}",
|
||||
" namespace: ${2:default}",
|
||||
"spec:",
|
||||
" selector:",
|
||||
" app: ${1:myjob}",
|
||||
" type: ${3|ClusterIP,NodePort,LoadBalancer|}",
|
||||
" ports:",
|
||||
" - name: ${1:myjob}",
|
||||
" protocol: ${4|TCP,UDP|}",
|
||||
" port: ${5:80}",
|
||||
" targetPort: ${6:5000}",
|
||||
" nodePort: ${7:30001}",
|
||||
"---",
|
||||
"$0"
|
||||
]
|
||||
},
|
||||
"k8s ConfigMap": {
|
||||
"prefix": "k-configmap",
|
||||
"description": "k8s ConfigMap",
|
||||
"body": [
|
||||
"# https://kubernetes.io/docs/concepts/configuration/configmap/",
|
||||
"kind: ConfigMap",
|
||||
"apiVersion: v1",
|
||||
"metadata:",
|
||||
" name: ${1:myconfig}",
|
||||
" namespace: ${2:default}",
|
||||
"data:",
|
||||
" ${3:key}: ${4:value}",
|
||||
"---",
|
||||
"$0"
|
||||
]
|
||||
},
|
||||
"k8s Secret": {
|
||||
"prefix": "k-secret",
|
||||
"description": "k8s Secret",
|
||||
"body": [
|
||||
"# https://kubernetes.io/docs/concepts/configuration/secret/",
|
||||
"apiVersion: v1",
|
||||
"kind: Secret",
|
||||
"metadata:",
|
||||
" name: ${1:mysecret}",
|
||||
" namespace: ${2:default}",
|
||||
"type: Opaque",
|
||||
"data:",
|
||||
" # Example:",
|
||||
" # password: {{ .Values.password | b64enc }}",
|
||||
"---",
|
||||
"$0"
|
||||
]
|
||||
},
|
||||
"k8s Job": {
|
||||
"prefix": "k-job",
|
||||
"description": "k8s Job",
|
||||
"body": [
|
||||
"# https://kubernetes.io/docs/concepts/workloads/controllers/job/",
|
||||
"apiVersion: batch/v1",
|
||||
"kind: Job",
|
||||
"metadata:",
|
||||
" name: ${1:myjob}",
|
||||
" namespace: ${2:default}",
|
||||
" labels:",
|
||||
" app: ${1:myjob}",
|
||||
"spec:",
|
||||
" template:",
|
||||
" metadata:",
|
||||
" name: ${1:myjob}",
|
||||
" labels:",
|
||||
" app: ${1:myjob}",
|
||||
" spec:",
|
||||
" containers:",
|
||||
" - name: ${1:myjob}",
|
||||
" image: ${3:python:3.7.6-alpine3.10}",
|
||||
" command: ['sh', '-c', '${4:python3 manage.py makemigrations && python3 manage.py migrate}']",
|
||||
" env:",
|
||||
" - name: ENV_NAME",
|
||||
" value: ENV_VALUE",
|
||||
" volumeMounts:",
|
||||
" - name: localtime",
|
||||
" mountPath: /etc/localtime",
|
||||
" volumes:",
|
||||
" - name: localtime",
|
||||
" hostPath:",
|
||||
" path: /usr/share/zoneinfo/Asia/Taipei",
|
||||
" restartPolicy: OnFailure",
|
||||
" dnsPolicy: ClusterFirst",
|
||||
"---",
|
||||
"$0"
|
||||
]
|
||||
},
|
||||
"k8s CronJob": {
|
||||
"prefix": "k-cronjob",
|
||||
"description": "k8s CronJob",
|
||||
"body": [
|
||||
"# https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/",
|
||||
"apiVersion: batch/v1beta1",
|
||||
"kind: CronJob",
|
||||
"metadata:",
|
||||
" name: ${1:cronjobname}",
|
||||
" namespace: ${2:default}",
|
||||
"spec:",
|
||||
" schedule: \"${3:*/1 * * * *}\"",
|
||||
" jobTemplate:",
|
||||
" spec:",
|
||||
" template:",
|
||||
" spec:",
|
||||
" containers:",
|
||||
" - name: ${4:jobname}",
|
||||
" image: ${5:busybox}",
|
||||
" args: ['/bin/sh', '-c', '${6:date; echo Hello from the Kubernetes cluster}']",
|
||||
" restartPolicy: OnFailure",
|
||||
"---",
|
||||
"$0"
|
||||
]
|
||||
},
|
||||
"k8s Pod": {
|
||||
"prefix": "k-pod",
|
||||
"description": "k8s Pod",
|
||||
"body": [
|
||||
"# https://kubernetes.io/docs/concepts/workloads/pods/",
|
||||
"apiVersion: v1",
|
||||
"kind: Pod",
|
||||
"metadata:",
|
||||
" name: \"${1:myapp}\"",
|
||||
" namespace: ${2:default}",
|
||||
" labels:",
|
||||
" app: \"${1:myapp}\"",
|
||||
"spec:",
|
||||
" containers:",
|
||||
" - name: ${1:myapp}",
|
||||
" image: \"${3:debian-slim:latest}\"",
|
||||
" resources:",
|
||||
" limits:",
|
||||
" cpu: 200m",
|
||||
" memory: 500Mi",
|
||||
" requests:",
|
||||
" cpu: 100m",
|
||||
" memory: 200Mi",
|
||||
" env:",
|
||||
" - name: DB_HOST",
|
||||
" valueFrom:",
|
||||
" configMapKeyRef:",
|
||||
" name: myapp",
|
||||
" key: DB_HOST",
|
||||
" ports:",
|
||||
" - containerPort: ${4:80}",
|
||||
" name: http",
|
||||
" volumeMounts:",
|
||||
" - name: localtime",
|
||||
" mountPath: /etc/localtime",
|
||||
" volumes:",
|
||||
" - name: localtime",
|
||||
" hostPath:",
|
||||
" path: /usr/share/zoneinfo/Asia/Taipei",
|
||||
" restartPolicy: Always",
|
||||
"---",
|
||||
"$0"
|
||||
]
|
||||
},
|
||||
"k8s PersistentVolumeClaim": {
|
||||
"prefix": "k-pvc",
|
||||
"description": "k8s PersistentVolumeClaim",
|
||||
"body": [
|
||||
"# https://kubernetes.io/docs/concepts/storage/persistent-volumes/",
|
||||
"apiVersion: v1",
|
||||
"kind: PersistentVolumeClaim",
|
||||
"metadata:",
|
||||
" name: ${1:myapp}",
|
||||
" namespace: ${2:default}",
|
||||
" labels:",
|
||||
" app: ${1:myapp}",
|
||||
"spec:",
|
||||
" # AKS: default,managed-premium",
|
||||
" # GKE: standard",
|
||||
" # EKS: gp2 (custom)",
|
||||
" # Rook: rook-ceph-block,rook-ceph-fs",
|
||||
" storageClassName: ${3|default,managed-premium,standard,gp2,rook-ceph-block,rook-ceph-fs|}",
|
||||
" accessModes:",
|
||||
" - ${4|ReadWriteOnce,ReadWriteMany,ReadOnlyMany|}",
|
||||
" resources:",
|
||||
" requests:",
|
||||
" storage: ${5:2Gi}",
|
||||
"---",
|
||||
"$0"
|
||||
]
|
||||
},
|
||||
"k8s DaemonSet": {
|
||||
"prefix": "k-daemonset",
|
||||
"description": "k8s DaemonSet",
|
||||
"body": [
|
||||
"# https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/",
|
||||
"apiVersion: apps/v1",
|
||||
"kind: DaemonSet",
|
||||
"metadata:",
|
||||
" name: ${1:myapp}",
|
||||
" namespace: ${2:default}",
|
||||
" labels:",
|
||||
" app: ${1:myapp}",
|
||||
"spec:",
|
||||
" selector:",
|
||||
" matchLabels:",
|
||||
" app: ${1:myapp}",
|
||||
" template:",
|
||||
" metadata:",
|
||||
" labels:",
|
||||
" app: ${1:myapp}",
|
||||
" spec:",
|
||||
" tolerations:",
|
||||
" # this toleration is to have the daemonset runnable on master nodes",
|
||||
" # remove it if your masters can't run pods",
|
||||
" - key: node-role.kubernetes.io/master",
|
||||
" effect: NoSchedule",
|
||||
" containers:",
|
||||
" - name: ${1:myapp}",
|
||||
" image: ${3:debian}",
|
||||
" resources:",
|
||||
" limits:",
|
||||
" memory: 200Mi",
|
||||
" requests:",
|
||||
" cpu: 100m",
|
||||
" memory: 200Mi",
|
||||
" volumeMounts:",
|
||||
" - name: localtime",
|
||||
" mountPath: /etc/localtime",
|
||||
" terminationGracePeriodSeconds: 30",
|
||||
" volumes:",
|
||||
" - name: localtime",
|
||||
" hostPath:",
|
||||
" path: /usr/share/zoneinfo/Asia/Taipei",
|
||||
"---",
|
||||
"$0"
|
||||
]
|
||||
},
|
||||
"k8s StatefulSet": {
|
||||
"prefix": "k-statefulset",
|
||||
"description": "k8s StatefulSet",
|
||||
"body": [
|
||||
"# https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/",
|
||||
"apiVersion: apps/v1",
|
||||
"kind: StatefulSet",
|
||||
"metadata:",
|
||||
" name: ${1:myapp}",
|
||||
" namespace: ${2:default}",
|
||||
"spec:",
|
||||
" selector:",
|
||||
" matchLabels:",
|
||||
" app: ${1:myapp} # has to match .spec.template.metadata.labels",
|
||||
" serviceName: \"${1:myapp}\"",
|
||||
" replicas: ${3:3} # by default is 1",
|
||||
" template:",
|
||||
" metadata:",
|
||||
" labels:",
|
||||
" app: ${1:myapp} # has to match .spec.selector.matchLabels",
|
||||
" spec:",
|
||||
" terminationGracePeriodSeconds: 10",
|
||||
" containers:",
|
||||
" - name: ${1:myapp}",
|
||||
" image: ${4:${1:myapp}-slim:1.16.1}",
|
||||
" ports:",
|
||||
" - containerPort: ${5:80}",
|
||||
" name: ${1:myapp}",
|
||||
" volumeMounts:",
|
||||
" - name: ${6:www}",
|
||||
" mountPath: /usr/share/nginx/html",
|
||||
" volumeClaimTemplates:",
|
||||
" - metadata:",
|
||||
" name: ${6:www}",
|
||||
" spec:",
|
||||
" storageClassName: ${7:my-storage-class}",
|
||||
" accessModes:",
|
||||
" - ${8|ReadWriteOnce,ReadWriteMany,ReadOnlyMany|}",
|
||||
" resources:",
|
||||
" requests:",
|
||||
" storage: ${9:1Gi}",
|
||||
"---",
|
||||
"$0"
|
||||
]
|
||||
}
|
||||
}
|
||||
558
dot_vim/plugged/friendly-snippets/snippets/latex.json
Normal file
558
dot_vim/plugged/friendly-snippets/snippets/latex.json
Normal file
@@ -0,0 +1,558 @@
|
||||
{
|
||||
"item": {
|
||||
"prefix": "item",
|
||||
"body": "\n\\item ",
|
||||
"description": "\\item on a newline"
|
||||
},
|
||||
"subscript": {
|
||||
"prefix": "__",
|
||||
"body": "_{${1:${TM_SELECTED_TEXT}}}",
|
||||
"description": "subscript"
|
||||
},
|
||||
"superscript": {
|
||||
"prefix": "**",
|
||||
"body": "^{${1:${TM_SELECTED_TEXT}}}",
|
||||
"description": "superscript"
|
||||
},
|
||||
"etc": {
|
||||
"prefix": "...",
|
||||
"body": "\\dots",
|
||||
"description": "\\dots"
|
||||
},
|
||||
"cdot": {
|
||||
"prefix": "@.",
|
||||
"body": "\\cdot",
|
||||
"description": "\\cdot"
|
||||
},
|
||||
"infinity": {
|
||||
"prefix": "@8",
|
||||
"body": "\\infty",
|
||||
"description": "infinity symbol"
|
||||
},
|
||||
"partial": {
|
||||
"prefix": "@6",
|
||||
"body": "\\partial",
|
||||
"description": "partial derivative symbol"
|
||||
},
|
||||
"fraction": {
|
||||
"prefix": "@/",
|
||||
"body": "\\frac{$1}{$2}$0",
|
||||
"description": "fraction"
|
||||
},
|
||||
"fraction2": {
|
||||
"prefix": "@%",
|
||||
"body": "\\frac{$1}{$2}$0",
|
||||
"description": "fraction"
|
||||
},
|
||||
"hat": {
|
||||
"prefix": "@^",
|
||||
"body": "\\hat{${1:${TM_SELECTED_TEXT}}}$0",
|
||||
"description": "hat"
|
||||
},
|
||||
"bar": {
|
||||
"prefix": "@_",
|
||||
"body": "\\bar{${1:${TM_SELECTED_TEXT}}}$0",
|
||||
"description": "bar"
|
||||
},
|
||||
"circ": {
|
||||
"prefix": "@@",
|
||||
"body": "\\circ",
|
||||
"description": "circ"
|
||||
},
|
||||
"supcirc": {
|
||||
"prefix": "@0",
|
||||
"body": "^\\circ",
|
||||
"description": "superscript circ"
|
||||
},
|
||||
"dot": {
|
||||
"prefix": "@;",
|
||||
"body": "\\dot{${1:${TM_SELECTED_TEXT}}}$0",
|
||||
"description": "dot"
|
||||
},
|
||||
"ddot": {
|
||||
"prefix": "@:",
|
||||
"body": "\\ddot{${1:${TM_SELECTED_TEXT}}}$0",
|
||||
"description": "ddot"
|
||||
},
|
||||
|
||||
"equiv": {
|
||||
"prefix": "@=",
|
||||
"body": "\\equiv",
|
||||
"description": "equiv symbol"
|
||||
},
|
||||
"times": {
|
||||
"prefix": "@*",
|
||||
"body": "\\times",
|
||||
"description": "times symbol"
|
||||
},
|
||||
"leq": {
|
||||
"prefix": "@<",
|
||||
"body": "\\leq",
|
||||
"description": "leq symbol"
|
||||
},
|
||||
"geq": {
|
||||
"prefix": "@>",
|
||||
"body": "\\geq",
|
||||
"description": "geq symbol"
|
||||
},
|
||||
"sqrt": {
|
||||
"prefix": "@2",
|
||||
"body": "\\sqrt{${1:${TM_SELECTED_TEXT}}}$0",
|
||||
"description": "sqrt command"
|
||||
},
|
||||
"int": {
|
||||
"prefix": "@I",
|
||||
"body": "\\int_{$1}^{$2}$0",
|
||||
"description": "integral"
|
||||
},
|
||||
"Big|": {
|
||||
"prefix": "@|",
|
||||
"body": "\\Big|",
|
||||
"description": "Big |"
|
||||
},
|
||||
"bigcup": {
|
||||
"prefix": "@+",
|
||||
"body": "\\bigcup",
|
||||
"description": "bigcup"
|
||||
},
|
||||
"bigcap": {
|
||||
"prefix": "@-",
|
||||
"body": "\\bigcap",
|
||||
"description": "bigcap"
|
||||
},
|
||||
"nonumber": {
|
||||
"prefix": "@,",
|
||||
"body": "\\nonumber",
|
||||
"description": "nonumber"
|
||||
},
|
||||
"equation": {
|
||||
"prefix": "BEQ",
|
||||
"body": "\\begin{equation}\n\t${0:${TM_SELECTED_TEXT}}\n\\end{equation}",
|
||||
"description": "equation environment"
|
||||
},
|
||||
"equation*": {
|
||||
"prefix": "BSEQ",
|
||||
"body": "\\begin{equation*}\n\t${0:${TM_SELECTED_TEXT}}\n\\end{equation*}",
|
||||
"description": "equation* environment"
|
||||
},
|
||||
"align": {
|
||||
"prefix": "BAL",
|
||||
"body": "\\begin{align}\n\t${0:${TM_SELECTED_TEXT}}\n\\end{align}",
|
||||
"description": "align environment"
|
||||
},
|
||||
"align*": {
|
||||
"prefix": "BSAL",
|
||||
"body": "\\begin{align*}\n\t${0:${TM_SELECTED_TEXT}}\n\\end{align*}",
|
||||
"description": "align* environment"
|
||||
},
|
||||
"gather": {
|
||||
"prefix": "BGA",
|
||||
"body": "\\begin{gather}\n\t${0:${TM_SELECTED_TEXT}}\n\\end{gather}",
|
||||
"description": "gather environment"
|
||||
},
|
||||
"gather*": {
|
||||
"prefix": "BSGA",
|
||||
"body": "\\begin{gather*}\n\t${0:${TM_SELECTED_TEXT}}\n\\end{gather*}",
|
||||
"description": "gather* environment"
|
||||
},
|
||||
"multline": {
|
||||
"prefix": "BMU",
|
||||
"body": "\\begin{multline}\n\t${0:${TM_SELECTED_TEXT}}\n\\end{multline}",
|
||||
"description": "multline environment"
|
||||
},
|
||||
"multline*": {
|
||||
"prefix": "BSMU",
|
||||
"body": "\\begin{multline*}\n\t${0:${TM_SELECTED_TEXT}}\n\\end{multline*}",
|
||||
"description": "multline* environment"
|
||||
},
|
||||
"itemize": {
|
||||
"prefix": "BIT",
|
||||
"body": "\\begin{itemize}\n\t\\item ${0:${TM_SELECTED_TEXT}}\n\\end{itemize}",
|
||||
"description": "itemize environment"
|
||||
},
|
||||
"enumerate": {
|
||||
"prefix": "BEN",
|
||||
"body": "\\begin{enumerate}\n\t\\item ${0:${TM_SELECTED_TEXT}}\n\\end{enumerate}",
|
||||
"description": "enumerate environment"
|
||||
},
|
||||
"split": {
|
||||
"prefix": "BSPL",
|
||||
"body": "\\begin{split}\n\t${0:${TM_SELECTED_TEXT}}\n\\end{split}",
|
||||
"description": "split environment"
|
||||
},
|
||||
"cases": {
|
||||
"prefix": "BCAS",
|
||||
"body": "\\begin{cases}\n\t${0:${TM_SELECTED_TEXT}}\n\\end{cases}",
|
||||
"description": "cases environment"
|
||||
},
|
||||
"frame": {
|
||||
"prefix": "BFR",
|
||||
"body": "\\begin{frame}\n\t\\frametitle{${1:<title>}}\n\n\t${0:${TM_SELECTED_TEXT}}\n\n\\end{frame}",
|
||||
"description": "frame"
|
||||
},
|
||||
"figure": {
|
||||
"prefix": "BFI",
|
||||
"body": "\\begin{figure}[${1:htbp}]\n\t\\centering\n\t${0:${TM_SELECTED_TEXT}}\n\t\\caption{${2:<caption>}}\n\t\\label{${3:<label>}}\n\\end{figure}",
|
||||
"description": "figure"
|
||||
},
|
||||
"table": {
|
||||
"prefix": "BTA",
|
||||
"body": "\\begin{table}[${1:htbp}]\n\t\\centering\\begin{tabular}{${4:<columns>}}\n\t\t${0:${TM_SELECTED_TEXT}}\n\t\\end{tabular}\n\t\\caption{${2:<caption>}}\n\t\\label{${3:<label>}}\n\\end{table}",
|
||||
"description": "table"
|
||||
},
|
||||
"tikzpicture": {
|
||||
"prefix": "BTP",
|
||||
"body": "\\begin{tikzpicture}\n\t${0:${TM_SELECTED_TEXT}}\n\\end{tikzpicture}",
|
||||
"description": "tikzpicture"
|
||||
},
|
||||
"set font size": {
|
||||
"prefix": "fontsize",
|
||||
"body": "${1|\\Huge,\\huge,\\LARGE,\\Large,\\large,\\normalsize,\\small,\\footnotesize,\\scriptsize,\\tiny|}",
|
||||
"description": "Select a font size"
|
||||
},
|
||||
"textnormal": {
|
||||
"prefix": "FNO",
|
||||
"body": "\\textnormal{${1:${TM_SELECTED_TEXT:text}}}",
|
||||
"description": "normal font"
|
||||
},
|
||||
"textrm": {
|
||||
"prefix": "FRM",
|
||||
"body": "\\textrm{${1:${TM_SELECTED_TEXT:text}}}",
|
||||
"description": "roman font"
|
||||
},
|
||||
"emph": {
|
||||
"prefix": "FEM",
|
||||
"body": "\\emph{${1:${TM_SELECTED_TEXT:text}}}",
|
||||
"description": "emphasis font"
|
||||
},
|
||||
"textsf": {
|
||||
"prefix": "FSF",
|
||||
"body": "\\textsf{${1:${TM_SELECTED_TEXT:text}}}",
|
||||
"description": "sans serif font"
|
||||
},
|
||||
"texttt": {
|
||||
"prefix": "FTT",
|
||||
"body": "\\texttt{${1:${TM_SELECTED_TEXT:text}}}",
|
||||
"description": "typewriter font"
|
||||
},
|
||||
"textit": {
|
||||
"prefix": "FIT",
|
||||
"body": "\\textit{${1:${TM_SELECTED_TEXT:text}}}",
|
||||
"description": "italic font"
|
||||
},
|
||||
"textsl": {
|
||||
"prefix": "FSL",
|
||||
"body": "\\textsl{${1:${TM_SELECTED_TEXT:text}}}",
|
||||
"description": "slanted font"
|
||||
},
|
||||
"textsc": {
|
||||
"prefix": "FSC",
|
||||
"body": "\\textsc{${1:${TM_SELECTED_TEXT:text}}}",
|
||||
"description": "smallcaps font"
|
||||
},
|
||||
"underline": {
|
||||
"prefix": "FUL",
|
||||
"body": "\\underline{${1:${TM_SELECTED_TEXT:text}}}",
|
||||
"description": "Underline text"
|
||||
},
|
||||
"uppercase": {
|
||||
"prefix": "FUC",
|
||||
"body": "\\uppercase{${1:${TM_SELECTED_TEXT:text}}}",
|
||||
"description": "Make text uppercase (all caps)"
|
||||
},
|
||||
"lowercase": {
|
||||
"prefix": "FLC",
|
||||
"body": "\\lowercase{${1:${TM_SELECTED_TEXT:text}}}",
|
||||
"description": "Make text lowercase (no caps)"
|
||||
},
|
||||
"textbf": {
|
||||
"prefix": "FBF",
|
||||
"body": "\\textbf{${1:${TM_SELECTED_TEXT:text}}}",
|
||||
"description": "bold font"
|
||||
},
|
||||
"textsuperscript": {
|
||||
"prefix": "FSS",
|
||||
"body": "\\textsuperscript{${1:${TM_SELECTED_TEXT:text}}}",
|
||||
"description": "Make text a superscript"
|
||||
},
|
||||
"textsubscript": {
|
||||
"prefix": "FBS",
|
||||
"body": "\\textsubscript{${1:${TM_SELECTED_TEXT:text}}}",
|
||||
"description": "Make text a superscript"
|
||||
},
|
||||
"mathrm": {
|
||||
"prefix": "MRM",
|
||||
"body": "\\mathrm{${1:${TM_SELECTED_TEXT:text}}}",
|
||||
"description": "math roman font"
|
||||
},
|
||||
"mathbf": {
|
||||
"prefix": "MBF",
|
||||
"body": "\\mathbf{${1:${TM_SELECTED_TEXT:text}}}",
|
||||
"description": "math bold font"
|
||||
},
|
||||
"mathbb": {
|
||||
"prefix": "MBB",
|
||||
"body": "\\mathbb{${1:${TM_SELECTED_TEXT:text}}}",
|
||||
"description": "math blackboard bold font"
|
||||
},
|
||||
"mathcal": {
|
||||
"prefix": "MCA",
|
||||
"body": "\\mathcal{${1:${TM_SELECTED_TEXT:text}}}",
|
||||
"description": "math caligraphic font"
|
||||
},
|
||||
"mathit": {
|
||||
"prefix": "MIT",
|
||||
"body": "\\mathit{${1:${TM_SELECTED_TEXT:text}}}",
|
||||
"description": "math italic font"
|
||||
},
|
||||
"mathtt": {
|
||||
"prefix": "MTT",
|
||||
"body": "\\mathtt{${1:${TM_SELECTED_TEXT:text}}}",
|
||||
"description": "math typewriter font"
|
||||
},
|
||||
"alpha": {
|
||||
"prefix": "@a",
|
||||
"body": "\\alpha",
|
||||
"description": "alpha"
|
||||
},
|
||||
"beta": {
|
||||
"prefix": "@b",
|
||||
"body": "\\beta",
|
||||
"description": "beta"
|
||||
},
|
||||
"chi": {
|
||||
"prefix": "@c",
|
||||
"body": "\\chi",
|
||||
"description": "chi"
|
||||
},
|
||||
"delta": {
|
||||
"prefix": "@d",
|
||||
"body": "\\delta",
|
||||
"description": "delta"
|
||||
},
|
||||
"epsilon": {
|
||||
"prefix": "@e",
|
||||
"body": "\\epsilon",
|
||||
"description": "epsilon"
|
||||
},
|
||||
"varepsilon": {
|
||||
"prefix": "@ve",
|
||||
"body": "\\varepsilon",
|
||||
"description": "varepsilon"
|
||||
},
|
||||
"phi": {
|
||||
"prefix": "@f",
|
||||
"body": "\\phi",
|
||||
"description": "phi"
|
||||
},
|
||||
"varphi": {
|
||||
"prefix": "@vf",
|
||||
"body": "\\varphi",
|
||||
"description": "varphi"
|
||||
},
|
||||
"gamma": {
|
||||
"prefix": "@g",
|
||||
"body": "\\gamma",
|
||||
"description": "gamma"
|
||||
},
|
||||
"eta": {
|
||||
"prefix": "@h",
|
||||
"body": "\\eta",
|
||||
"description": "eta"
|
||||
},
|
||||
"iota": {
|
||||
"prefix": "@i",
|
||||
"body": "\\iota",
|
||||
"description": "iota"
|
||||
},
|
||||
"kappa": {
|
||||
"prefix": "@k",
|
||||
"body": "\\kappa",
|
||||
"description": "kappa"
|
||||
},
|
||||
"lambda": {
|
||||
"prefix": "@l",
|
||||
"body": "\\lambda",
|
||||
"description": "lambda"
|
||||
},
|
||||
"mu": {
|
||||
"prefix": "@m",
|
||||
"body": "\\mu",
|
||||
"description": "mu"
|
||||
},
|
||||
"nu": {
|
||||
"prefix": "@n",
|
||||
"body": "\\nu",
|
||||
"description": "nu"
|
||||
},
|
||||
"pi": {
|
||||
"prefix": "@p",
|
||||
"body": "\\pi",
|
||||
"description": "pi"
|
||||
},
|
||||
"theta": {
|
||||
"prefix": "@q",
|
||||
"body": "\\theta",
|
||||
"description": "theta"
|
||||
},
|
||||
"vartheta": {
|
||||
"prefix": "@vq",
|
||||
"body": "\\vartheta",
|
||||
"description": "vartheta"
|
||||
},
|
||||
"rho": {
|
||||
"prefix": "@r",
|
||||
"body": "\\rho",
|
||||
"description": "rho"
|
||||
},
|
||||
"sigma": {
|
||||
"prefix": "@s",
|
||||
"body": "\\sigma",
|
||||
"description": "sigma"
|
||||
},
|
||||
"varsigma": {
|
||||
"prefix": "@vs",
|
||||
"body": "\\varsigma",
|
||||
"description": "varsigma"
|
||||
},
|
||||
"tau": {
|
||||
"prefix": "@t",
|
||||
"body": "\\tau",
|
||||
"description": "tau"
|
||||
},
|
||||
"upsilon": {
|
||||
"prefix": "@u",
|
||||
"body": "\\upsilon",
|
||||
"description": "upsilon"
|
||||
},
|
||||
"omega": {
|
||||
"prefix": "@o",
|
||||
"body": "\\omega",
|
||||
"description": "omega"
|
||||
},
|
||||
"wedge": {
|
||||
"prefix": "@&",
|
||||
"body": "\\wedge",
|
||||
"description": "wedge"
|
||||
},
|
||||
"xi": {
|
||||
"prefix": "@x",
|
||||
"body": "\\xi",
|
||||
"description": "xi"
|
||||
},
|
||||
"psi": {
|
||||
"prefix": "@y",
|
||||
"body": "\\psi",
|
||||
"description": "psi"
|
||||
},
|
||||
"zeta": {
|
||||
"prefix": "@z",
|
||||
"body": "\\zeta",
|
||||
"description": "zeta"
|
||||
},
|
||||
"Delta": {
|
||||
"prefix": "@D",
|
||||
"body": "\\Delta",
|
||||
"description": "Delta"
|
||||
},
|
||||
"Phi": {
|
||||
"prefix": "@F",
|
||||
"body": "\\Phi",
|
||||
"description": "Phi"
|
||||
},
|
||||
"Gamma": {
|
||||
"prefix": "@G",
|
||||
"body": "\\Gamma",
|
||||
"description": "Gamma"
|
||||
},
|
||||
"Theta": {
|
||||
"prefix": "@Q",
|
||||
"body": "\\Theta",
|
||||
"description": "Theta"
|
||||
},
|
||||
"Lambda": {
|
||||
"prefix": "@L",
|
||||
"body": "\\Lambda",
|
||||
"description": "Lambda"
|
||||
},
|
||||
"Xi": {
|
||||
"prefix": "@X",
|
||||
"body": "\\Xi",
|
||||
"description": "Xi"
|
||||
},
|
||||
"Psi": {
|
||||
"prefix": "@Y",
|
||||
"body": "\\Psi",
|
||||
"description": "Psi"
|
||||
},
|
||||
"Sigma": {
|
||||
"prefix": "@S",
|
||||
"body": "\\Sigma",
|
||||
"description": "Sigma"
|
||||
},
|
||||
"Upsilon": {
|
||||
"prefix": "@U",
|
||||
"body": "\\Upsilon",
|
||||
"description": "Upsilon"
|
||||
},
|
||||
"Omega": {
|
||||
"prefix": "@W",
|
||||
"body": "\\Omega",
|
||||
"description": "Omega"
|
||||
},
|
||||
"(": {
|
||||
"prefix": "@(",
|
||||
"body": "\\left( ${1:${TM_SELECTED_TEXT}} \\right)",
|
||||
"description": "left( ... right)"
|
||||
},
|
||||
"{": {
|
||||
"prefix": "@{",
|
||||
"body": "\\left\\{ ${1:${TM_SELECTED_TEXT}} \\right\\\\\\}",
|
||||
"description": "left{ ... right}"
|
||||
},
|
||||
"[": {
|
||||
"prefix": "@[",
|
||||
"body": "\\left[ ${1:${TM_SELECTED_TEXT}} \\right]",
|
||||
"description": "left[ ... right]"
|
||||
},
|
||||
"wrapEnv": {
|
||||
"body": "\n\\begin{$1}\n\t${0:${TM_SELECTED_TEXT}}\n\\end{$1}",
|
||||
"description": "Wrap selection into an environment"
|
||||
},
|
||||
"part": {
|
||||
"prefix": "SPA",
|
||||
"body": "\\part{${1:${TM_SELECTED_TEXT}}}",
|
||||
"description": "part"
|
||||
},
|
||||
"chapter": {
|
||||
"prefix": "SCH",
|
||||
"body": "\\chapter{${1:${TM_SELECTED_TEXT}}}",
|
||||
"description": "chapter"
|
||||
},
|
||||
"section": {
|
||||
"prefix": "SSE",
|
||||
"body": "\\section{${1:${TM_SELECTED_TEXT}}}",
|
||||
"description": "section"
|
||||
|
||||
},
|
||||
"subsection": {
|
||||
"prefix": "SSS",
|
||||
"body": "\\subsection{${1:${TM_SELECTED_TEXT}}}",
|
||||
"description": "subsection"
|
||||
},
|
||||
"subsubsection": {
|
||||
"prefix": "SS2",
|
||||
"body": "\\subsubsection{${1:${TM_SELECTED_TEXT}}}",
|
||||
"description": "subsubsection"
|
||||
},
|
||||
"paragraph": {
|
||||
"prefix": "SPG",
|
||||
"body": "\\paragraph{${1:${TM_SELECTED_TEXT}}}",
|
||||
"description": "paragraph"
|
||||
},
|
||||
"subparagraph": {
|
||||
"prefix": "SSP",
|
||||
"body": "\\subparagraph{${1:${TM_SELECTED_TEXT}}}",
|
||||
"description": "subparagraph"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,481 @@
|
||||
{
|
||||
"Align(ed)": {
|
||||
"prefix": "ali",
|
||||
"body": [
|
||||
"\\begin{align}",
|
||||
"\t$0",
|
||||
"\\end{align}"
|
||||
],
|
||||
"description": "Align(ed)"
|
||||
},
|
||||
"Cases": {
|
||||
"prefix": "cas",
|
||||
"body": [
|
||||
"\\begin{cases}",
|
||||
"\t${1:equation}, &\\text{ if }${2:case}\\\\\\\\",
|
||||
"\t$0",
|
||||
"\\end{cases}"
|
||||
],
|
||||
"description": "Cases"
|
||||
},
|
||||
"Chapter": {
|
||||
"prefix": "cha",
|
||||
"body": [
|
||||
"\\chapter{${1:chapter name}} % (fold)",
|
||||
"\\label{cha:${2:${1/(\\w+)(\\W+$)?|\\W+/${1:?${1:/asciify/downcase}:_}/g}}}",
|
||||
"${0:$TM_SELECTED_TEXT}",
|
||||
"% chapter $2 (end)"
|
||||
],
|
||||
"description": "Chapter"
|
||||
},
|
||||
"Description": {
|
||||
"prefix": "desc",
|
||||
"body": [
|
||||
"\\\\begin{description}",
|
||||
"\t\\item[$1] $0",
|
||||
"\\\\end{description}"
|
||||
],
|
||||
"description": "Description"
|
||||
},
|
||||
"Math": {
|
||||
"prefix": "math",
|
||||
"body": [
|
||||
"\\begin{math}",
|
||||
"\t$1",
|
||||
"\\end{math}",
|
||||
"$0"
|
||||
],
|
||||
"description": "Add a Math"
|
||||
},
|
||||
"DisplayMath": {
|
||||
"prefix": "displaymath",
|
||||
"body": [
|
||||
"\\begin{displaymath}",
|
||||
"\t$1",
|
||||
"\\end{displaymath}",
|
||||
"$0"
|
||||
],
|
||||
"description": "Display Math"
|
||||
},
|
||||
"Equation": {
|
||||
"prefix": "equation",
|
||||
"body": [
|
||||
"\\begin{equation}",
|
||||
"\t$0",
|
||||
"\t\\label{eq:$1}",
|
||||
"\\end{equation}"
|
||||
],
|
||||
"description": "Add a Equation"
|
||||
},
|
||||
"Display Math — \\[ … \\]": {
|
||||
"prefix": "$$",
|
||||
"body": [
|
||||
"\\[",
|
||||
"\t$TM_SELECTED_TEXT$1",
|
||||
"\\]"
|
||||
],
|
||||
"description": "Display Math"
|
||||
},
|
||||
"Theorem": {
|
||||
"prefix": "theorem",
|
||||
"body": [
|
||||
"\\begin{theorem}",
|
||||
"\t$1",
|
||||
"\t\\begin{displaymath}",
|
||||
"\t\t$2",
|
||||
"\t\\end{displaymath}",
|
||||
"\t$3",
|
||||
"\\end{theorem}",
|
||||
"$0"
|
||||
],
|
||||
"description": "Add a theorem"
|
||||
},
|
||||
"Definition": {
|
||||
"prefix": "definition",
|
||||
"body": [
|
||||
"\\begin{definition}",
|
||||
"\t$1",
|
||||
"\t\\begin{displaymath}",
|
||||
"\t\t$2",
|
||||
"\t\\end{displaymath}",
|
||||
"\t$3",
|
||||
"\\end{definition}",
|
||||
"$0"
|
||||
],
|
||||
"description": "Add a definition"
|
||||
},
|
||||
"Proof": {
|
||||
"prefix": "proof",
|
||||
"body": [
|
||||
"\\begin{proof}",
|
||||
"\t$1",
|
||||
"\t\\begin{displaymath}",
|
||||
"\t\t$2",
|
||||
"\t\\end{displaymath}",
|
||||
"\t$3",
|
||||
"\\end{proof}",
|
||||
"$0"
|
||||
],
|
||||
"description": "Add a proof"
|
||||
},
|
||||
"Algorithm": {
|
||||
"prefix": "algo",
|
||||
"body": [
|
||||
"% \\usepackage{algorithm,algorithmicx,algpseudocode}",
|
||||
"\\begin{algorithm}",
|
||||
"\t\\floatname{algorithm}{${1:Algorithm}}",
|
||||
"\t\\algrenewcommand\\algorithmicrequire{\\textbf{${2:Input: }}}",
|
||||
"\t\\algrenewcommand\\algorithmicensure{\\textbf{${3:Output: }}}",
|
||||
"\t\\caption{$4}",
|
||||
"\t\\label{alg:$5}",
|
||||
"\t\\begin{algorithmic}[1]",
|
||||
"\t\t\\Require \\$input\\$",
|
||||
"\t\t\\Ensure \\$output\\$",
|
||||
"\t\t$6",
|
||||
"\t\t\\State \\textbf{return} \\$state\\$",
|
||||
"\t\\end{algorithmic}",
|
||||
"\\end{algorithm}",
|
||||
"$0"
|
||||
],
|
||||
"description": "Add an algorithm"
|
||||
},
|
||||
"Algorithm:State": {
|
||||
"prefix": "state",
|
||||
"body": [
|
||||
"\\State $1"
|
||||
],
|
||||
"desciption": "Add an statement of algorithm"
|
||||
},
|
||||
"Algorithm:If": {
|
||||
"prefix": "if",
|
||||
"body": [
|
||||
"\\If{$1}",
|
||||
"\\ElsIf{$2}",
|
||||
"\\Else",
|
||||
"\\EndIf"
|
||||
],
|
||||
"desciption": "Add an if statement of algorithm"
|
||||
},
|
||||
"Algorithm:For": {
|
||||
"prefix": "for",
|
||||
"body": [
|
||||
"\\For{i=0:$1}",
|
||||
"\t\\State $0",
|
||||
"\\EndFor"
|
||||
],
|
||||
"desciption": "Add an for statement of algorithm"
|
||||
},
|
||||
"Algorithm:While": {
|
||||
"prefix": "while",
|
||||
"body": [
|
||||
"\\While{$1}",
|
||||
"\t\\State $0",
|
||||
"\\EndWhile"
|
||||
],
|
||||
"desciption": "Add an for statement of algorithm"
|
||||
},
|
||||
"Algorithm:Ref": {
|
||||
"prefix": "algo:ref",
|
||||
"body": [
|
||||
"${1:Algorithm}~\\ref{algo:$2}$0"
|
||||
],
|
||||
"desciption": "Ref for Algorithm"
|
||||
},
|
||||
"Figure:Ref": {
|
||||
"prefix": "figure:ref",
|
||||
"body": [
|
||||
"${1:Figure}~\\ref{fig:$2}$0"
|
||||
],
|
||||
"description": "Ref for Figure"
|
||||
},
|
||||
"Gather(ed)": {
|
||||
"prefix": "gat",
|
||||
"body": [
|
||||
"\\begin{gather}",
|
||||
"\t$0",
|
||||
"\\end{gather}"
|
||||
],
|
||||
"description": "Gather(ed)"
|
||||
},
|
||||
"Itemize": {
|
||||
"prefix": "item",
|
||||
"body": [
|
||||
"\\\\begin{itemize}",
|
||||
"\t\\item $0",
|
||||
"\\\\end{itemize}"
|
||||
],
|
||||
"description": "Itemize"
|
||||
},
|
||||
"Listing:Ref": {
|
||||
"prefix": "listing:ref",
|
||||
"body": [
|
||||
"${1:Listing}~\\ref{lst:$2}$0"
|
||||
],
|
||||
"description": "Listing"
|
||||
},
|
||||
"Matrix": {
|
||||
"prefix": "mat",
|
||||
"body": [
|
||||
"\\begin{${1:p/b/v/V/B/small}matrix}",
|
||||
"\t$0",
|
||||
"\\end{${1:p/b/v/V/B/small}matrix}"
|
||||
],
|
||||
"description": "Matrix"
|
||||
},
|
||||
"Page": {
|
||||
"prefix": "page",
|
||||
"body": [
|
||||
"${1:page}~\\pageref{$2}$0"
|
||||
],
|
||||
"description": "Page"
|
||||
},
|
||||
"Paragraph": {
|
||||
"prefix": "par",
|
||||
"body": [
|
||||
"\\paragraph{${1:paragraph name}} % (fold)",
|
||||
"\\label{par:${2:${1/(\\w+)(\\W+$)?|\\W+/${1:?${1:/asciify/downcase}:_}/g}}}",
|
||||
"${0:$TM_SELECTED_TEXT}",
|
||||
"% paragraph $2 (end)"
|
||||
],
|
||||
"description": "Paragraph"
|
||||
},
|
||||
"Part": {
|
||||
"prefix": "part",
|
||||
"body": [
|
||||
"\\part{${1:part name}} % (fold)",
|
||||
"\\label{prt:${2:${1/(\\w+)(\\W+$)?|\\W+/${1:?${1:/asciify/downcase}:_}/g}}}",
|
||||
"${0:$TM_SELECTED_TEXT}",
|
||||
"% part $2 (end)"
|
||||
],
|
||||
"description": "Part"
|
||||
},
|
||||
"Region Start": {
|
||||
"prefix": "#region",
|
||||
"body": [
|
||||
"%#Region $0"
|
||||
],
|
||||
"description": "Folding Region Start"
|
||||
},
|
||||
"Region End": {
|
||||
"prefix": "#endregion",
|
||||
"body": [
|
||||
"%#Endregion"
|
||||
],
|
||||
"description": "Folding Region End"
|
||||
},
|
||||
"Section:Ref": {
|
||||
"prefix": "section:ref",
|
||||
"body": [
|
||||
"${1:Section}~\\ref{sec:$2}$0"
|
||||
],
|
||||
"description": "Section Reference"
|
||||
},
|
||||
"Split": {
|
||||
"prefix": "spl",
|
||||
"body": [
|
||||
"\\begin{split}",
|
||||
"\t$0",
|
||||
"\\end{split}"
|
||||
],
|
||||
"description": "Split"
|
||||
},
|
||||
"Section": {
|
||||
"prefix": "sec",
|
||||
"body": [
|
||||
"\\section{${1:section name}} % (fold)",
|
||||
"\\label{sec:${2:${1/(\\w+)(\\W+$)?|\\W+/${1:?${1:/asciify/downcase}:_}/g}}}",
|
||||
"${0:$TM_SELECTED_TEXT}",
|
||||
"% section $2 (end)"
|
||||
],
|
||||
"description": "Section"
|
||||
},
|
||||
"Sub Paragraph": {
|
||||
"prefix": "subp",
|
||||
"body": [
|
||||
"\\subparagraph{${1:subparagraph name}} % (fold)",
|
||||
"\\label{subp:${2:${1/(\\w+)(\\W+$)?|\\W+/${1:?${1:/asciify/downcase}:_}/g}}}",
|
||||
"${0:$TM_SELECTED_TEXT}",
|
||||
"% subparagraph $2 (end)"
|
||||
],
|
||||
"description": "Sub Paragraph"
|
||||
},
|
||||
"Sub Section": {
|
||||
"prefix": "sub",
|
||||
"body": [
|
||||
"\\subsection{${1:subsection name}} % (fold)",
|
||||
"\\label{sub:${2:${1/(\\w+)(\\W+$)?|\\W+/${1:?${1:/asciify/downcase}:_}/g}}}",
|
||||
"${0:$TM_SELECTED_TEXT}",
|
||||
"% subsection $2 (end)"
|
||||
],
|
||||
"description": "Sub Section"
|
||||
},
|
||||
"Sub Sub Section": {
|
||||
"prefix": "subs",
|
||||
"body": [
|
||||
"\\subsubsection{${1:subsubsection name}} % (fold)",
|
||||
"\\label{ssub:${2:${1/(\\w+)(\\W+$)?|\\W+/${1:?${1:/asciify/downcase}:_}/g}}}",
|
||||
"${0:$TM_SELECTED_TEXT}",
|
||||
"% subsubsection $2 (end)"
|
||||
],
|
||||
"description": "Sub Sub Section"
|
||||
},
|
||||
"Table:Ref": {
|
||||
"prefix": "table:ref",
|
||||
"body": [
|
||||
"${1:Table}~\\ref{tab:$2}$0"
|
||||
],
|
||||
"description": "Table Reference"
|
||||
},
|
||||
"Tabular": {
|
||||
"prefix": "tab",
|
||||
"body": [
|
||||
"\\\\begin{${1:t}${1/(t)$|(a)$|(.*)/(?1:abular)(?2:rray)/}}{${2:c}}",
|
||||
"$0${2/((?<=[clr])([ |]*(c|l|r)))|./(?1: & )/g}",
|
||||
"\\\\end{${1:t}${1/(t)$|(a)$|(.*)/(?1:abular)(?2:rray)/}}"
|
||||
],
|
||||
"description": "Tabular"
|
||||
},
|
||||
"\\begin{}…\\end{}": {
|
||||
"prefix": "begin",
|
||||
"body": [
|
||||
"\\\\begin{${1:env}}",
|
||||
"\t${1/(enumerate|itemize|list)|(description)|.*/(?1:\\item )(?2:\\item)/}$0",
|
||||
"\\\\end{${1:env}}"
|
||||
],
|
||||
"description": "Begin - End"
|
||||
},
|
||||
"Figure": {
|
||||
"prefix": "figure",
|
||||
"body": [
|
||||
"\\begin{figure}",
|
||||
"\t\\begin{center}",
|
||||
"\t\t\\includegraphics[width=0.95\\textwidth]{figures/$1}",
|
||||
"\t\\end{center}",
|
||||
"\t\\caption{$3}",
|
||||
"\t\\label{fig:$4}",
|
||||
"\\end{figure}",
|
||||
"$0"
|
||||
],
|
||||
"description": "Add a figure"
|
||||
},
|
||||
"Figure:ACM": {
|
||||
"prefix": "figure:acm",
|
||||
"body": [
|
||||
"\\begin{figure}",
|
||||
"\t\\includegraphics[width=0.45\\textwidth]{figures/$1}",
|
||||
"\t\\caption{$2}",
|
||||
"\t\\label{fig:$3}",
|
||||
"\\end{figure}",
|
||||
"$0"
|
||||
],
|
||||
"description": "Add a figure (ACM)"
|
||||
},
|
||||
"Figure:ACM:*": {
|
||||
"prefix": "figure:acm:*",
|
||||
"body": [
|
||||
"\\begin{figure*}",
|
||||
"\t\\includegraphics[width=0.45\\textwidth]{figures/$1}",
|
||||
"\t\\caption{$2}",
|
||||
"\t\\label{fig:$3}",
|
||||
"\\end{figure*}",
|
||||
"$0"
|
||||
],
|
||||
"description": "Add a figure (ACM)"
|
||||
},
|
||||
"Table": {
|
||||
"prefix": "table",
|
||||
"body": [
|
||||
"\\begin{table}",
|
||||
"\t\\caption{$1}",
|
||||
"\t\\label{tab:$2}",
|
||||
"\t\\begin{center}",
|
||||
"\t\t\\begin{tabular}[c]{l|l}",
|
||||
"\t\t\t\\hline",
|
||||
"\t\t\t\\multicolumn{1}{c|}{\\textbf{$3}} & ",
|
||||
"\t\t\t\\multicolumn{1}{c}{\\textbf{$4}} \\\\\\\\",
|
||||
"\t\t\t\\hline",
|
||||
"\t\t\ta & b \\\\\\\\",
|
||||
"\t\t\tc & d \\\\\\\\",
|
||||
"\t\t\t$5",
|
||||
"\t\t\t\\hline",
|
||||
"\t\t\\end{tabular}",
|
||||
"\t\\end{center}",
|
||||
"\\end{table}",
|
||||
"$0"
|
||||
],
|
||||
"description": "Add a table"
|
||||
},
|
||||
"Table:ACM": {
|
||||
"prefix": "table:acm",
|
||||
"body": [
|
||||
"\\begin{table}",
|
||||
"\t\\caption{$1}",
|
||||
"\t\\label{tab:$2}",
|
||||
"\t\\begin{tabular}{${3:ccl}}",
|
||||
"\t\t\\toprule",
|
||||
"\t\t$4",
|
||||
"\t\ta & b & c \\\\\\\\",
|
||||
"\t\t\\midrule",
|
||||
"\t\td & e & f \\\\\\\\",
|
||||
"\t\t\\bottomrule",
|
||||
"\t\\end{tabular}",
|
||||
"\\end{table}",
|
||||
"$0"
|
||||
],
|
||||
"description": "Add a table (ACM)"
|
||||
},
|
||||
"Table:ACM:*": {
|
||||
"prefix": "table:acm:*",
|
||||
"body": [
|
||||
"\\begin{table*}",
|
||||
"\t\\caption{$1}",
|
||||
"\t\\label{tab:$2}",
|
||||
"\t\\begin{tabular}{${3:ccl}}",
|
||||
"\t\t\\toprule",
|
||||
"\t\t$4",
|
||||
"\t\ta & b & c \\\\\\\\",
|
||||
"\t\t\\midrule",
|
||||
"\t\td & e & f \\\\\\\\",
|
||||
"\t\t\\bottomrule",
|
||||
"\t\\end{tabular}",
|
||||
"\\end{table*}",
|
||||
"$0"
|
||||
],
|
||||
"description": "Add a table (ACM)"
|
||||
},
|
||||
"Enumerate": {
|
||||
"prefix": "enumerate",
|
||||
"body": [
|
||||
"\\\\begin{enumerate}",
|
||||
"\t\\item $0",
|
||||
"\\\\end{enumerate}"
|
||||
],
|
||||
"description": "Add a enumerate"
|
||||
},
|
||||
"Compactitem": {
|
||||
"prefix": "compactitem",
|
||||
"body": [
|
||||
"\\begin{compactitem}",
|
||||
"\t\\item $1",
|
||||
"\\end{compactitem}",
|
||||
"$0"
|
||||
],
|
||||
"description": "Add a compactitem (from package paralist)"
|
||||
},
|
||||
"Cite": {
|
||||
"prefix": "cite",
|
||||
"body": [
|
||||
"~\\cite{$1}$0"
|
||||
],
|
||||
"description": "Add a cite"
|
||||
},
|
||||
"EmptyPage": {
|
||||
"prefix": "empty",
|
||||
"body": [
|
||||
"\\null\\thispagestyle{empty}",
|
||||
"\\newpage",
|
||||
"$0"
|
||||
],
|
||||
"description": "Add a empty page"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,367 @@
|
||||
{
|
||||
"Template": {
|
||||
"prefix": ["template", "\\template"],
|
||||
"body": [
|
||||
"%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Define Article %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%",
|
||||
"\\documentclass{article}",
|
||||
"%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%",
|
||||
"",
|
||||
"%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Using Packages %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%",
|
||||
"\\usepackage{geometry}",
|
||||
"\\usepackage{graphicx}",
|
||||
"\\usepackage{amssymb}",
|
||||
"\\usepackage{amsmath}",
|
||||
"\\usepackage{amsthm}",
|
||||
"\\usepackage{empheq}",
|
||||
"\\usepackage{mdframed}",
|
||||
"\\usepackage{booktabs}",
|
||||
"\\usepackage{lipsum}",
|
||||
"\\usepackage{graphicx}",
|
||||
"\\usepackage{color}",
|
||||
"\\usepackage{psfrag}",
|
||||
"\\usepackage{pgfplots}",
|
||||
"\\usepackage{bm}",
|
||||
"%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%",
|
||||
"",
|
||||
"${3:% Other Settings}",
|
||||
"",
|
||||
"%%%%%%%%%%%%%%%%%%%%%%%%%% Page Setting %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%",
|
||||
"\\geometry{a4paper}",
|
||||
"",
|
||||
"%%%%%%%%%%%%%%%%%%%%%%%%%% Define some useful colors %%%%%%%%%%%%%%%%%%%%%%%%%%",
|
||||
"\\definecolor{ocre}{RGB}{243,102,25}",
|
||||
"\\definecolor{mygray}{RGB}{243,243,244}",
|
||||
"\\definecolor{deepGreen}{RGB}{26,111,0}",
|
||||
"\\definecolor{shallowGreen}{RGB}{235,255,255}",
|
||||
"\\definecolor{deepBlue}{RGB}{61,124,222}",
|
||||
"\\definecolor{shallowBlue}{RGB}{235,249,255}",
|
||||
"%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%",
|
||||
"",
|
||||
"%%%%%%%%%%%%%%%%%%%%%%%%%% Define an orangebox command %%%%%%%%%%%%%%%%%%%%%%%%",
|
||||
"\\newcommand\\orangebox[1]{\\fcolorbox{ocre}{mygray}{\\hspace{1em}#1\\hspace{1em}}}",
|
||||
"%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%",
|
||||
"",
|
||||
"%%%%%%%%%%%%%%%%%%%%%%%%%%%% English Environments %%%%%%%%%%%%%%%%%%%%%%%%%%%%%",
|
||||
"\\newtheoremstyle{mytheoremstyle}{3pt}{3pt}{\\normalfont}{0cm}{\\rmfamily\\bfseries}{}{1em}{{\\color{black}\\thmname{#1}~\\thmnumber{#2}}\\thmnote{\\,--\\,#3}}",
|
||||
"\\newtheoremstyle{myproblemstyle}{3pt}{3pt}{\\normalfont}{0cm}{\\rmfamily\\bfseries}{}{1em}{{\\color{black}\\thmname{#1}~\\thmnumber{#2}}\\thmnote{\\,--\\,#3}}",
|
||||
"\\theoremstyle{mytheoremstyle}",
|
||||
"\\newmdtheoremenv[linewidth=1pt,backgroundcolor=shallowGreen,linecolor=deepGreen,leftmargin=0pt,innerleftmargin=20pt,innerrightmargin=20pt,]{theorem}{Theorem}[section]",
|
||||
"\\theoremstyle{mytheoremstyle}",
|
||||
"\\newmdtheoremenv[linewidth=1pt,backgroundcolor=shallowBlue,linecolor=deepBlue,leftmargin=0pt,innerleftmargin=20pt,innerrightmargin=20pt,]{definition}{Definition}[section]",
|
||||
"\\theoremstyle{myproblemstyle}",
|
||||
"\\newmdtheoremenv[linecolor=black,leftmargin=0pt,innerleftmargin=10pt,innerrightmargin=10pt,]{problem}{Problem}[section]",
|
||||
"%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%",
|
||||
"",
|
||||
"%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Plotting Settings %%%%%%%%%%%%%%%%%%%%%%%%%%%%%",
|
||||
"\\usepgfplotslibrary{colorbrewer}",
|
||||
"\\pgfplotsset{width=8cm,compat=1.9}",
|
||||
"%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%",
|
||||
"",
|
||||
"%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Title & Author %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%",
|
||||
"\\title{${1:Title}}",
|
||||
"\\author{${2:Haoyun Qin}}",
|
||||
"%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%",
|
||||
"",
|
||||
"\\begin{document}",
|
||||
" \\maketitle",
|
||||
" $0",
|
||||
"\\end{document}"
|
||||
],
|
||||
"description": "Use the default template which includes a variety of packages and declared-commands. The template will also automatically generate the title and author, as well as date, and will formate the document."
|
||||
},
|
||||
"Large Summation": {
|
||||
"prefix": ["sumlarge", "\\sumlarge"],
|
||||
"body": [
|
||||
"\\displaystyle\\sum_{$1}^{$2}$3"
|
||||
],
|
||||
"description": "Insert a large summation notation."
|
||||
},
|
||||
"Inline Summation": {
|
||||
"prefix": ["suminline", "\\suminline"],
|
||||
"body": [
|
||||
"\\sum_{$1}^{$2}$3"
|
||||
],
|
||||
"description": "Insert an inline summation notation, (only in the cases when the environment is inline math environment)."
|
||||
},
|
||||
"Inline Math": {
|
||||
"prefix": ["mathinline", "\\mathinline"],
|
||||
"body": [
|
||||
"$ $1 $$0"
|
||||
],
|
||||
"description": "Insert inline Math Environment."
|
||||
},
|
||||
"Centered Math": {
|
||||
"prefix": ["mathcentered", "\\mathcentered"],
|
||||
"body": [
|
||||
"$$ $0 $$"
|
||||
],
|
||||
"description": "Insert centered Math Environment."
|
||||
},
|
||||
"Section": {
|
||||
"prefix": ["section", "\\section"],
|
||||
"body": [
|
||||
"\\section{$1}$0"
|
||||
],
|
||||
"description": "Insert a new section."
|
||||
},
|
||||
"Subsection": {
|
||||
"prefix": ["subsection", "\\subsection"],
|
||||
"body": [
|
||||
"\\subsection{$1}$0"
|
||||
],
|
||||
"description": "Insert a new subsection."
|
||||
},
|
||||
"Header": {
|
||||
"prefix": ["header", "\\header", "##"],
|
||||
"body": "\\section*{$1}$0",
|
||||
"description": "Insert a section without index."
|
||||
},
|
||||
"Header Small": {
|
||||
"prefix": ["headersmall", "\\headersmall", "###"],
|
||||
"body": "\\subsection*{$1}$0",
|
||||
"description": "Insert a subsection without index."
|
||||
},
|
||||
"Italic Text": {
|
||||
"prefix": ["italic", "\\italic", "*"],
|
||||
"body": "\\textit{$1}$0",
|
||||
"description": "Insert italic text."
|
||||
},
|
||||
"Bold Text": {
|
||||
"prefix": ["bold", "\\bold", "**"],
|
||||
"body": "\\textbf{$1}$0",
|
||||
"description": "Insert bold text."
|
||||
},
|
||||
"Bold Italic Text": {
|
||||
"prefix": ["bolditalic", "\\bolditalic", "***"],
|
||||
"body": "\\textbf{\\textit{$1}}$0",
|
||||
"description": "Insert bold italic text."
|
||||
},
|
||||
"Itemize": {
|
||||
"prefix": ["- ", "\\itemize", "itemize"],
|
||||
"body": [
|
||||
"\\begin{itemize}",
|
||||
"\t\\item $1",
|
||||
"\\end{itemize}$0"
|
||||
]
|
||||
},
|
||||
"Up": {
|
||||
"prefix": ["to", "\\to"],
|
||||
"body": [
|
||||
"^ {$1}$0"
|
||||
],
|
||||
"description": "Superscript notation, as well as the power notation."
|
||||
},
|
||||
"Theorem": {
|
||||
"prefix": ["theorem", "\\theorem"],
|
||||
"body": [
|
||||
"\\begin{theorem}[${1:name of the theorem}]",
|
||||
"\t$0",
|
||||
"\\end{theorem}"
|
||||
],
|
||||
"description": "Insert a theorem, whose style is already defined in the template. The serial number is automatically generated according to the section."
|
||||
},
|
||||
"Problem": {
|
||||
"prefix": ["problem", "\\problem"],
|
||||
"body": [
|
||||
"\\begin{problem}[${1:name of the problem}]",
|
||||
"\t$0",
|
||||
"\\end{problem}"
|
||||
],
|
||||
"description": "Insert a problem, whose style is already defined in the template. The serial number is automatically generated according to the section."
|
||||
},
|
||||
"Indent": {
|
||||
"prefix": ["tab", "\\tab"],
|
||||
"body": ["\\indent "],
|
||||
"description": "The equivalent of \"\\t\", also known as \"Tab\""
|
||||
},
|
||||
"Definition": {
|
||||
"prefix": ["definition", "\\definition"],
|
||||
"body": [
|
||||
"\\begin{definition}[${1:name of the definition}]",
|
||||
"\t$0",
|
||||
"\\end{definition}"
|
||||
],
|
||||
"description": "Insert a definition, whose style is already defined in the template. The serial number is automatically generated according to the section."
|
||||
},
|
||||
"Proof": {
|
||||
"prefix": ["proof", "\\proof"],
|
||||
"body": [
|
||||
"\\begin{proof}[Proof ${1:Other Information}]",
|
||||
"\t$0",
|
||||
"\\end{proof}"
|
||||
],
|
||||
"description": "Insert a proof, whose style is already defined in the template. The serial number is automatically generated according to the section."
|
||||
},
|
||||
"Large Integral": {
|
||||
"prefix": ["integrallarge", "\\integrallarge"],
|
||||
"body": [
|
||||
"\\displaystyle\\int_{$1}^{$2}$3"
|
||||
],
|
||||
"description": "Insert large integral notation."
|
||||
},
|
||||
"Inline Integral": {
|
||||
"prefix": ["integralinline", "\\integralinline"],
|
||||
"body": [
|
||||
"\\int_{$1}^{$2}$3"
|
||||
],
|
||||
"description": "Insert inline integral notation, (only in the cases when the environment is inline math environment)."
|
||||
},
|
||||
"Inline Fraction": {
|
||||
"prefix": ["fractioninline", "\\fractioninline"],
|
||||
"body": ["\\frac{$1}{$2}$0"],
|
||||
"description": ["Insert inline fraction notation, (only in the cases when the environment is inline math environment)."]
|
||||
},
|
||||
"Large Fraction": {
|
||||
"prefix": ["fractionlarge", "\\fractionlarge"],
|
||||
"body": ["\\displaystyle\\frac{$1}{$2}$0"],
|
||||
"description": ["Insert large fraction notation"]
|
||||
},
|
||||
"Create 2D Plot environment": {
|
||||
"prefix": ["plotenvironment2d", "\\plotenvironment2d"],
|
||||
"body": [
|
||||
"\\begin{tikzpicture}",
|
||||
"\\begin{axis}[",
|
||||
"legend pos=outer north east,",
|
||||
"title=${1:Example},",
|
||||
"axis lines =${2| box, left, middle, center, right, none|},",
|
||||
"xlabel = \\$x\\$,",
|
||||
"ylabel = \\$y\\$,",
|
||||
"variable = t,",
|
||||
"trig format plots = rad,",
|
||||
"]",
|
||||
"$3",
|
||||
"\\end{axis}",
|
||||
"\\end{tikzpicture}$0"
|
||||
],
|
||||
"description": "Create a 2DPlot Environment of pgfplots. The style declarations are already included in the snippet."
|
||||
},
|
||||
"Plot 2D Graph": {
|
||||
"prefix": ["plotgraph2d", "\\plotgraph2d"],
|
||||
"body": [
|
||||
"\\addplot [",
|
||||
"\tdomain=${1:-10}:${2:10}," ,
|
||||
"\tsamples=70,",
|
||||
"\tcolor=${3:blue},",
|
||||
"\t]",
|
||||
"\t{${4:x^2 + 2*x + 1}};",
|
||||
"\\addlegendentry{$${5:x^2 + 2x + 1}$}",
|
||||
"$0"
|
||||
],
|
||||
"description": "Plot a 2D Graph in the 2D graph environment, noted that this can also be used in the 3D environment."
|
||||
},
|
||||
"Plot Circle 2D": {
|
||||
"prefix": ["plotcircle2d", "\\plotcircle2d"],
|
||||
"body": [
|
||||
"\\addplot [",
|
||||
"\tdomain=0:2*3.14159265," ,
|
||||
"\tsamples=70,",
|
||||
"\tcolor=${4:blue},",
|
||||
"\t]",
|
||||
"\t({${1:r}*cos(t)+${2:a}},{${1:r}*sin(t)+${3:b}});",
|
||||
"\\addlegendentry{$(x-${2:a})^2+(y-${3:b})^2=${1:r}^2$}$0"
|
||||
],
|
||||
"description": "Plot a 2D Circle in the 2D graph environment, noted that this can also be used in the 3D environment."
|
||||
},
|
||||
"Plot Line 2D": {
|
||||
"prefix": ["plotline2d", "\\plotline2d"],
|
||||
"body": [
|
||||
"\\addplot [",
|
||||
"\tdomain=${4:x1}:${5:x2}," ,
|
||||
"\tsamples=70,",
|
||||
"\tcolor=${3:blue},",
|
||||
"\t]",
|
||||
"\t{${1:a}*x+${2:b}};",
|
||||
"\\addlegendentry{$ y=${1:a}x+${2:b}$}$0"
|
||||
],
|
||||
"description": "Plot a 2D Line in the 2D graph environment, noted that this can also be used in the 3D environment."
|
||||
},
|
||||
"Plot Ellipse 2D": {
|
||||
"prefix": ["plotellipse2d", "\\plotellipse2d"],
|
||||
"body": [
|
||||
"\\addplot [",
|
||||
"\tdomain=0:2*3.14159265," ,
|
||||
"\tsamples=70,",
|
||||
"\tcolor=${5:blue},",
|
||||
"\t]",
|
||||
"\t({${1:a}*cos(t)+${3:x}},{${2:b}*sin(t)+${4:y}});",
|
||||
"\\addlegendentry{$\\frac{(x-${3:x})^2}{${1:a}^2}+\\frac{(y-${4:y})^2}{${2:b}^2}=1$}$0"
|
||||
],
|
||||
"description": "Plot a 2D Ellipse in the 2D graph environment, noted that this can also be used in the 3D environment."
|
||||
},
|
||||
"Plot Quadratic Function 2D by Point": {
|
||||
"prefix": ["plotquadraticfunction2dbypoint", "\\plotquadraticfunction2dbypoint"],
|
||||
"body": [
|
||||
"\\addplot [",
|
||||
"\tdomain=${4:x1}:${5:x2}," ,
|
||||
"\tsamples=70,",
|
||||
"\tcolor=${6:blue},",
|
||||
"\t]",
|
||||
"\t{${1:a}*(x-${2:m})*(x-${2:m})+${3:b}};",
|
||||
"\\addlegendentry{$ y=${1:a}(x-${2:m})^2+${3:b}$}$0"
|
||||
],
|
||||
"description": "Plot a 2D graph of a quadratic function in the 2D graph environment by the given extrema, noted that this can also be used in the 3D environment."
|
||||
},
|
||||
"Plot Smooth Curve By Point Set": {
|
||||
"prefix": ["plotsmoothcurvebypointset", "\\plotsmoothcurvebypointset"],
|
||||
"body": [
|
||||
"\\addplot+[smooth]",
|
||||
"coordinates",
|
||||
"{",
|
||||
"${1:seperate the coordinates with spaces}",
|
||||
"};$0"
|
||||
],
|
||||
"description": "Plot a Smooth Curve by point set (2D)."
|
||||
},
|
||||
"Create 3D Plot Environment": {
|
||||
"prefix": ["plotenvironment3d", "\\plotenvironment3d"],
|
||||
"body": [
|
||||
"\\begin{tikzpicture}",
|
||||
"\\begin{axis}[",
|
||||
"legend pos=outer north east,",
|
||||
"title=${1:Example},",
|
||||
"axis lines =${2| box, left, middle, center, right, none|},",
|
||||
"colormap/${3|hot,hot2,jet,blackwhite,bluered,cool,greenyellow,redyellow,violet|},",
|
||||
"xlabel = \\$x\\$,",
|
||||
"ylabel = \\$y\\$,",
|
||||
"zlabel = \\$z\\$,",
|
||||
"variable = t,",
|
||||
"trig format plots = rad,",
|
||||
"]",
|
||||
"$4",
|
||||
"\\end{axis}",
|
||||
"\\end{tikzpicture}$0"
|
||||
],
|
||||
"description": "Create a 3DPlot Environment of pgfplots. The style declarations are already included in the snippet."
|
||||
},
|
||||
"Plot 3D Graph": {
|
||||
"prefix": ["plotgraph3d", "\\plotgraph3d"],
|
||||
"body": [
|
||||
"\\addplot3[",
|
||||
"\t${1|surf,mesh|},",
|
||||
"\tsamples=50,",
|
||||
"]",
|
||||
"{${2:x^2+y^2}};",
|
||||
"\\addlegendentry{\\$${3:x}\\$}$0"
|
||||
],
|
||||
"description": "Plot a 3D Graph in the 3D graph environment created."
|
||||
},
|
||||
"Create Align* Environment in Text": {
|
||||
"prefix": ["aligntext", "\\aligntext"],
|
||||
"body": [
|
||||
"\\begin{align*}",
|
||||
"\t$1",
|
||||
"\\end{align*}$0"
|
||||
],
|
||||
"description": "Create an align environment when the context is in the text environment."
|
||||
},
|
||||
"Insert Problem Solving Index": {
|
||||
"prefix": ["problemindex", "\\problemindex"],
|
||||
"body": ["\\noindent\\textbf{$1} $0"],
|
||||
"description": "Insert problem solving index format."
|
||||
},
|
||||
"Insert Solution Notation": {
|
||||
"prefix": ["solution", "\\solution"],
|
||||
"body": ["\\textit{ Sol. }"],
|
||||
"description": "Insert italic 'Sol.'"
|
||||
}
|
||||
}
|
||||
960
dot_vim/plugged/friendly-snippets/snippets/liquid.json
Normal file
960
dot_vim/plugged/friendly-snippets/snippets/liquid.json
Normal file
@@ -0,0 +1,960 @@
|
||||
{
|
||||
"Tag if": {
|
||||
"prefix": "if",
|
||||
"description": "Control flow tag: if",
|
||||
"body": [
|
||||
"{% if ${1:condition} %}",
|
||||
"\t$2",
|
||||
"{% endif %}"
|
||||
]
|
||||
},
|
||||
"Tag else": {
|
||||
"prefix": "else",
|
||||
"description": "Control flow tag: else",
|
||||
"body": [
|
||||
"{% else %}",
|
||||
"\t"
|
||||
]
|
||||
},
|
||||
"Tag elsif": {
|
||||
"prefix": "elsif",
|
||||
"description": "Control flow tag: elsif",
|
||||
"body": [
|
||||
"{% elsif ${1:condition} %}",
|
||||
"\t"
|
||||
]
|
||||
},
|
||||
"Tag if else": {
|
||||
"prefix": "ifelse",
|
||||
"description": "Control flow tag: if else",
|
||||
"body": [
|
||||
"{% if ${1:condition} %}",
|
||||
"\t$2",
|
||||
"{% else %}",
|
||||
"\t$3",
|
||||
"{% endif %}"
|
||||
]
|
||||
},
|
||||
"Tag unless": {
|
||||
"prefix": "unless",
|
||||
"description": "Control flow tag: unless",
|
||||
"body": [
|
||||
"{% unless ${1:condition} %}",
|
||||
"\t$2",
|
||||
"{% endunless %}"
|
||||
]
|
||||
},
|
||||
"Tag case": {
|
||||
"prefix": "case",
|
||||
"description": "Control flow tag: case",
|
||||
"body": [
|
||||
"{% case ${1:variable} %}",
|
||||
"\t{% when ${2:condition} %}",
|
||||
"\t\t$3",
|
||||
"\t{% else %}",
|
||||
"\t\t$4",
|
||||
"{% endcase %}"
|
||||
]
|
||||
},
|
||||
"Tag when": {
|
||||
"prefix": "when",
|
||||
"description": "Control flow tag: when",
|
||||
"body": [
|
||||
"{% when ${1:condition} %}",
|
||||
"$0"
|
||||
]
|
||||
},
|
||||
"Tag cycle": {
|
||||
"prefix": "cycle",
|
||||
"description": "Iteration tag: cycle",
|
||||
"body": [
|
||||
"{% cycle '${1:odd}', '${2:even}' %}"
|
||||
]
|
||||
},
|
||||
"Tag cycle group": {
|
||||
"prefix": "cyclegroup",
|
||||
"description": "Iteration tag: cycle group",
|
||||
"body": [
|
||||
"{% cycle '${1:group name}': '${2:odd}', '${3:even}' %}"
|
||||
]
|
||||
},
|
||||
"Tag for": {
|
||||
"prefix": "for",
|
||||
"description": "Iteration tag: for",
|
||||
"body": [
|
||||
"{% for ${1:item} in ${2:collection} %}",
|
||||
"\t$3",
|
||||
"{% endfor %}"
|
||||
]
|
||||
},
|
||||
"Tag Option limit": {
|
||||
"prefix": "limit",
|
||||
"description": "For loops option",
|
||||
"body": [
|
||||
"limit: ${1:5}"
|
||||
]
|
||||
},
|
||||
"Tag Option offset": {
|
||||
"prefix": "offset",
|
||||
"description": "For loops option",
|
||||
"body": [
|
||||
"offset: ${1:0}"
|
||||
]
|
||||
},
|
||||
"Tag Option reversed": {
|
||||
"prefix": "reversed",
|
||||
"description": "For loops option",
|
||||
"body": [
|
||||
"reversed"
|
||||
]
|
||||
},
|
||||
"Tag break": {
|
||||
"prefix": "break",
|
||||
"description": "Iteration tag: break",
|
||||
"body": [
|
||||
"{% break %}"
|
||||
]
|
||||
},
|
||||
"Tag continue": {
|
||||
"prefix": "continue",
|
||||
"description": "Iteration tag: continue",
|
||||
"body": [
|
||||
"{% continue %}"
|
||||
]
|
||||
},
|
||||
"Tag tablerow": {
|
||||
"prefix": "tablerow",
|
||||
"description": "Iteration tag: tablerow",
|
||||
"body": [
|
||||
"{% tablerow ${1:item} in ${2:collection} cols: ${3:2} %}",
|
||||
"\t$4",
|
||||
"{% endtablerow %}"
|
||||
]
|
||||
},
|
||||
"Tag assign": {
|
||||
"prefix": "assign",
|
||||
"description": "Variable tag: assign",
|
||||
"body": [
|
||||
"{% assign ${1:variable} = ${2:value} %}"
|
||||
]
|
||||
},
|
||||
"Tag increment": {
|
||||
"prefix": "increment",
|
||||
"description": "Variable tag: increment",
|
||||
"body": [
|
||||
"{% increment ${1:variable} %}"
|
||||
]
|
||||
},
|
||||
"Tag decrement": {
|
||||
"prefix": "decrement",
|
||||
"description": "Variable tag: decrement",
|
||||
"body": [
|
||||
"{% decrement ${1:variable} %}"
|
||||
]
|
||||
},
|
||||
"Tag capture": {
|
||||
"prefix": "capture",
|
||||
"description": "Variable tag: capture",
|
||||
"body": [
|
||||
"{% capture ${1:variable} %}$2{% endcapture %}"
|
||||
]
|
||||
},
|
||||
"Tag include": {
|
||||
"prefix": "include",
|
||||
"description": "Theme tag: include",
|
||||
"body": [
|
||||
"{% include '${1:snippet}' %}"
|
||||
]
|
||||
},
|
||||
"Tag include with parameters": {
|
||||
"prefix": "includewith",
|
||||
"description": "Theme tag: include with parameters",
|
||||
"body": [
|
||||
"{% include '${1:snippet}', ${2:variable}: ${3:value} %}"
|
||||
]
|
||||
},
|
||||
"Tag render": {
|
||||
"prefix": "render",
|
||||
"description": "Theme tag: render",
|
||||
"body": [
|
||||
"{% render '${1:snippet}' %}"
|
||||
]
|
||||
},
|
||||
"Tag render with parameters": {
|
||||
"prefix": "renderwith",
|
||||
"description": "Theme tag: render with parameters",
|
||||
"body": [
|
||||
"{% render '${1:snippet}', ${2:variable}: ${3:value} %}"
|
||||
]
|
||||
},
|
||||
"Tag section": {
|
||||
"prefix": "section",
|
||||
"description": "Theme tag: section",
|
||||
"body": [
|
||||
"{% section '${1:snippet}' %}"
|
||||
]
|
||||
},
|
||||
"Tag raw": {
|
||||
"prefix": "raw",
|
||||
"description": "Theme tag: raw",
|
||||
"body": [
|
||||
"{% raw %}$1{% endraw %}"
|
||||
]
|
||||
},
|
||||
"Tag layout": {
|
||||
"prefix": "layout",
|
||||
"description": "Theme tag: layout",
|
||||
"body": [
|
||||
"{% layout '${1:layout}' %}"
|
||||
]
|
||||
},
|
||||
"Tag no layout": {
|
||||
"prefix": "layoutnone",
|
||||
"description": "Theme tag: layout none",
|
||||
"body": [
|
||||
"{% layout none %}"
|
||||
]
|
||||
},
|
||||
"Tag paginate": {
|
||||
"prefix": "paginate",
|
||||
"description": "Theme tag: paginate",
|
||||
"body": [
|
||||
"{% paginate ${1:collection.products} by ${2:12} %}",
|
||||
"\t{% for ${3:product} in ${1:collection.products} %}",
|
||||
"\t\t$4",
|
||||
"\t{% endfor %}",
|
||||
"{% endpaginate %}"
|
||||
]
|
||||
},
|
||||
"Tag schema": {
|
||||
"prefix": "schema",
|
||||
"description": "Schema tag: schema",
|
||||
"body": [
|
||||
"{% schema %}",
|
||||
"\t{",
|
||||
"\t\t$1",
|
||||
"\t}",
|
||||
"{% endschema %}"
|
||||
]
|
||||
},
|
||||
"Tag stylesheet": {
|
||||
"prefix": "stylesheet",
|
||||
"description": "Stylesheet tag: stylesheet",
|
||||
"body": [
|
||||
"{% stylesheet %}",
|
||||
"\t$1",
|
||||
"{% endstylesheet %}"
|
||||
]
|
||||
},
|
||||
"Tag stylesheet for scss": {
|
||||
"prefix": "stylesheet_scss",
|
||||
"description": "Stylesheet tag: stylesheet for scss",
|
||||
"body": [
|
||||
"{% stylesheet '${1:scss}' %}",
|
||||
"\t$2",
|
||||
"{% endstylesheet %}"
|
||||
]
|
||||
},
|
||||
"Tag javascript": {
|
||||
"prefix": "javascript",
|
||||
"description": "Javascript tag: javascript",
|
||||
"body": [
|
||||
"{% javascript %}",
|
||||
"\t$4",
|
||||
"{% endjavascript %}"
|
||||
]
|
||||
},
|
||||
"Tag comment, whitespaced": {
|
||||
"prefix": "comment-",
|
||||
"description": "Comment tag: comment, whitespaced",
|
||||
"body": [
|
||||
"{%- comment -%}$1{%- endcomment -%}"
|
||||
]
|
||||
},
|
||||
"Tag if, whitespaced": {
|
||||
"prefix": "if-",
|
||||
"description": "Control flow tag: if, whitespaced",
|
||||
"body": [
|
||||
"{%- if ${1:condition} -%}",
|
||||
"\t$2",
|
||||
"{%- endif -%}"
|
||||
]
|
||||
},
|
||||
"Tag else, whitespaced": {
|
||||
"prefix": "else-",
|
||||
"description": "Control flow tag: else, whitespaced",
|
||||
"body": [
|
||||
"{%- else -%}",
|
||||
"\t"
|
||||
]
|
||||
},
|
||||
"Tag elsif, whitespaced": {
|
||||
"prefix": "elsif-",
|
||||
"description": "Control flow tag: elsif, whitespaced",
|
||||
"body": [
|
||||
"{%- elsif ${1:condition} -%}",
|
||||
"\t"
|
||||
]
|
||||
},
|
||||
"Tag if else, whitespaced": {
|
||||
"prefix": "ifelse-",
|
||||
"description": "Control flow tag: if else, whitespaced",
|
||||
"body": [
|
||||
"{%- if ${1:condition} -%}",
|
||||
"\t$2",
|
||||
"{%- else -%}",
|
||||
"\t$3",
|
||||
"{%- endif -%}"
|
||||
]
|
||||
},
|
||||
"Tag unless, whitespaced": {
|
||||
"prefix": "unless-",
|
||||
"description": "Control flow tag: unless, whitespaced",
|
||||
"body": [
|
||||
"{%- unless ${1:condition} -%}",
|
||||
"\t$2",
|
||||
"{%- endunless -%}"
|
||||
]
|
||||
},
|
||||
"Tag case, whitespaced": {
|
||||
"prefix": "case-",
|
||||
"description": "Control flow tag: case, whitespaced",
|
||||
"body": [
|
||||
"{%- case ${1:variable} -%}",
|
||||
"\t{%- when ${2:condition} -%}",
|
||||
"\t\t$3",
|
||||
"\t{%- else -%}",
|
||||
"\t\t$4",
|
||||
"{%- endcase -%}"
|
||||
]
|
||||
},
|
||||
"Tag when, whitespaced": {
|
||||
"prefix": "when-",
|
||||
"description": "Control flow tag: when, whitespaced",
|
||||
"body": [
|
||||
"{%- when ${1:condition} -%}",
|
||||
"$0"
|
||||
]
|
||||
},
|
||||
"Tag cycle, whitespaced": {
|
||||
"prefix": "cycle-",
|
||||
"description": "Iteration tag: cycle, whitespaced",
|
||||
"body": [
|
||||
"{%- cycle '${1:odd}', '${2:even}' -%}"
|
||||
]
|
||||
},
|
||||
"Tag cycle group, whitespaced": {
|
||||
"prefix": "cyclegroup-",
|
||||
"description": "Iteration tag: cycle group, whitespaced",
|
||||
"body": [
|
||||
"{%- cycle '${1:group name}': '${2:odd}', '${3:even}' -%}"
|
||||
]
|
||||
},
|
||||
"Tag for, whitespaced": {
|
||||
"prefix": "for-",
|
||||
"description": "Iteration tag: for, whitespaced",
|
||||
"body": [
|
||||
"{%- for ${1:item} in ${2:collection} -%}",
|
||||
"\t$3",
|
||||
"{%- endfor -%}"
|
||||
]
|
||||
},
|
||||
"Tag continue, whitespaced": {
|
||||
"prefix": "continue-",
|
||||
"description": "Iteration tag: continue, whitespaced",
|
||||
"body": [
|
||||
"{%- continue -%}"
|
||||
]
|
||||
},
|
||||
"Tag tablerow, whitespaced": {
|
||||
"prefix": "tablerow-",
|
||||
"description": "Iteration tag: tablerow, whitespaced",
|
||||
"body": [
|
||||
"{%- tablerow ${1:item} in ${2:collection} cols: ${3:2} -%}",
|
||||
"\t$4",
|
||||
"{%- endtablerow -%}"
|
||||
]
|
||||
},
|
||||
"Tag assign, whitespaced": {
|
||||
"prefix": "assign-",
|
||||
"description": "Variable tag: assign, whitespaced",
|
||||
"body": [
|
||||
"{%- assign ${1:variable} = ${2:value} -%}"
|
||||
]
|
||||
},
|
||||
"Tag capture, whitespaced": {
|
||||
"prefix": "capture-",
|
||||
"description": "Variable tag: capture, whitespaced",
|
||||
"body": [
|
||||
"{%- capture ${1:variable} -%}$2{%- endcapture -%}"
|
||||
]
|
||||
},
|
||||
"Filter join": {
|
||||
"prefix": "join",
|
||||
"description": "Array filter: join",
|
||||
"body": "| join: '${1:, }'"
|
||||
},
|
||||
"Filter first": {
|
||||
"prefix": "first",
|
||||
"description": "Array filter: first",
|
||||
"body": "| first"
|
||||
},
|
||||
"Filter last": {
|
||||
"prefix": "last",
|
||||
"description": "Array filter: last",
|
||||
"body": "| last"
|
||||
},
|
||||
"Filter concat": {
|
||||
"prefix": "concat",
|
||||
"description": "Array filter: concat",
|
||||
"body": "| concat: ${1:array}"
|
||||
},
|
||||
"Filter map": {
|
||||
"prefix": "map",
|
||||
"description": "Array filter: map",
|
||||
"body": "| map: '${1:key}'"
|
||||
},
|
||||
"Filter reverse": {
|
||||
"prefix": "reverse",
|
||||
"description": "Array filter or String filter: reverse",
|
||||
"body": "| reverse"
|
||||
},
|
||||
"Filter size": {
|
||||
"prefix": "size",
|
||||
"description": "Array filter: size",
|
||||
"body": "| size"
|
||||
},
|
||||
"Filter sort": {
|
||||
"prefix": "sort",
|
||||
"description": "Array filter: sort",
|
||||
"body": "| sort: '${1:key}'"
|
||||
},
|
||||
"Filter uniq": {
|
||||
"prefix": "uniq",
|
||||
"description": "Array filter: uniq",
|
||||
"body": "| uniq"
|
||||
},
|
||||
"Filter img tag": {
|
||||
"prefix": "img_tag",
|
||||
"description": "HTML filter: img tag",
|
||||
"body": "| img_tag"
|
||||
},
|
||||
"Filter img tag with parameters": {
|
||||
"prefix": "img_tag_param",
|
||||
"description": "HTML filter: img tag with parameters",
|
||||
"body": "| img_tag: '${1:alt}', '${2:class}'"
|
||||
},
|
||||
"Filter script tag": {
|
||||
"prefix": "script_tag",
|
||||
"description": "HTML filter: script tag",
|
||||
"body": "| script_tag"
|
||||
},
|
||||
"Filter stylesheet tag": {
|
||||
"prefix": "stylesheet_tag",
|
||||
"description": "HTML filter: stylesheet tag",
|
||||
"body": "| stylesheet_tag"
|
||||
},
|
||||
"Filter abs": {
|
||||
"prefix": "abs",
|
||||
"description": "Math filter: abs",
|
||||
"body": "| abs"
|
||||
},
|
||||
"Filter ceil": {
|
||||
"prefix": "ceil",
|
||||
"description": "Math filter: ceil",
|
||||
"body": "| ceil"
|
||||
},
|
||||
"Filter divided by": {
|
||||
"prefix": "divided_by",
|
||||
"description": "Math filter: divided by",
|
||||
"body": "| divided_by: ${1:2}"
|
||||
},
|
||||
"Filter floor": {
|
||||
"prefix": "floor",
|
||||
"description": "Math filter: floor",
|
||||
"body": "| floor"
|
||||
},
|
||||
"Filter minus": {
|
||||
"prefix": "minus",
|
||||
"description": "Math filter: minus",
|
||||
"body": "| minus: ${1:1}"
|
||||
},
|
||||
"Filter plus": {
|
||||
"prefix": "plus",
|
||||
"description": "Math filter: plus",
|
||||
"body": "| plus: ${1:1}"
|
||||
},
|
||||
"Filter round": {
|
||||
"prefix": "round",
|
||||
"description": "Math filter: round",
|
||||
"body": "| round: ${1:0}"
|
||||
},
|
||||
"Filter times": {
|
||||
"prefix": "times",
|
||||
"description": "Math filter: times",
|
||||
"body": "| times: ${1:1}"
|
||||
},
|
||||
"Filter modulo": {
|
||||
"prefix": "modulo",
|
||||
"description": "Math filter: modulo",
|
||||
"body": "| modulo: ${1:2}"
|
||||
},
|
||||
"Filter money": {
|
||||
"prefix": "money",
|
||||
"description": "Money filter: money",
|
||||
"body": "| money"
|
||||
},
|
||||
"Filter money with currency": {
|
||||
"prefix": "money_with_currency",
|
||||
"description": "Money filter: money with currency",
|
||||
"body": "| money_with_currency"
|
||||
},
|
||||
"Filter money without trailing zeros": {
|
||||
"prefix": "money_without_trailing_zeros",
|
||||
"description": "Money filter: money without trailing zeros",
|
||||
"body": "| money_without_trailing_zeros"
|
||||
},
|
||||
"Filter money without currency": {
|
||||
"prefix": "money_without_currency",
|
||||
"description": "Money filter: money without currency",
|
||||
"body": "| money_without_currency"
|
||||
},
|
||||
"Filter append": {
|
||||
"prefix": "append",
|
||||
"description": "String filter: append",
|
||||
"body": "| append: '${1:string}'"
|
||||
},
|
||||
"Filter camelcase": {
|
||||
"prefix": "camelcase",
|
||||
"description": "String filter: camelcase",
|
||||
"body": "| camelcase"
|
||||
},
|
||||
"Filter capitalize": {
|
||||
"prefix": "capitalize",
|
||||
"description": "String filter: capitalize",
|
||||
"body": "| capitalize"
|
||||
},
|
||||
"Filter downcase": {
|
||||
"prefix": "downcase",
|
||||
"description": "String filter: downcase",
|
||||
"body": "| downcase"
|
||||
},
|
||||
"Filter escape": {
|
||||
"prefix": "escape",
|
||||
"description": "String filter: escape",
|
||||
"body": "| escape"
|
||||
},
|
||||
"Filter handleize": {
|
||||
"prefix": "handleize",
|
||||
"description": "String filter: handleize",
|
||||
"body": "| handleize"
|
||||
},
|
||||
"Filter md5": {
|
||||
"prefix": "md5",
|
||||
"description": "String filter: md5",
|
||||
"body": "| md5"
|
||||
},
|
||||
"Filter newline to br": {
|
||||
"prefix": "newline_to_br",
|
||||
"description": "String filter: newline to br",
|
||||
"body": "| newline_to_br"
|
||||
},
|
||||
"Filter pluralize": {
|
||||
"prefix": "pluralize",
|
||||
"description": "String filter: pluralize",
|
||||
"body": "| pluralize: '${1:item}', '${2:items}'"
|
||||
},
|
||||
"Filter prepend": {
|
||||
"prefix": "prepend",
|
||||
"description": "String filter: prepend",
|
||||
"body": "| prepend: '${1:string}'"
|
||||
},
|
||||
"Filter remove": {
|
||||
"prefix": "remove",
|
||||
"description": "String filter: remove",
|
||||
"body": "| remove: '${1:string}'"
|
||||
},
|
||||
"Filter remove first": {
|
||||
"prefix": "remove_first",
|
||||
"description": "String filter: remove first",
|
||||
"body": "| remove_first: '${1:string}'"
|
||||
},
|
||||
"Filter replace": {
|
||||
"prefix": "replace",
|
||||
"description": "String filter: replace",
|
||||
"body": "| replace: '${1:target}', '${2:replace}'"
|
||||
},
|
||||
"Filter replace first": {
|
||||
"prefix": "replace_first",
|
||||
"description": "String filter: replace first",
|
||||
"body": "| replace_first: '${1:target}', '${2:replace}'"
|
||||
},
|
||||
"Filter slice": {
|
||||
"prefix": "slice",
|
||||
"description": "String filter: slice",
|
||||
"body": "| slice: ${1:0}, ${2:5}"
|
||||
},
|
||||
"Filter slice single character": {
|
||||
"prefix": "slice_single",
|
||||
"description": "String filter: slice with single parameter",
|
||||
"body": "| slice: ${1:at}"
|
||||
},
|
||||
"Filter split": {
|
||||
"prefix": "split",
|
||||
"description": "String filter: split",
|
||||
"body": "| split: '${1:,}'"
|
||||
},
|
||||
"Filter strip": {
|
||||
"prefix": "strip",
|
||||
"description": "String filter: strip",
|
||||
"body": "| strip"
|
||||
},
|
||||
"Filter lstrip": {
|
||||
"prefix": "lstrip",
|
||||
"description": "String filter: lstrip",
|
||||
"body": "| lstrip"
|
||||
},
|
||||
"Filter rstrip": {
|
||||
"prefix": "rstrip",
|
||||
"description": "String filter: rstrip",
|
||||
"body": "| rstrip"
|
||||
},
|
||||
"Filter strip html": {
|
||||
"prefix": "strip_html",
|
||||
"description": "String filter: strip html",
|
||||
"body": "| strip_html"
|
||||
},
|
||||
"Filter strip newlines": {
|
||||
"prefix": "strip_newlines",
|
||||
"description": "String filter: strip newlines",
|
||||
"body": "| strip_newlines"
|
||||
},
|
||||
"Filter truncate": {
|
||||
"prefix": "truncate",
|
||||
"description": "String filter: truncate",
|
||||
"body": "| truncate: ${1:20}, '${2:...}'"
|
||||
},
|
||||
"Filter truncatewords": {
|
||||
"prefix": "truncatewords",
|
||||
"description": "String filter: truncatewords",
|
||||
"body": "| truncatewords: ${1:5}, '${2:...}'"
|
||||
},
|
||||
"Filter upcase": {
|
||||
"prefix": "upcase",
|
||||
"description": "String filter: upcase",
|
||||
"body": "| upcase"
|
||||
},
|
||||
"Filter url encode": {
|
||||
"prefix": "url_encode",
|
||||
"description": "String filter: url encode",
|
||||
"body": "| url_encode"
|
||||
},
|
||||
"Filter url escape": {
|
||||
"prefix": "url_escape",
|
||||
"description": "String filter: url escape",
|
||||
"body": "| url_escape"
|
||||
},
|
||||
"Filter url param escape": {
|
||||
"prefix": "url_param_escape",
|
||||
"description": "String filter: url param escape",
|
||||
"body": "| url_param_escape"
|
||||
},
|
||||
"Filter asset url": {
|
||||
"prefix": "asset_url",
|
||||
"description": "URL filter: asset url",
|
||||
"body": "| asset_url"
|
||||
},
|
||||
"Filter asset img url": {
|
||||
"prefix": "asset_img_url",
|
||||
"description": "URL filter: asset img url",
|
||||
"body": "| asset_img_url: '${1:medium}'"
|
||||
},
|
||||
"Filter img url": {
|
||||
"prefix": "img_url",
|
||||
"description": "URL filter: img url",
|
||||
"body": "| img_url: '${1:medium}'"
|
||||
},
|
||||
"Shopify Schema": {
|
||||
"prefix": "_schema",
|
||||
"body": [
|
||||
"{% schema %}",
|
||||
"\t{",
|
||||
"\t\t\"name\": \"$1\",",
|
||||
"\t\t\"class\": \"$2\",",
|
||||
"\t\t\"settings\": [",
|
||||
"\t\t$3",
|
||||
"\t\t]",
|
||||
"\t}",
|
||||
"{% endschema %}",
|
||||
""
|
||||
]
|
||||
},
|
||||
"Shopify Schema blocks": {
|
||||
"prefix": "_blocks",
|
||||
"body": [
|
||||
"\"blocks\": [",
|
||||
"\t{",
|
||||
"\t\t\"type\": \"$1\",",
|
||||
"\t\t\"name\": \"$2\",",
|
||||
"\t\t\"settings\": [",
|
||||
"\t\t\t$3",
|
||||
"\t\t]",
|
||||
"\t},$4",
|
||||
"]",
|
||||
""
|
||||
]
|
||||
},
|
||||
"Shopify Schema text": {
|
||||
"prefix": "_text",
|
||||
"body": [
|
||||
"{",
|
||||
"\t\"type\": \"text\",",
|
||||
"\t\"id\": \"$1\",",
|
||||
"\t\"label\": \"$2\",",
|
||||
"\t\"default\": \"$3\",",
|
||||
"\t\"info\": \"$4\",",
|
||||
"\t\"placeholder\": \"$5\"",
|
||||
"},$6"
|
||||
]
|
||||
},
|
||||
"Shopify Schema textarea": {
|
||||
"prefix": "_textarea",
|
||||
"body": [
|
||||
"{",
|
||||
"\t\"type\": \"textarea\",",
|
||||
"\t\"id\": \"$1\",",
|
||||
"\t\"label\": \"$2\",",
|
||||
"\t\"default\": \"$3\",",
|
||||
"\t\"info\": \"$4\",",
|
||||
"\t\"placeholder\": \"$5\"",
|
||||
"},$6"
|
||||
]
|
||||
},
|
||||
"Shopify Schema image picker": {
|
||||
"prefix": "_image_picker",
|
||||
"body": [
|
||||
"{",
|
||||
"\t\"type\": \"image_picker\",",
|
||||
"\t\"id\": \"$1\",",
|
||||
"\t\"label\": \"$2\"",
|
||||
"},$3"
|
||||
]
|
||||
},
|
||||
"Shopify Schema radio": {
|
||||
"prefix": "_radio",
|
||||
"body": [
|
||||
"{",
|
||||
"\t\"type\": \"radio\",",
|
||||
"\t\"id\": \"$1\",",
|
||||
"\t\"label\": \"$2\",",
|
||||
"\t\"options\": [",
|
||||
"\t\t{ \"value\": \"$6\", \"label\": \"$7\" }",
|
||||
"\t],",
|
||||
"\t\"default\": \"$3\",",
|
||||
"\t\"info\": \"$4\"",
|
||||
"},$5"
|
||||
]
|
||||
},
|
||||
"Shopify Schema select": {
|
||||
"prefix": "_select",
|
||||
"body": [
|
||||
"{",
|
||||
"\t\"type\": \"select\",",
|
||||
"\t\"id\": \"$1\",",
|
||||
"\t\"label\": \"$2\",",
|
||||
"\t\"options\": [",
|
||||
"\t\t{",
|
||||
"\t\t\"group\": \"$6\",",
|
||||
"\t\t\"value\": \"$7\",",
|
||||
"\t\t\"label\": \"$8\"",
|
||||
"\t\t}",
|
||||
"\t],",
|
||||
"\t\"default\": \"$3\",",
|
||||
"\t\"info\": \"$4\"",
|
||||
"},$5"
|
||||
]
|
||||
},
|
||||
"Shopify Schema checkbox": {
|
||||
"prefix": "_checkbox",
|
||||
"body": [
|
||||
"{",
|
||||
"\t\"type\": \"checkbox\",",
|
||||
"\t\"id\": \"$1\",",
|
||||
"\t\"label\": \"$2\",",
|
||||
"\t\"default\": ${3|false,true|},",
|
||||
"\t\"info\": \"$4\"",
|
||||
"},$5"
|
||||
]
|
||||
},
|
||||
"Shopify Schema range": {
|
||||
"prefix": "_range",
|
||||
"body": [
|
||||
"{",
|
||||
"\t\"type\": \"range\",",
|
||||
"\t\"id\": \"$1\",",
|
||||
"\t\"min\": \"$2\",",
|
||||
"\t\"max\": \"$3\",",
|
||||
"\t\"step\": \"$4\",",
|
||||
"\t\"unit\": \"$5\",",
|
||||
"\t\"label\": \"$6\",",
|
||||
"\t\"default\": \"$7\"",
|
||||
"},$8"
|
||||
]
|
||||
},
|
||||
"Shopify Schema color": {
|
||||
"prefix": "_color",
|
||||
"body": [
|
||||
"{",
|
||||
"\t\"type\": \"color\",",
|
||||
"\t\"id\": \"$1\",",
|
||||
"\t\"label\": \"$2\",",
|
||||
"\t\"default\": \"$3\",",
|
||||
"\t\"info\": \"$4\"",
|
||||
"},$5"
|
||||
]
|
||||
},
|
||||
"Shopify Schema font picker": {
|
||||
"prefix": "_font",
|
||||
"body": [
|
||||
"{",
|
||||
"\t\"type\": \"font_picker\",",
|
||||
"\t\"id\": \"$1\",",
|
||||
"\t\"label\": \"$2\",",
|
||||
"\t\"info\": \"$3\",",
|
||||
"\t\"default\": \"${4|Abel,Abril Fatface,Agmena,Akko,Alegreya,Alegreya Sans,Alfie,Americana,Amiri,Anonymous Pro,Antique Olive,Arapey,Archivo Narrow,Arimo,Armata,Arvo,Asap,Assistant,Asul,Avenir Next,Avenir Next Rounded,Azbuka,Basic Commercial,Basic Commercial Soft Rounded,Baskerville No 2,Bauer Bodoni,Beefcakes,Bembo Book,Bernhard Modern,Bio Rhyme,Bitter,Bodoni Poster,Burlingame,Cabin,Cachet,Cardamon,Cardo,Carter Sans,Caslon Bold,Caslon Old Face,Catamaran,Centaur,Century Gothic,Chivo,Chong Modern,Claire News,Cooper BT,Courier New,Crimson Text,DIN Neuzeit Grotesk,DIN Next,DIN Next Slab,Daytona,Domine,Dosis,Electra,Eurostile Next,FF Meta,FF Meta Serif,FF Tisa,FF Tisa Sans,FF Unit,FF Unit Rounded,FF Unit Slab,Fette Gotisch,Fira Sans,Fjalla One,Friz Quadrata,Frutiger Serif,Futura,Garamond,Geometric 415,Georgia Pro,Gill Sans Nova,Glegoo,Goudy Old Style,Harmonia Sans,Helvetica,Humanist 521,IBM Plex Sans,ITC Avant Garde Gothic,ITC Benguiat,ITC Berkeley Old Style,ITC Bodoni Seventytwo,ITC Bodoni Twelve,ITC Caslon No 224,ITC Charter,ITC Cheltenham,ITC Clearface,ITC Conduit,ITC Esprit,ITC Founders Caslon,ITC Franklin Gothic,ITC Galliard,ITC Gamma,ITC Goudy Sans,ITC Johnston,ITC Mendoza Roman,ITC Modern No 216,ITC New Baskerville,ITC New Esprit,ITC New Veljovic,ITC Novarese,ITC Officina Sans,ITC Officina Serif,ITC Stepp,ITC Stone Humanist,ITC Stone Informal,ITC Stone Sans II,ITC Stone Serif,ITC Tapioca,Inconsolata,Joanna Nova,Joanna Sans Nova,Josefin Sans,Josefin Slab,Kairos,Kalam,Karla,Kreon,Lato,Laurentian,Libelle,Libre Baskerville,Libre Franklin,Linotype Didot,Linotype Gianotten,Linotype Really,Linotype Syntax Serif,Lobster,Lobster Two,Lora,Lucia,Lucida Grande,Luthersche Fraktur,Madera,Malabar,Mariposa Sans,Maven Pro,Megrim,Melior,Memphis,Memphis Soft Rounded,Mentor Sans,Merriweather Sans,Metro Nova,Modern No 20,Monaco,Monotype Baskerville,Monotype Bodoni,Monotype Century Old Style,Monotype Goudy,Monotype Goudy Modern,Monotype Italian Old Style,Monotype New Clarendon,Monotype News Gothic,Monotype Sabon,Montserrat,Mouse Memoirs,Muli,Mundo Sans,Neo Sans,Neue Aachen,Neue Frutiger 1450,Neue Haas Unica,Neue Swift,Neuton,Neuzeit Office,Neuzeit Office Soft Rounded,Neuzeit S,New Century Schoolbook,News 702,News 705,News Cycle,News Gothic No 2,News Plantin,Nobile,Noticia Text,Noto Serif,Nunito,Nunito Sans,Old Standard TT,Open Sans,Open Sans Condensed,Optima nova,Oswald,Ovo,Oxygen,PMN Caecilia,PT Mono,PT Sans,PT Sans Narrow,PT Serif,Pacifico,Palatino,Parma,Perpetua,Plantin,Playfair Display,Poppins,Prata,Prompt,Quantico,Quattrocento,Quattrocento Sans,Questrial,Quicksand,Quire Sans,Rajdhani,Raleway,Really No 2,Righteous,Roboto,Roboto Condensed,Roboto Mono,Roboto Slab,Rockwell,Rubik,Sabon Next,Sackers Square Gothic,Sagrantino,Scene,Scherzo,Shadows Into Light,Slate,Soho,Soho Gothic,Source Code Pro,Source Sans Pro,Stempel Schneidler,Swiss 721,Swiss 721 Rounded,Tenor Sans,Tiemann,Times New Roman,Tinos,Titillium Web,Trade Gothic,Trade Gothic Next,Trebuchet MS,Twentieth Century,Ubuntu,Unica One,Univers Next,Univers Next Typewriter,Unna,Vala,Varela,Varela Round,Verdana Pro,Volkhov,Vollkorn,Waza,Wola,Work Sans,Ysobel|}\"",
|
||||
"},$5"
|
||||
]
|
||||
},
|
||||
"Shopify Schema collections dropdown": {
|
||||
"prefix": "_collections",
|
||||
"body": [
|
||||
"{",
|
||||
"\t\"type\": \"collection\",",
|
||||
"\t\"id\": \"$1\",",
|
||||
"\t\"label\": \"$2\",",
|
||||
"\t\"info\": \"$3\"",
|
||||
"},$4"
|
||||
]
|
||||
},
|
||||
"Shopify Schema product dropdown": {
|
||||
"prefix": "_product",
|
||||
"body": [
|
||||
"{",
|
||||
"\t\"type\": \"product\",",
|
||||
"\t\"id\": \"$1\",",
|
||||
"\t\"label\": \"$2\",",
|
||||
"\t\"info\": \"$3\"",
|
||||
"},$4"
|
||||
]
|
||||
},
|
||||
"Shopify Schema blog dropdown": {
|
||||
"prefix": "_blog",
|
||||
"body": [
|
||||
"{",
|
||||
"\t\"type\": \"blog\",",
|
||||
"\t\"id\": \"$1\",",
|
||||
"\t\"label\": \"$2\",",
|
||||
"\t\"info\": \"$3\"",
|
||||
"},$4"
|
||||
]
|
||||
},
|
||||
"Shopify Schema page dropdown": {
|
||||
"prefix": "_page",
|
||||
"body": [
|
||||
"{",
|
||||
"\t\"type\": \"page\",",
|
||||
"\t\"id\": \"$1\",",
|
||||
"\t\"label\": \"$2\",",
|
||||
"\t\"info\": \"$3\"",
|
||||
"},$4"
|
||||
]
|
||||
},
|
||||
"Shopify Schema link list dropdown": {
|
||||
"prefix": "_link_list",
|
||||
"body": [
|
||||
"{",
|
||||
"\t\"type\": \"link_list\",",
|
||||
"\t\"id\": \"$1\",",
|
||||
"\t\"label\": \"$2\",",
|
||||
"\t\"info\": \"$3\"",
|
||||
"},$4"
|
||||
]
|
||||
},
|
||||
"Shopify Schema url dropdown": {
|
||||
"prefix": "_url",
|
||||
"body": [
|
||||
"{",
|
||||
"\t\"type\": \"url\",",
|
||||
"\t\"id\": \"$1\",",
|
||||
"\t\"label\": \"$2\",",
|
||||
"\t\"info\": \"$3\"",
|
||||
"},$4"
|
||||
]
|
||||
},
|
||||
"Shopify Schema video": {
|
||||
"prefix": "_video",
|
||||
"body": [
|
||||
"{",
|
||||
"\t\"type\": \"video_url\",",
|
||||
"\t\"id\": \"$1\",",
|
||||
"\t\"label\": \"$2\",",
|
||||
"\t\"accept\": [$7\"youtube\", \"vimeo\"],",
|
||||
"\t\"default\": \"$3\",",
|
||||
"\t\"info\": \"$4\",",
|
||||
"\t\"placeholder\": \"$5\"",
|
||||
"},$6"
|
||||
]
|
||||
},
|
||||
"Shopify Schema richtext": {
|
||||
"prefix": "_richtext",
|
||||
"body": [
|
||||
"{",
|
||||
"\t\"type\": \"richtext\",",
|
||||
"\t\"id\": \"$1\",",
|
||||
"\t\"label\": \"$2\",",
|
||||
"\t\"default\": \"<p>$3<\/p>\"",
|
||||
"},$4"
|
||||
]
|
||||
},
|
||||
"Shopify Schema html": {
|
||||
"prefix": "_html",
|
||||
"body": [
|
||||
"{",
|
||||
"\t\"type\": \"html\",",
|
||||
"\t\"id\": \"$1\",",
|
||||
"\t\"label\": \"$2\",",
|
||||
"\t\"default\": \"<div>$3<\/div>\"",
|
||||
"},$4"
|
||||
]
|
||||
},
|
||||
"Shopify Schema article": {
|
||||
"prefix": "_article",
|
||||
"body": [
|
||||
"{",
|
||||
"\t\"type\": \"article\",",
|
||||
"\t\"id\": \"$1\",",
|
||||
"\t\"label\": \"$2\",",
|
||||
"\t\"info\": \"$3\"",
|
||||
"},$4"
|
||||
]
|
||||
},
|
||||
"Shopify Schema header": {
|
||||
"prefix": "_header",
|
||||
"body": [
|
||||
"{",
|
||||
"\t\"type\": \"header\",",
|
||||
"\t\"content\": \"$1\",",
|
||||
"\t\"info\": \"$2\"",
|
||||
"},$3"
|
||||
]
|
||||
},
|
||||
"Shopify Schema paragraph": {
|
||||
"prefix": "_paragraph",
|
||||
"body": [
|
||||
"{",
|
||||
"\t\"type\": \"paragraph\",",
|
||||
"\t\"content\": \"$1\"",
|
||||
"},$2"
|
||||
]
|
||||
}
|
||||
}
|
||||
145
dot_vim/plugged/friendly-snippets/snippets/lua.json
Normal file
145
dot_vim/plugged/friendly-snippets/snippets/lua.json
Normal file
@@ -0,0 +1,145 @@
|
||||
{
|
||||
"require": {
|
||||
"prefix": "req",
|
||||
"body": [
|
||||
"require(\"${1:module}\")"
|
||||
],
|
||||
"description": "Require module"
|
||||
},
|
||||
"return": {
|
||||
"prefix": "rt",
|
||||
"body": [
|
||||
"return $0"
|
||||
],
|
||||
"description": "return value"
|
||||
},
|
||||
"assigment": {
|
||||
"prefix": "ll",
|
||||
"body": [
|
||||
"local ${1:varName} = ${0:value}"
|
||||
],
|
||||
"description": "create a variable"
|
||||
},
|
||||
"local": {
|
||||
"prefix": "l",
|
||||
"body": [
|
||||
"local ${0}"
|
||||
],
|
||||
"description": "create a variable"
|
||||
},
|
||||
"locreq": {
|
||||
"prefix": "lreq",
|
||||
"body": [
|
||||
"local ${1:var} = require(\"${2:module}\")"
|
||||
],
|
||||
"description": "Require module as a variable"
|
||||
},
|
||||
"class": {
|
||||
"prefix": "cl",
|
||||
"body": [
|
||||
"${1:className} = {}\n",
|
||||
"$1.${2:new} = function($3)",
|
||||
"\tlocal ${4:varName} = ${5:value}\n",
|
||||
"\t${6: --code}\n",
|
||||
"\treturn $4",
|
||||
"end"
|
||||
],
|
||||
"description": "Create a class"
|
||||
},
|
||||
"if": {
|
||||
"prefix": "if",
|
||||
"body": [
|
||||
"if ${1:true} then",
|
||||
"\t$0",
|
||||
"end"
|
||||
]
|
||||
},
|
||||
"elseif": {
|
||||
"prefix": "elseif",
|
||||
"body": [
|
||||
"elseif ${1:true} then",
|
||||
"\t$0"
|
||||
]
|
||||
},
|
||||
"for": {
|
||||
"prefix": "for",
|
||||
"body": [
|
||||
"for ${1:i}=${2:1},${3:10} do",
|
||||
"\t$0",
|
||||
"end"
|
||||
],
|
||||
"description": "for loop range"
|
||||
},
|
||||
"foreach": {
|
||||
"prefix": "foreach",
|
||||
"body": [
|
||||
"for i, ${1:x} in pairs(${2:table}) do",
|
||||
"\t$0",
|
||||
"end"
|
||||
]
|
||||
},
|
||||
"forline": {
|
||||
"prefix": "forline",
|
||||
"body": [
|
||||
"f = io.open(${1:\"${2:filename}\"}, \"${3:r}\")\n",
|
||||
"while true do",
|
||||
"\tline = f:read()",
|
||||
"\tif line == nil then break end\n",
|
||||
"\t${0:-- code}",
|
||||
"end"
|
||||
],
|
||||
"description": "read file line by line"
|
||||
},
|
||||
"function": {
|
||||
"prefix": "fu",
|
||||
"body": [
|
||||
"function ${1:name}($2)",
|
||||
"\t${0:-- code}",
|
||||
"end"
|
||||
]
|
||||
},
|
||||
"inline-function": {
|
||||
"prefix": "f=",
|
||||
"body": [
|
||||
"local ${1:name} = function($2)",
|
||||
"\t${0:-- code}",
|
||||
"end"
|
||||
]
|
||||
},
|
||||
"print": {
|
||||
"prefix": "p",
|
||||
"body": [
|
||||
"print(${0})"
|
||||
]
|
||||
},
|
||||
"self": {
|
||||
"prefix": "self:",
|
||||
"body": [
|
||||
"function self:${1:methodName}($2)",
|
||||
"\t$0",
|
||||
"end"
|
||||
]
|
||||
},
|
||||
"while": {
|
||||
"prefix": "while",
|
||||
"body": [
|
||||
"while ${1:true} do",
|
||||
"\t$0",
|
||||
"end"
|
||||
]
|
||||
},
|
||||
"pcall": {
|
||||
"prefix": "pca",
|
||||
"body": [
|
||||
"pcall(${1:function})"
|
||||
],
|
||||
"description": "Protect call a function"
|
||||
},
|
||||
"locpcall": {
|
||||
"prefix": "lpca",
|
||||
"body": [
|
||||
"local ${1:status}, ${2:err_or_value} = pcall(${3:function})"
|
||||
],
|
||||
"description": "Protect call a function as a variable"
|
||||
}
|
||||
}
|
||||
45
dot_vim/plugged/friendly-snippets/snippets/make.json
Normal file
45
dot_vim/plugged/friendly-snippets/snippets/make.json
Normal file
@@ -0,0 +1,45 @@
|
||||
{
|
||||
"help": {
|
||||
"prefix": "help",
|
||||
"body": [
|
||||
"help: ## Prints help for targets with comments",
|
||||
"\t@cat $(MAKEFILE_LIST) | grep -E '^[a-zA-Z_-]+:.*?## .*$$' | awk 'BEGIN {FS = \":.*?## \"}; {printf \"\\033[36m%-30s\\033[0m %s\\n\", $\\$1, $\\$2}'"
|
||||
],
|
||||
"description": "help target for self-documented Makefile"
|
||||
},
|
||||
"if statement": {
|
||||
"prefix": "if",
|
||||
"body": [
|
||||
"ifeq (${1:cond0}, ${2:cond1})",
|
||||
"\t$0",
|
||||
"endif"
|
||||
],
|
||||
"description": "if statement"
|
||||
},
|
||||
"print": {
|
||||
"prefix": "print",
|
||||
"body": [
|
||||
"print-%: ; @echo $*=$($*)"
|
||||
],
|
||||
"description": "print"
|
||||
},
|
||||
"if else statement": {
|
||||
"prefix": "ife",
|
||||
"body": [
|
||||
"ifeq (${1:cond0}, ${2:cond1})",
|
||||
"\t$3",
|
||||
"else",
|
||||
"\t$4",
|
||||
"endif"
|
||||
],
|
||||
"description": "if else statement"
|
||||
},
|
||||
"else": {
|
||||
"prefix": "el",
|
||||
"body": [
|
||||
"else",
|
||||
"\t$0"
|
||||
],
|
||||
"description": "else"
|
||||
}
|
||||
}
|
||||
380
dot_vim/plugged/friendly-snippets/snippets/markdown.json
Normal file
380
dot_vim/plugged/friendly-snippets/snippets/markdown.json
Normal file
@@ -0,0 +1,380 @@
|
||||
{
|
||||
"header 1": {
|
||||
"prefix": "h1",
|
||||
"body": ["# ${0}"],
|
||||
"description": "Add header level 1"
|
||||
},
|
||||
"header 2": {
|
||||
"prefix": "h2",
|
||||
"body": ["## ${0}"],
|
||||
"description": "Add header level 2"
|
||||
},
|
||||
"header 3": {
|
||||
"prefix": "h3",
|
||||
"body": ["### ${0}"],
|
||||
"description": "Add header level 3"
|
||||
},
|
||||
"header 4": {
|
||||
"prefix": "h4",
|
||||
"body": ["#### ${0}"],
|
||||
"description": "Add header level 4"
|
||||
},
|
||||
"header 5": {
|
||||
"prefix": "h5",
|
||||
"body": ["##### ${0}"],
|
||||
"description": "Add header level 5"
|
||||
},
|
||||
"header 6": {
|
||||
"prefix": "h6",
|
||||
"body": ["###### ${0}"],
|
||||
"description": "Add header level 6"
|
||||
},
|
||||
"Links": {
|
||||
"prefix": ["l", "link"],
|
||||
"body": ["[${1}](${2}) ${0}"],
|
||||
"description": "Add links"
|
||||
},
|
||||
"URLS": {
|
||||
"prefix": ["u", "url"],
|
||||
"body": ["<${1}> ${0}"],
|
||||
"description": "Add urls"
|
||||
},
|
||||
"Images": {
|
||||
"prefix": "img",
|
||||
"body": [" ${0}"],
|
||||
"description": "Add images"
|
||||
},
|
||||
"Insert strikethrough": {
|
||||
"prefix": "strikethrough",
|
||||
"body": "~~${1}~~ ${0}",
|
||||
"description": "Insert strikethrough"
|
||||
},
|
||||
"Insert bold text": {
|
||||
"prefix": ["bold", "b"],
|
||||
"body": "**${1}** $0",
|
||||
"description": "Insert bold text"
|
||||
},
|
||||
"Insert italic text": {
|
||||
"prefix": ["i", "italic"],
|
||||
"body": "*${1}* $0",
|
||||
"description": "Insert italic text"
|
||||
},
|
||||
"Insert bold and italic text": {
|
||||
"prefix": ["bold and italic", "bi"],
|
||||
"body": "***${1}*** $0",
|
||||
"description": "Insert bold and italic text"
|
||||
},
|
||||
"Insert quoted text": {
|
||||
"prefix": "quote",
|
||||
"body": "> ${1}",
|
||||
"description": "Insert quoted text"
|
||||
},
|
||||
"Insert code": {
|
||||
"prefix": "code",
|
||||
"body": "`${1}` $0",
|
||||
"description": "Insert code"
|
||||
},
|
||||
"Insert code block": {
|
||||
"prefix": "codeblock",
|
||||
"body": ["```${1:language}", "$0", "```"],
|
||||
"description": "Insert fenced code block"
|
||||
},
|
||||
"Insert unordered list": {
|
||||
"prefix": "unordered list",
|
||||
"body": ["- ${1:first}", "- ${2:second}", "- ${3:third}", "$0"],
|
||||
"description": "Insert unordered list"
|
||||
},
|
||||
"Insert ordered list": {
|
||||
"prefix": "ordered list",
|
||||
"body": ["1. ${1:first}", "2. ${2:second}", "3. ${3:third}", "$0"],
|
||||
"description": "Insert ordered list"
|
||||
},
|
||||
"Insert horizontal rule": {
|
||||
"prefix": "horizontal rule",
|
||||
"body": "----------\n",
|
||||
"description": "Insert horizontal rule"
|
||||
},
|
||||
"Insert task list": {
|
||||
"prefix": "task",
|
||||
"body": ["- [${1| ,x|}] ${2:text}", "${0}"],
|
||||
"description": "Insert task list"
|
||||
},
|
||||
"Insert task list 2": {
|
||||
"prefix": "task2",
|
||||
"body": ["- [${1| ,x|}] ${2:text}", "- [${3| ,x|}] ${4:text}", "${0}"],
|
||||
"description": "Insert task list with 2 tasks"
|
||||
},
|
||||
"Insert task list 3": {
|
||||
"prefix": "task3",
|
||||
"body": [
|
||||
"- [${1| ,x|}] ${2:text}",
|
||||
"- [${3| ,x|}] ${4:text}",
|
||||
"- [${5| ,x|}] ${6:text}",
|
||||
"${0}"
|
||||
],
|
||||
"description": "Insert task list with 3 tasks"
|
||||
},
|
||||
"Insert task list 4": {
|
||||
"prefix": "task4",
|
||||
"body": [
|
||||
"- [${1| ,x|}] ${2:text}",
|
||||
"- [${3| ,x|}] ${4:text}",
|
||||
"- [${5| ,x|}] ${6:text}",
|
||||
"- [${7| ,x|}] ${8:text}",
|
||||
"${0}"
|
||||
],
|
||||
"description": "Insert task list with 4 tasks"
|
||||
},
|
||||
"Insert task list 5": {
|
||||
"prefix": "task5",
|
||||
"body": [
|
||||
"- [${1| ,x|}] ${2:text}",
|
||||
"- [${3| ,x|}] ${4:text}",
|
||||
"- [${5| ,x|}] ${6:text}",
|
||||
"- [${7| ,x|}] ${8:text}",
|
||||
"- [${9| ,x|}] ${10:text}",
|
||||
"${0}"
|
||||
],
|
||||
"description": "Insert task list with 5 tasks"
|
||||
},
|
||||
"Insert table": {
|
||||
"prefix": "table",
|
||||
"body": [
|
||||
"| ${1:Column1} | ${2:Column2} | ${3:Column3} |",
|
||||
"|-------------- | -------------- | -------------- |",
|
||||
"| ${4:Item1} | ${5:Item1} | ${6:Item1} |",
|
||||
"${0}"
|
||||
],
|
||||
"description": "Insert table with 2 rows and 3 columns. First row is heading."
|
||||
},
|
||||
"Insert 2x1 table": {
|
||||
"prefix": "2x1table",
|
||||
"body": [
|
||||
"| ${1:Column1} |",
|
||||
"|-------------- |",
|
||||
"| ${2:Item1} |",
|
||||
"${0}"
|
||||
],
|
||||
"description": "Insert table with 2 rows and 1 column. First row is heading."
|
||||
},
|
||||
"Insert 3x1 table": {
|
||||
"prefix": "3x1table",
|
||||
"body": [
|
||||
"| ${1:Column1} |",
|
||||
"|-------------- |",
|
||||
"| ${2:Item1} |",
|
||||
"| ${3:Item2} |",
|
||||
"${0}"
|
||||
],
|
||||
"description": "Insert table with 3 rows and 1 column. First row is heading."
|
||||
},
|
||||
"Insert 4x1 table": {
|
||||
"prefix": "4x1table",
|
||||
"body": [
|
||||
"| ${1:Column1} |",
|
||||
"|-------------- |",
|
||||
"| ${2:Item1} |",
|
||||
"| ${3:Item2} |",
|
||||
"| ${4:Item3} |",
|
||||
"${0}"
|
||||
],
|
||||
"description": "Insert table with 4 rows and 1 column. First row is heading."
|
||||
},
|
||||
"Insert 5x1 table": {
|
||||
"prefix": "5x1table",
|
||||
"body": [
|
||||
"| ${1:Column1} |",
|
||||
"|-------------- |",
|
||||
"| ${2:Item1} |",
|
||||
"| ${3:Item2} |",
|
||||
"| ${4:Item3} |",
|
||||
"| ${5:Item4} |",
|
||||
"${0}"
|
||||
],
|
||||
"description": "Insert table with 5 rows and 1 column. First row is heading."
|
||||
},
|
||||
"Insert 2x2 table": {
|
||||
"prefix": "2x2table",
|
||||
"body": [
|
||||
"| ${1:Column1} | ${2:Column2} |",
|
||||
"|--------------- | --------------- |",
|
||||
"| ${3:Item1.1} | ${4:Item2.1} |",
|
||||
"${0}"
|
||||
],
|
||||
"description": "Insert table with 2 rows and 2 columns. First row is heading."
|
||||
},
|
||||
"Insert 3x2 table": {
|
||||
"prefix": "3x2table",
|
||||
"body": [
|
||||
"| ${1:Column1} | ${2:Column2} |",
|
||||
"|--------------- | --------------- |",
|
||||
"| ${3:Item1.1} | ${4:Item2.1} |",
|
||||
"| ${5:Item1.2} | ${6:Item2.2} |",
|
||||
"${0}"
|
||||
],
|
||||
"description": "Insert table with 3 rows and 2 columns. First row is heading."
|
||||
},
|
||||
"Insert 4x2 table": {
|
||||
"prefix": "4x2table",
|
||||
"body": [
|
||||
"| ${1:Column1} | ${2:Column2} |",
|
||||
"|--------------- | --------------- |",
|
||||
"| ${3:Item1.1} | ${4:Item2.1} |",
|
||||
"| ${5:Item1.2} | ${6:Item2.2} |",
|
||||
"| ${7:Item1.3} | ${8:Item2.3} |",
|
||||
"${0}"
|
||||
],
|
||||
"description": "Insert table with 4 rows and 2 columns. First row is heading."
|
||||
},
|
||||
"Insert 5x2 table": {
|
||||
"prefix": "5x2table",
|
||||
"body": [
|
||||
"| ${1:Column1} | ${2:Column2} |",
|
||||
"|--------------- | --------------- |",
|
||||
"| ${3:Item1.1} | ${4:Item2.1} |",
|
||||
"| ${4:Item1.2} | ${5:Item2.2} |",
|
||||
"| ${6:Item1.3} | ${7:Item2.3} |",
|
||||
"| ${8:Item1.4} | ${9:Item2.4} |",
|
||||
"${0}"
|
||||
],
|
||||
"description": "Insert table with 5 rows and 2 columns. First row is heading."
|
||||
},
|
||||
"Insert 2x3 table": {
|
||||
"prefix": "2x3table",
|
||||
"body": [
|
||||
"| ${1:Column1} | ${2:Column2} | ${3:Column3} |",
|
||||
"|---------------- | --------------- | --------------- |",
|
||||
"| ${4:Item1.1} | ${5:Item2.1} | ${6:Item3.1} |",
|
||||
"${0}"
|
||||
],
|
||||
"description": "Insert table with 2 rows and 3 columns. First row is heading."
|
||||
},
|
||||
"Insert 3x3 table": {
|
||||
"prefix": "3x3table",
|
||||
"body": [
|
||||
"| ${1:Column1} | ${2:Column2} | ${3:Column3} |",
|
||||
"|---------------- | --------------- | --------------- |",
|
||||
"| ${4:Item1.1} | ${5:Item2.1} | ${6:Item3.1} |",
|
||||
"| ${7:Item1.2} | ${8:Item2.2} | ${9:Item3.2} |",
|
||||
"${0}"
|
||||
],
|
||||
"description": "Insert table with 3 rows and 3 columns. First row is heading."
|
||||
},
|
||||
"Insert 4x3 table": {
|
||||
"prefix": "4x3table",
|
||||
"body": [
|
||||
"| ${1:Column1} | ${2:Column2} | ${3:Column3} |",
|
||||
"|---------------- | --------------- | --------------- |",
|
||||
"| ${4:Item1.1} | ${5:Item2.1} | ${6:Item3.1} |",
|
||||
"| ${7:Item1.2} | ${8:Item2.2} | ${9:Item3.2} |",
|
||||
"| ${10:Item1.3} | ${11:Item2.3} | ${12:Item3.3} |",
|
||||
"${0}"
|
||||
],
|
||||
"description": "Insert table with 4 rows and 3 columns. First row is heading."
|
||||
},
|
||||
"Insert 5x3 table": {
|
||||
"prefix": "5x3table",
|
||||
"body": [
|
||||
"| ${1:Column1} | ${2:Column2} | ${3:Column3} |",
|
||||
"|---------------- | --------------- | --------------- |",
|
||||
"| ${4:Item1.1} | ${5:Item2.1} | ${6:Item3.1} |",
|
||||
"| ${7:Item1.2} | ${8:Item2.2} | ${9:Item3.2} |",
|
||||
"| ${10:Item1.3} | ${11:Item2.3} | ${12:Item3.3} |",
|
||||
"| ${13:Item1.4} | ${14:Item2.4} | ${15:Item3.4} |",
|
||||
"${0}"
|
||||
],
|
||||
"description": "Insert table with 5 rows and 3 columns. First row is heading."
|
||||
},
|
||||
"Insert 2x4 table": {
|
||||
"prefix": "2x4table",
|
||||
"body": [
|
||||
"| ${1:Column1} | ${2:Column2} | ${3:Column3} | ${4:Column4} |",
|
||||
"|---------------- | --------------- | --------------- | --------------- |",
|
||||
"| ${5:Item1.1} | ${6:Item2.1} | ${7:Item3.1} | ${8:Item4.1} |",
|
||||
"${0}"
|
||||
],
|
||||
"description": "Insert table with 2 rows and 4 columns. First row is heading."
|
||||
},
|
||||
"Insert 3x4 table": {
|
||||
"prefix": "3x4table",
|
||||
"body": [
|
||||
"| ${1:Column1} | ${2:Column2} | ${3:Column3} | ${4:Column4} |",
|
||||
"|---------------- | --------------- | --------------- | --------------- |",
|
||||
"| ${5:Item1.1} | ${6:Item2.1} | ${7:Item3.1} | ${8:Item4.1} |",
|
||||
"| ${9:Item1.2} | ${10:Item2.2} | ${11:Item3.2} | ${12:Item4.2} |",
|
||||
"${0}"
|
||||
],
|
||||
"description": "Insert table with 3 rows and 4 columns. First row is heading."
|
||||
},
|
||||
"Insert 4x4 table": {
|
||||
"prefix": "4x4table",
|
||||
"body": [
|
||||
"| ${1:Column1} | ${2:Column2} | ${3:Column3} | ${4:Column4} |",
|
||||
"|---------------- | --------------- | --------------- | --------------- |",
|
||||
"| ${5:Item1.1} | ${6:Item2.1} | ${7:Item3.1} | ${8:Item4.1} |",
|
||||
"| ${9:Item1.2} | ${10:Item2.2} | ${11:Item3.2} | ${12:Item4.2} |",
|
||||
"| ${13:Item1.3} | ${14:Item2.3} | ${15:Item3.3} | ${16:Item4.3} |",
|
||||
"${0}"
|
||||
],
|
||||
"description": "Insert table with 4 rows and 4 columns. First row is heading."
|
||||
},
|
||||
"Insert 5x4 table": {
|
||||
"prefix": "5x4table",
|
||||
"body": [
|
||||
"| ${1:Column1} | ${2:Column2} | ${3:Column3} | ${4:Column4} |",
|
||||
"|---------------- | --------------- | --------------- | --------------- |",
|
||||
"| ${5:Item1.1} | ${6:Item2.1} | ${7:Item3.1} | ${8:Item4.1} |",
|
||||
"| ${9:Item1.2} | ${10:Item2.2} | ${11:Item3.2} | ${12:Item4.2} |",
|
||||
"| ${13:Item1.3} | ${14:Item2.3} | ${15:Item3.3} | ${16:Item4.3} |",
|
||||
"| ${17:Item1.4} | ${18:Item2.4} | ${19:Item3.4} | ${20:Item4.4} |",
|
||||
"${0}"
|
||||
],
|
||||
"description": "Insert table with 5 rows and 4 columns. First row is heading."
|
||||
},
|
||||
"Insert 2x5 table": {
|
||||
"prefix": "2x5table",
|
||||
"body": [
|
||||
"| ${1:Column1} | ${2:Column2} | ${3:Column3} | ${4:Column4} | ${5:Column5} |",
|
||||
"|---------------- | --------------- | --------------- | --------------- | --------------- |",
|
||||
"| ${6:Item1.1} | ${7:Item2.1} | ${8:Item3.1} | ${9:Item4.1} | ${10:Item5.1} |",
|
||||
"${0}"
|
||||
],
|
||||
"description": "Insert table with 2 rows and 5 columns. First row is heading."
|
||||
},
|
||||
"Insert 3x5 table": {
|
||||
"prefix": "3x5table",
|
||||
"body": [
|
||||
"| ${1:Column1} | ${2:Column2} | ${3:Column3} | ${4:Column4} | ${5:Column5} |",
|
||||
"|---------------- | --------------- | --------------- | --------------- | --------------- |",
|
||||
"| ${6:Item1.1} | ${7:Item2.1} | ${8:Item3.1} | ${9:Item4.1} | ${10:Item5.1} |",
|
||||
"| ${11:Item1.2} | ${12:Item2.2} | ${13:Item3.2} | ${14:Item4.2} | ${15:Item5.2} |",
|
||||
"${0}"
|
||||
],
|
||||
"description": "Insert table with 3 rows and 5 columns. First row is heading."
|
||||
},
|
||||
"Insert 4x5 table": {
|
||||
"prefix": "4x5table",
|
||||
"body": [
|
||||
"| ${1:Column1} | ${2:Column2} | ${3:Column3} | ${4:Column4} | ${5:Column5} |",
|
||||
"|---------------- | --------------- | --------------- | --------------- | --------------- |",
|
||||
"| ${6:Item1.1} | ${7:Item2.1} | ${8:Item3.1} | ${9:Item4.1} | ${10:Item5.1} |",
|
||||
"| ${11:Item1.2} | ${12:Item2.2} | ${13:Item3.2} | ${14:Item4.2} | ${15:Item5.2} |",
|
||||
"| ${16:Item1.3} | ${17:Item2.3} | ${18:Item3.3} | ${19:Item4.3} | ${20:Item5.3} |",
|
||||
"${0}"
|
||||
],
|
||||
"description": "Insert table with 4 rows and 5 columns. First row is heading."
|
||||
},
|
||||
"Insert 5x5 table": {
|
||||
"prefix": "5x5table",
|
||||
"body": [
|
||||
"| ${1:Column1} | ${2:Column2} | ${3:Column3} | ${4:Column4} | ${5:Column5} |",
|
||||
"|---------------- | --------------- | --------------- | --------------- | --------------- |",
|
||||
"| ${6:Item1.1} | ${7:Item2.1} | ${8:Item3.1} | ${9:Item4.1} | ${10:Item5.1} |",
|
||||
"| ${11:Item1.2} | ${12:Item2.2} | ${13:Item3.2} | ${14:Item4.2} | ${15:Item5.2} |",
|
||||
"| ${16:Item1.3} | ${17:Item2.3} | ${18:Item3.3} | ${19:Item4.3} | ${20:Item5.3} |",
|
||||
"| ${21:Item1.4} | ${22:Item2.4} | ${23:Item3.4} | ${24:Item4.4} | ${25:Item5.4} |",
|
||||
"${0}"
|
||||
],
|
||||
"description": "Insert table with 5 rows and 5 columns. First row is heading."
|
||||
}
|
||||
}
|
||||
241
dot_vim/plugged/friendly-snippets/snippets/mint.json
Normal file
241
dot_vim/plugged/friendly-snippets/snippets/mint.json
Normal file
@@ -0,0 +1,241 @@
|
||||
{
|
||||
"Main component": {
|
||||
"prefix": "main",
|
||||
"body": [
|
||||
"component Main {",
|
||||
"\tfun render : Html {",
|
||||
"\t\t<$0/>",
|
||||
"\t}",
|
||||
"}"
|
||||
],
|
||||
"description": "The component named Main is the one that get's rendered on the screen."
|
||||
},
|
||||
"Store": {
|
||||
"prefix": "store",
|
||||
"body": [
|
||||
"store ${1:StoreName}.Store {",
|
||||
"\t$0",
|
||||
"}"
|
||||
],
|
||||
"description": "Stores are global containers of application specific data."
|
||||
},
|
||||
"Store property": {
|
||||
"prefix": "prop",
|
||||
"body": [
|
||||
"property ${1:name} : ${2:Number} = ${0:0}"
|
||||
],
|
||||
"description": "The property keyword when used in a store defines part of the data that the store contains."
|
||||
},
|
||||
"Functions": {
|
||||
"prefix": "fun",
|
||||
"body": [
|
||||
"fun ${1:name}(${2:object} : ${3:String}) : ${4:Void} {",
|
||||
"\t$0",
|
||||
"}"
|
||||
],
|
||||
"description": "Functions can be defined on modules, components, stores and providers."
|
||||
},
|
||||
"Next Call": {
|
||||
"prefix": "next",
|
||||
"body": [
|
||||
"next { state | ${1:name} = ${1:name} + 1 }"
|
||||
],
|
||||
"description": "Functions can be defined on modules, components, stores and providers."
|
||||
},
|
||||
"Render": {
|
||||
"prefix": "render",
|
||||
"body": [
|
||||
"fun render : Html {",
|
||||
"\t$0",
|
||||
"}"
|
||||
],
|
||||
"description": "The render function renders the component into an HTML tree."
|
||||
},
|
||||
"HTML Elements": {
|
||||
"prefix": "div",
|
||||
"body": [
|
||||
"<${1:div}::${2:stylename}>",
|
||||
"\t$0",
|
||||
"</${1:div}>"
|
||||
],
|
||||
"description": "HTML elements can be written as in standard HTML."
|
||||
},
|
||||
"Span Element": {
|
||||
"prefix": "span",
|
||||
"body": [
|
||||
"<${1:span}::${2:stylename}>",
|
||||
"\t$0",
|
||||
"</${1:span}>"
|
||||
],
|
||||
"description": "HTML elements can be written as in standard HTML."
|
||||
},
|
||||
"Paragraph Element": {
|
||||
"prefix": "p",
|
||||
"body": [
|
||||
"<${1:p}::${2:stylename}>",
|
||||
"\t$0",
|
||||
"</${1:p}>"
|
||||
],
|
||||
"description": "HTML elements can be written as in standard HTML."
|
||||
},
|
||||
"Title Element": {
|
||||
"prefix": "h",
|
||||
"body": [
|
||||
"<${1:h1}::${2:stylename}>",
|
||||
"\t$0",
|
||||
"</${1:h1}>"
|
||||
],
|
||||
"description": "HTML elements can be written as in standard HTML."
|
||||
},
|
||||
"Button Element": {
|
||||
"prefix": "button",
|
||||
"body": [
|
||||
"<${1:button}::${2:stylename} ${3:disabled}={${4:disabled}}>",
|
||||
"\t<{ \"${5:Text}\" }>",
|
||||
"</${1:button}>"
|
||||
],
|
||||
"description": "HTML elements can be written as in standard HTML."
|
||||
},
|
||||
"HTML Expressions": {
|
||||
"prefix": "exp",
|
||||
"body": [
|
||||
"<{ \"${Message}\" }>"
|
||||
],
|
||||
"description": "HTML Expressions allows inserting data into HTML elements or components."
|
||||
},
|
||||
"Attributes": {
|
||||
"prefix": "att",
|
||||
"body": [
|
||||
"{${disabled}}"
|
||||
],
|
||||
"description": "Attributes are either strings or expressions."
|
||||
},
|
||||
"Modules": {
|
||||
"prefix": "mod",
|
||||
"body": [
|
||||
"module ${1:ModuleName} {",
|
||||
"\t$0",
|
||||
"}"
|
||||
],
|
||||
"description": "Modules are kind of containers for a set of relatable functions, usually used to gather functions that relate to a specific type."
|
||||
},
|
||||
"Components": {
|
||||
"prefix": "com",
|
||||
"body": [
|
||||
"component ${1:ComponentName} {",
|
||||
"\t$0",
|
||||
"}"
|
||||
],
|
||||
"description": "Components are reusable pieces of code that have specific behavior, styles and content."
|
||||
},
|
||||
"Components Tags": {
|
||||
"prefix": "tag",
|
||||
"body": [
|
||||
"<${1:Component} ${2:attribute}={${3:value}}/>"
|
||||
],
|
||||
"description": "Tags that have the name of a component will render that component at the point where the tag is defined."
|
||||
},
|
||||
"Events": {
|
||||
"prefix": "event",
|
||||
"body": [
|
||||
"${onEvent}={\\event : Html.Event => ${handler}()}"
|
||||
],
|
||||
"description": "All event handlers are functions, they take an event record and return Void."
|
||||
},
|
||||
"Connect": {
|
||||
"prefix": "con",
|
||||
"body": [
|
||||
"connect ${1:StoreName}.Store exposing { $0 }"
|
||||
],
|
||||
"description": "The connect directive lets you connect a component to a store which allows you to call the stores functions and properties without using the stores name."
|
||||
},
|
||||
"Style": {
|
||||
"prefix": "sty",
|
||||
"body": [
|
||||
"style ${1:base} {",
|
||||
"\t${2:attribute}: ${3:value};",
|
||||
"}"
|
||||
],
|
||||
"description": "Styles define with CSS how an HTML element looks."
|
||||
},
|
||||
"Computed Properties": {
|
||||
"prefix": "get",
|
||||
"body": [
|
||||
"get ${1:computedProperty} : ${2:String} {",
|
||||
"\t$0",
|
||||
"}"
|
||||
],
|
||||
"description": "Computed properties works like regular properties but instead of returning a constant value it can return different values base on the state and the properties."
|
||||
},
|
||||
"If": {
|
||||
"prefix": "if",
|
||||
"body": [
|
||||
"if (${1:condition}) {",
|
||||
"\t${2:value}",
|
||||
"} else {",
|
||||
"\t${3:otherValue}",
|
||||
"}"
|
||||
],
|
||||
"description": "The if...else conditional expression can return two different values based on a condition."
|
||||
},
|
||||
"Case": {
|
||||
"prefix": "case",
|
||||
"body": [
|
||||
"case (${1:condition}) {",
|
||||
"\t${2:match1} => ${3:value1}",
|
||||
"\t${4:match3} => ${5:value3}",
|
||||
"\t=> ${6:defaultValue}",
|
||||
"}"
|
||||
],
|
||||
"description": "A case expression is useful for matching enums or exact values, while also supporting a default value."
|
||||
},
|
||||
"Record": {
|
||||
"prefix": "record",
|
||||
"body": [
|
||||
"record ${1:User} {",
|
||||
"\t${2:name} : ${3:String},",
|
||||
"\t${4:email} : ${5:String}",
|
||||
"}"
|
||||
],
|
||||
"description": "Records are object like data structures, that have a fix set of keys and values."
|
||||
},
|
||||
"Try": {
|
||||
"prefix": "try",
|
||||
"body": [
|
||||
"try {",
|
||||
"\t$1",
|
||||
"} catch ${2:Json}.Error => error {",
|
||||
"\t$3",
|
||||
"}"
|
||||
],
|
||||
"description": "try is a control expression for handling synchronous computations that might fail, for example when you are trying to convert an untyped JavaScript object into a typed Record."
|
||||
},
|
||||
"Do": {
|
||||
"prefix": "do",
|
||||
"body": [
|
||||
"do {",
|
||||
"\t$1",
|
||||
"} catch ${2:Http}.Error => error {",
|
||||
"\t$3",
|
||||
"}"
|
||||
],
|
||||
"description": "do expressions are for two things: handling asynchronous computations that might fail, for example when loading something with a request, or executing asynchronous expressions sequentially."
|
||||
},
|
||||
"Routes": {
|
||||
"prefix": "routes",
|
||||
"body": [
|
||||
"routes {",
|
||||
"\t/ {",
|
||||
"\t\t${1:Application.setPage(\"index\")}",
|
||||
"\t}",
|
||||
"\t/${2:user}/:${3:id} {",
|
||||
"\t\t do {",
|
||||
"\t\t\t${4:Application.setPage(\"show\")}",
|
||||
"\t\t\t${5:Application.loadUser(id)}",
|
||||
"\t\t}",
|
||||
"\t}",
|
||||
"}"
|
||||
],
|
||||
"description": "In Mint routes of an application are defined at the top level with the routes block."
|
||||
}
|
||||
}
|
||||
79
dot_vim/plugged/friendly-snippets/snippets/norg.json
Normal file
79
dot_vim/plugged/friendly-snippets/snippets/norg.json
Normal file
@@ -0,0 +1,79 @@
|
||||
{
|
||||
"bold": {
|
||||
"prefix": "bold",
|
||||
"body": ["*$0*"],
|
||||
"description": "bold words"
|
||||
},
|
||||
"code": {
|
||||
"prefix": "code",
|
||||
"body": ["@code ${1:lang}", "$0", "@end"],
|
||||
"description": "code_block"
|
||||
},
|
||||
"data": {
|
||||
"prefix": "data",
|
||||
"body": ["@data", "$0", "@end"],
|
||||
"description": "data tags"
|
||||
},
|
||||
"inlinecode": {
|
||||
"description": "inlinecode",
|
||||
"prefix": "inlinecode",
|
||||
"body": ["`$0`"]
|
||||
},
|
||||
"italic": {
|
||||
"prefix": "italic",
|
||||
"body": ["/$0/"],
|
||||
"description": "italic words"
|
||||
},
|
||||
"link": {
|
||||
"prefix": "link",
|
||||
"body": ["[${1:description}](${2:object})"],
|
||||
"description": "links"
|
||||
},
|
||||
"math": {
|
||||
"prefix": "math",
|
||||
"body": ["@math", "$0", "@end"],
|
||||
"description": "math block"
|
||||
},
|
||||
|
||||
"spoiler": {
|
||||
"description": "spoiler",
|
||||
"prefix": "spoiler",
|
||||
"body": ["!$0!"]
|
||||
},
|
||||
|
||||
"strikethrough": {
|
||||
"description": "strike through",
|
||||
"prefix": "strikethrough",
|
||||
"body": ["-$0-"]
|
||||
},
|
||||
"subscript": {
|
||||
"prefix": "subscript",
|
||||
"body": [",$0,"],
|
||||
"description": "subscript"
|
||||
},
|
||||
"superscript": {
|
||||
"prefix": "superscript",
|
||||
"body": ["^$0^"],
|
||||
"description": "superscript"
|
||||
},
|
||||
"table": {
|
||||
"prefix": "table",
|
||||
"body": ["@table", "$0", "@end"],
|
||||
"description": "table"
|
||||
},
|
||||
"task": {
|
||||
"prefix": "task",
|
||||
"body": ["- ( ) ${1:task}"],
|
||||
"description": "task"
|
||||
},
|
||||
"underline": {
|
||||
"prefix": "underline",
|
||||
"body": ["_$0_"],
|
||||
"description": "underline words"
|
||||
},
|
||||
"var": {
|
||||
"prefix": "var",
|
||||
"body": ["=${1:variable}="],
|
||||
"description": "variable"
|
||||
}
|
||||
}
|
||||
411
dot_vim/plugged/friendly-snippets/snippets/objc.json
Normal file
411
dot_vim/plugged/friendly-snippets/snippets/objc.json
Normal file
@@ -0,0 +1,411 @@
|
||||
|
||||
{
|
||||
"for": {
|
||||
"prefix": "for",
|
||||
"body": [
|
||||
"for (${1:size_t} ${2:i} = ${3:0}; $2 < ${4:length}; $2++) {",
|
||||
"\t$0",
|
||||
"}"
|
||||
],
|
||||
"description": "Code snippet for 'for' loop"
|
||||
},
|
||||
"forr": {
|
||||
"prefix": "forr",
|
||||
"body": [
|
||||
"for (${1:size_t} ${2:i} = ${3:length} - 1; $2 >= ${4:0}; $2--) {",
|
||||
"\t$0",
|
||||
"}"
|
||||
],
|
||||
"description": "Code snippet for reverse 'for' loop"
|
||||
},
|
||||
"forin": {
|
||||
"prefix": "forin",
|
||||
"body": [
|
||||
"for (${1:type *object} in ${2:collection}) {",
|
||||
"\t${3:statements}",
|
||||
"}"
|
||||
],
|
||||
"description": "Code snippet for reverse 'forin' loop"
|
||||
},
|
||||
"while": {
|
||||
"prefix": "while",
|
||||
"body": ["while ($1) {", "\t$0", "}"],
|
||||
"description": ""
|
||||
},
|
||||
"if": {
|
||||
"prefix": "if",
|
||||
"body": ["if ($1) {", "\t$0", "}"],
|
||||
"description": "Code snippet for if statement"
|
||||
},
|
||||
"else": {
|
||||
"prefix": "else",
|
||||
"body": ["else {", "\t$0", "}"],
|
||||
"description": "Code snippet for else statement"
|
||||
},
|
||||
"else if": {
|
||||
"prefix": "else if",
|
||||
"body": ["else if ($1) {", "\t$0", "}"],
|
||||
"description": "Code snippet for else-if statement"
|
||||
},
|
||||
"enum": {
|
||||
"prefix": "enum",
|
||||
"body": ["enum ${1:MyEnum} {", "\t$0", "};"],
|
||||
"description": "Code snippet for enum"
|
||||
},
|
||||
"nsoptions": {
|
||||
"prefix": "nsoptions",
|
||||
"body": [
|
||||
"typedef NS_ENUM(NSUInteger, ${1:MyEnum}) {",
|
||||
"\t${2:MyEnumValueA} = 1 << 0,",
|
||||
"\t${3:MyEnumValueB} = 1 << 1,",
|
||||
"\t${4:MyEnumValueC} = 1 << 2,",
|
||||
"};"
|
||||
],
|
||||
"description": "Code snippet for NS_OPTIONS"
|
||||
},
|
||||
"nsenum": {
|
||||
"prefix": "nsenum",
|
||||
"body": [
|
||||
"typedef NS_ENUM(NSUInteger, ${1:MyEnum}) {",
|
||||
"\t${2:MyEnumValueA},",
|
||||
"\t${3:MyEnumValueB},",
|
||||
"\t${4:MyEnumValueC},",
|
||||
"};"
|
||||
],
|
||||
"description": "Code snippet for NS_ENUM"
|
||||
},
|
||||
"#ifdef": {
|
||||
"prefix": "#ifdef",
|
||||
"body": ["#ifdef ${1:DEBUG}", "$0", "#endif /* $1 */"],
|
||||
"description": "Code snippet for #ifdef"
|
||||
},
|
||||
"#ifndef": {
|
||||
"prefix": "#ifndef",
|
||||
"body": ["#ifndef ${1:DEBUG}", "$0", "#endif /* !$1 */"],
|
||||
"description": "Code snippet for #ifndef"
|
||||
},
|
||||
"#if": {
|
||||
"prefix": "#if",
|
||||
"body": ["#if ${1:0}", "$0", "#endif /* $1 */"],
|
||||
"description": "Code snippet for #if"
|
||||
},
|
||||
"struct": {
|
||||
"prefix": "struct",
|
||||
"body": ["struct ${1:MyStruct} {", "\t$0", "};"],
|
||||
"description": "Code snippet for struct"
|
||||
},
|
||||
"typedef struct": {
|
||||
"prefix": "structt",
|
||||
"body": ["typedef struct {", "\t$0", "} ${1:MyStruct};"],
|
||||
"description": "Code snippet to define a type with struct"
|
||||
},
|
||||
"switch": {
|
||||
"prefix": "switch",
|
||||
"body": ["switch (${1:switch_on}) {", "\tdefault:", "\t\t$0", "\t\tbreak;", "}"],
|
||||
"description": "Code snippet for switch statement"
|
||||
},
|
||||
"case": {
|
||||
"prefix": "case",
|
||||
"body": ["case $1:", "\t$0", "\tbreak;"],
|
||||
"description": "Code snippet for case branch"
|
||||
},
|
||||
"union": {
|
||||
"prefix": "union",
|
||||
"body": ["union ${1:MyUnion} {", "\t$0", "};"],
|
||||
"description": "Code snippet for union"
|
||||
},
|
||||
"#imp": {
|
||||
"prefix": "#imp",
|
||||
"body": ["#import \"$0\""],
|
||||
"description": "Code snippet for #import \" \""
|
||||
},
|
||||
"#imp<": {
|
||||
"prefix": "#imp<",
|
||||
"body": ["#import <$0>"],
|
||||
"description": "Code snippet for #import < >"
|
||||
},
|
||||
"#inc": {
|
||||
"prefix": "#inc",
|
||||
"body": ["#include \"$0\""],
|
||||
"description": "Code snippet for #include \" \""
|
||||
},
|
||||
"#inc<": {
|
||||
"prefix": "#inc<",
|
||||
"body": ["#include <$0>"],
|
||||
"description": "Code snippet for #include < >"
|
||||
},
|
||||
"#def": {
|
||||
"prefix": "def",
|
||||
"body": ["#define $0"],
|
||||
"description": "Code snippet for #define \" \""
|
||||
},
|
||||
"Main function template": {
|
||||
"prefix": "main",
|
||||
"body": [
|
||||
"int main (int argc, char *argv[])",
|
||||
"{",
|
||||
"\t$0",
|
||||
"\treturn 0;",
|
||||
"}"
|
||||
],
|
||||
"description": "A standard main function for a C program"
|
||||
},
|
||||
"Standard Starter Template": {
|
||||
"prefix": "sst",
|
||||
"body": [
|
||||
"#include <stdio.h>",
|
||||
"",
|
||||
"int main (int argc, char *argv[])",
|
||||
"{",
|
||||
"\t$0",
|
||||
"\treturn 0;",
|
||||
"}"
|
||||
],
|
||||
"description": "A standard starter template for a C program"
|
||||
},
|
||||
"Stdlib Variant Starter Template": {
|
||||
"prefix": "libsst",
|
||||
"body": [
|
||||
"#include <stdio.h>",
|
||||
"#include <stdlib.h>",
|
||||
"",
|
||||
"int main (int argc, char *argv[])",
|
||||
"{",
|
||||
"\t$0",
|
||||
"\treturn 0;",
|
||||
"}"
|
||||
],
|
||||
"description": "A standard starter template for a C program with stdlib included"
|
||||
},
|
||||
"Do...while loop": {
|
||||
"prefix": "do",
|
||||
"body": ["do {", "\t$1", "} while($2);"],
|
||||
"description": "Creates a do...while loop"
|
||||
},
|
||||
"Create protocol declaration": {
|
||||
"prefix": ["proto", "@protocol"],
|
||||
"body": [
|
||||
"NS_ASSUME_NONNULL_BEGIN\n",
|
||||
"@protocol ${1:protocol name} : ${2:NSObject}\n",
|
||||
"$3",
|
||||
"\n@end\n",
|
||||
"NS_ASSUME_NONNULL_END"
|
||||
],
|
||||
"description": "Create an Objc protocol declaration"
|
||||
},
|
||||
"Create Class interface": {
|
||||
"prefix": ["class", "@interface"],
|
||||
"body": [
|
||||
"NS_ASSUME_NONNULL_BEGIN\n",
|
||||
"@interface ${1:$TM_FILENAME_BASE} : ${2:NSObject}\n",
|
||||
"$3",
|
||||
"\n@end\n",
|
||||
"NS_ASSUME_NONNULL_END"
|
||||
],
|
||||
"description": "Create an Objc Class interface"
|
||||
},
|
||||
"Create Class implementation": {
|
||||
"prefix": "@implementation",
|
||||
"body": [
|
||||
"@implementation ${1:$TM_FILENAME_BASE}\n",
|
||||
"${2:methods}\n",
|
||||
"@end"
|
||||
],
|
||||
"description": "Create an Objc Class implementation"
|
||||
},
|
||||
"Create property": {
|
||||
"prefix": [ "@property", "prop" ],
|
||||
"body": [ "@property (nonatomic, ${1:memory control}) ${2:property};\n" ],
|
||||
"description": "Create an Objc property"
|
||||
},
|
||||
"Create property for copied text": {
|
||||
"prefix": [ "makeproperty", "mp" ],
|
||||
"body": [ "@property (nonatomic, ${1:memory control}) ${2:type} ${3:$CLIPBOARD};\n" ],
|
||||
"description": "Create an Objc property with copied text"
|
||||
},
|
||||
"Create class method interface": {
|
||||
"prefix": ["funccd", "+interface"],
|
||||
"body": [ "+ (${1:void}) ${2:func name};\n" ],
|
||||
"description": "Create an Objc class method interface"
|
||||
},
|
||||
"Create class method implementation": {
|
||||
"prefix": ["funcci", "+impl"],
|
||||
"body": [ "+ (${1:void}) ${2:func name} {", "$4", "}" ],
|
||||
"description": "Create an Objc class method implementation"
|
||||
},
|
||||
"Create instance method interface": {
|
||||
"prefix": ["funcid", "-interface"],
|
||||
"body": [ "- (${1:void}) ${2:func name};\n" ],
|
||||
"description": "Create an Objc instance method interface"
|
||||
},
|
||||
"Create instance method implementation": {
|
||||
"prefix": ["funcii", "-impl"],
|
||||
"body": [ "- (${1:void}) ${2:func name} {", "$4", "}" ],
|
||||
"description": "Create an Objc instance method implementation"
|
||||
},
|
||||
"Function field": {
|
||||
"prefix": "field",
|
||||
"body": [ ":(${1:type}) ${2:field}" ],
|
||||
"description": "Create an Objc instance method implementation"
|
||||
},
|
||||
"Block type var": {
|
||||
"prefix": "blockvar",
|
||||
"body": [ "${1:void} (^${2:name}) (${3:parameters}) = ^${1:void}(${3:parameters}) {\n", "};\n" ],
|
||||
"description": "Create a block local variable"
|
||||
},
|
||||
"Block property": {
|
||||
"prefix": "@propertyblock",
|
||||
"body": [ "@property (nonatomic, copy, ${1:nullability}) ${2:void} (^${3:name})(${4:parameters});\n" ],
|
||||
"description": "Create a block property"
|
||||
},
|
||||
"@selector": {
|
||||
"prefix": "@selector",
|
||||
"body": [ "@selector(${1:method}}" ],
|
||||
"description": "Create a @selector"
|
||||
},
|
||||
"@protocol": {
|
||||
"prefix": "@proto",
|
||||
"body": [ "@protocol(${1:protocol name}}" ],
|
||||
"description": "Create a @protocol"
|
||||
},
|
||||
"Block field": {
|
||||
"prefix": "fieldblock",
|
||||
"body": [ ":(${1:void} (^${2:nullability}) (${3:parameters}))${4:name)" ],
|
||||
"description": "Create a block field"
|
||||
},
|
||||
"Block typedef": {
|
||||
"prefix": "typedefblock",
|
||||
"body": [ "typedef ${1:void} (^${2:type_name}) (${3:parameters})" ],
|
||||
"description": "Create a block field"
|
||||
},
|
||||
"Dispatch once snip": {
|
||||
"prefix": "dispatchoncesnip",
|
||||
"body": [
|
||||
"static dispatch_once_t onceToken;",
|
||||
"dispatch_once(&onceToken, ^{",
|
||||
"\t${1:code to be executed once}",
|
||||
"});"
|
||||
],
|
||||
"description": "Create a dispatch_once"
|
||||
},
|
||||
"Dispatch sync": {
|
||||
"prefix": "dispatchsync",
|
||||
"body": [ "dispatch_sync(${1:dispatch_queue_t _Nonnull queue}, ${2:^(void)block})" ],
|
||||
"description": "Create a dispatch_sync"
|
||||
},
|
||||
"Dispatch async": {
|
||||
"prefix": "dispatchasync",
|
||||
"body": [ "dispatch_async(${1:dispatch_queue_t _Nonnull queue}, ${2:^(void)block})" ],
|
||||
"description": "Create a dispatch_async"
|
||||
},
|
||||
"Dispatch get main queue": {
|
||||
"prefix": "dispatchgetmainqueue",
|
||||
"body": [ "dispatch_get_main_queue()" ],
|
||||
"description": "Create a dispatch_get_main_queue"
|
||||
},
|
||||
"Dispatch get global queue": {
|
||||
"prefix": "dispatchgetglobalqueue",
|
||||
"body": [ "dispatch_get_global_queue(${1:intptr_t identifier}, ${2:uintptr_t flags})" ],
|
||||
"description": "Create a dispatch_get_global_queue"
|
||||
},
|
||||
"Dispatch semaphore create": {
|
||||
"prefix": "dispatchsemaphorecreate",
|
||||
"body": [ "dispatch_semaphore_create(${1:intptr_t value})" ],
|
||||
"description": "Create a dispatch_semaphore_create"
|
||||
},
|
||||
"NSLog": {
|
||||
"prefix": "NSLog",
|
||||
"body": [ "NSLog(@\"${1:%@}\"$2);" ],
|
||||
"description": "Create a NSLog"
|
||||
},
|
||||
"try-catch-finally": {
|
||||
"prefix": "@try",
|
||||
"body": [
|
||||
"@try {",
|
||||
"\t${1:statements}",
|
||||
"}",
|
||||
"@catch (NSException * e) {",
|
||||
"\t${2:handler}",
|
||||
"}",
|
||||
"@finally {",
|
||||
"\t${0:statements}",
|
||||
"}"
|
||||
],
|
||||
"description": "Create a try-catch-finally block"
|
||||
},
|
||||
"catch": {
|
||||
"prefix": "@catch",
|
||||
"body": [
|
||||
"@catch (NSException * e) {",
|
||||
"\t${2:handler}",
|
||||
"}"
|
||||
],
|
||||
"description": "Create a catch block"
|
||||
},
|
||||
"finally": {
|
||||
"prefix": "@finally",
|
||||
"body": [
|
||||
"@finally {",
|
||||
"\t${0:statements}",
|
||||
"}"
|
||||
],
|
||||
"description": "Create a finally block"
|
||||
},
|
||||
"@synchronized": {
|
||||
"prefix": "@synchronized",
|
||||
"body": [
|
||||
"@synchronized (${1:token}) {",
|
||||
"\t${2:statements}",
|
||||
"}"
|
||||
],
|
||||
"description": "Create a finally block"
|
||||
},
|
||||
"MARK: -": {
|
||||
"prefix": "mark",
|
||||
"body": [ "// MARK: - ${1:lable}" ],
|
||||
"description": "Create a MARK"
|
||||
},
|
||||
"MARK: - Private": {
|
||||
"prefix": "markprivate",
|
||||
"body": [ "// MARK: - Private" ],
|
||||
"description": "Create a MARK: - Private"
|
||||
},
|
||||
"MARK: - Public": {
|
||||
"prefix": "markpublic",
|
||||
"body": [ "// MARK: - Public" ],
|
||||
"description": "Create a MARK: - Public"
|
||||
},
|
||||
"MARK: - UI": {
|
||||
"prefix": "markui",
|
||||
"body": [ "// MARK: - UI" ],
|
||||
"description": "Create a MARK: - UI"
|
||||
},
|
||||
"MARK: - Data": {
|
||||
"prefix": "markdata",
|
||||
"body": [ "// MARK: - Public" ],
|
||||
"description": "Create a MARK: - Data"
|
||||
},
|
||||
"MARK: - Override": {
|
||||
"prefix": "markoverride",
|
||||
"body": [ "// MARK: - Override" ],
|
||||
"description": "Create a MARK: - Override"
|
||||
},
|
||||
"MARK: - copied text": {
|
||||
"prefix": "markselected",
|
||||
"body": [ "// MARK: - $CLIPBOARD" ],
|
||||
"description": "Create a MARK for copied text"
|
||||
},
|
||||
"Create file documents": {
|
||||
"prefix": "filedoc",
|
||||
"body": [
|
||||
"//",
|
||||
"// $TM_FILENAME",
|
||||
"// $WORKSPACE_NAME",
|
||||
"//",
|
||||
"// Created by ${VIM:\\$USER} on $CURRENT_YEAR/$CURRENT_MONTH/$CURRENT_DATE.",
|
||||
"// Copyright © $CURRENT_YEAR ${VIM:\\$USER}. All rights reserved.",
|
||||
"//"
|
||||
],
|
||||
"description": "Create a file documents header"
|
||||
}
|
||||
}
|
||||
217
dot_vim/plugged/friendly-snippets/snippets/org.json
Normal file
217
dot_vim/plugged/friendly-snippets/snippets/org.json
Normal file
@@ -0,0 +1,217 @@
|
||||
{
|
||||
"center block": {
|
||||
"description": "#+BEGIN_CENTER block",
|
||||
"prefix": "<C",
|
||||
"body": [
|
||||
"#+BEGIN_CENTER",
|
||||
"$0",
|
||||
"#+END_CENTER"
|
||||
]
|
||||
},
|
||||
"comment block": {
|
||||
"description": "#+BEGIN_COMMENT block",
|
||||
"prefix": "<c",
|
||||
"body": [
|
||||
"#+BEGIN_COMMENT",
|
||||
"$0",
|
||||
"#+END_COMMENT"
|
||||
]
|
||||
},
|
||||
"example block": {
|
||||
"description": "#+BEGIN_EXAMPLE block",
|
||||
"prefix": "<e",
|
||||
"body": [
|
||||
"#+BEGIN_EXAMPLE",
|
||||
"$0",
|
||||
"#+END_EXAMPLE"
|
||||
]
|
||||
},
|
||||
"src block": {
|
||||
"description": "#+BEGIN_SRC ... block",
|
||||
"prefix": "<s",
|
||||
"body": [
|
||||
"#+BEGIN_SRC ${1:lang}",
|
||||
"$0",
|
||||
"#+END_SRC"
|
||||
]
|
||||
},
|
||||
"verse": {
|
||||
"description": "verse",
|
||||
"prefix": "<v",
|
||||
"body": [
|
||||
"#+BEGIN_VERSE",
|
||||
"$0",
|
||||
"#+END_VERSE"
|
||||
]
|
||||
},
|
||||
"export ascii": {
|
||||
"description": "#+BEGIN_EXPORT ascii",
|
||||
"prefix": "<a",
|
||||
"body": [
|
||||
"#+BEGIN_EXPORT ascii",
|
||||
"$0",
|
||||
"#+END_EXPORT"
|
||||
]
|
||||
},
|
||||
"export html": {
|
||||
"description": "#+BEGIN_EXPORT html block",
|
||||
"prefix": "<h",
|
||||
"body": [
|
||||
"#+BEGIN_EXPORT html",
|
||||
"$0",
|
||||
"#+END_EXPORT"
|
||||
]
|
||||
},
|
||||
"export latex": {
|
||||
"description": "#+BEGIN_EXPORT latex block",
|
||||
"prefix": "<l",
|
||||
"body": [
|
||||
"#+BEGIN_EXPORT latex",
|
||||
"$0",
|
||||
"#+END_EXPORT"
|
||||
]
|
||||
},
|
||||
"quote block": {
|
||||
"description": "#+BEGIN_QUOTE block",
|
||||
"prefix": "<q",
|
||||
"body": [
|
||||
"#+BEGIN_QUOTE",
|
||||
"$0",
|
||||
"#+END_QUOTE"
|
||||
]
|
||||
},
|
||||
"blog": {
|
||||
"description": "blog",
|
||||
"prefix": "blog",
|
||||
"body": [
|
||||
"#+STARTUP: showall indent",
|
||||
"#+STARTUP: hidestars",
|
||||
"#+BEGIN_HTML",
|
||||
"---",
|
||||
"layout: default",
|
||||
"title: ${1:title}",
|
||||
"excerpt: ${2:excerpt}",
|
||||
"---",
|
||||
"$0"
|
||||
]
|
||||
},
|
||||
"code": {
|
||||
"description": "code",
|
||||
"prefix": "code",
|
||||
"body": [
|
||||
"#+BEGIN_${1:LANG} ${2:options}",
|
||||
"$0",
|
||||
"#+END_$1"
|
||||
]
|
||||
},
|
||||
"dot": {
|
||||
"description": "dot",
|
||||
"prefix": "dot",
|
||||
"body": [
|
||||
"#+BEGIN_SRC dot :file ${1:file} :cmdline -T${2:pdf} :exports none :results silent",
|
||||
"$0",
|
||||
"#+END_SRC",
|
||||
"",
|
||||
"[[file:$1]]"
|
||||
]
|
||||
},
|
||||
"elisp": {
|
||||
"description": "elisp",
|
||||
"prefix": "elisp",
|
||||
"body": [
|
||||
"#+BEGIN_SRC emacs-lisp :tangle yes",
|
||||
"$0",
|
||||
"#+END_SRC"
|
||||
]
|
||||
},
|
||||
"embedded": {
|
||||
"description": "embedded",
|
||||
"prefix": "emb",
|
||||
"body": [
|
||||
"src_${1:lang}${2:[${3:where}]}{${4:code}}"
|
||||
]
|
||||
},
|
||||
"entry": {
|
||||
"description": "entry",
|
||||
"prefix": "entry",
|
||||
"body": [
|
||||
"#+BEGIN_HTML",
|
||||
"---",
|
||||
"layout: ${1:default}",
|
||||
"title: ${2:title}",
|
||||
"---",
|
||||
"#+END_HTML",
|
||||
"$0"
|
||||
]
|
||||
},
|
||||
"export": {
|
||||
"description": "export",
|
||||
"prefix": "export",
|
||||
"body": [
|
||||
"#+BEGIN_EXPORT ${1:type}",
|
||||
"$0",
|
||||
"#+END_EXPORT"
|
||||
]
|
||||
},
|
||||
"figure": {
|
||||
"description": "figure",
|
||||
"prefix": "fig",
|
||||
"body": [
|
||||
"#+CAPTION: ${1:caption}",
|
||||
"#+ATTR_LATEX: ${2:scale=0.75}",
|
||||
"#+LABEL: fig:${3:label}"
|
||||
]
|
||||
},
|
||||
"header": {
|
||||
"description": "org-file header",
|
||||
"prefix": "head",
|
||||
"body": [
|
||||
"#+TITLE: ${1:Untitled Document}",
|
||||
"#+AUTHOR: ${2:Author}",
|
||||
"#+DATE: ${CURRENT_YEAR}-${CURRENT_MONTH}-${CURRENT_DATE}"
|
||||
]
|
||||
},
|
||||
"image": {
|
||||
"description": "img",
|
||||
"prefix": "img",
|
||||
"body": [
|
||||
"#+ATTR_HTML: :alt $2 :align ${3:left} :class img",
|
||||
"[[${1:src}]${4:[${5:title}]}]",
|
||||
"$0"
|
||||
]
|
||||
},
|
||||
"latex": {
|
||||
"description": "latex",
|
||||
"prefix": "latex",
|
||||
"body": [
|
||||
"#+BEGIN_LATEX",
|
||||
"$0",
|
||||
"#+END_LATEX"
|
||||
]
|
||||
},
|
||||
"latex matrix": {
|
||||
"description": "matrix",
|
||||
"prefix": "matrix",
|
||||
"body": [
|
||||
"\\left \\(",
|
||||
"\t\\begin{array}{${1:ccc}}",
|
||||
"\t\t${2:v1 & v2} \\\\\\",
|
||||
"\t\t$0",
|
||||
"\t\\end{array}",
|
||||
"\\right \\)"
|
||||
]
|
||||
},
|
||||
"todo": {
|
||||
"description": "TODO item",
|
||||
"prefix": "todo",
|
||||
"body": [
|
||||
"TODO ${1:task description}"
|
||||
]
|
||||
},
|
||||
"html width": {
|
||||
"description": "#+attr_html: :width ...",
|
||||
"body": [
|
||||
"#+ATTR_HTML: :width ${1:500px}"
|
||||
]
|
||||
}
|
||||
}
|
||||
230
dot_vim/plugged/friendly-snippets/snippets/php.json
Normal file
230
dot_vim/plugged/friendly-snippets/snippets/php.json
Normal file
@@ -0,0 +1,230 @@
|
||||
{
|
||||
"class …": {
|
||||
"prefix": "class",
|
||||
"body": [
|
||||
"class ${1:ClassName} ${2:extends ${3:AnotherClass}} ${4:implements ${5:Interface}} {",
|
||||
"\t$0",
|
||||
"}",
|
||||
""
|
||||
],
|
||||
"description": "Class definition"
|
||||
},
|
||||
"PHPDoc class …": {
|
||||
"prefix": "doc_class",
|
||||
"body": [
|
||||
"/**",
|
||||
" * ${6:undocumented class}",
|
||||
" */",
|
||||
"class ${1:ClassName} ${2:extends ${3:AnotherClass}} ${4:implements ${5:Interface}} {",
|
||||
"\t$0",
|
||||
"}",
|
||||
""
|
||||
],
|
||||
"description": "Documented Class Declaration"
|
||||
},
|
||||
"function __construct": {
|
||||
"prefix": "con",
|
||||
"body": [
|
||||
"${1:public} function __construct(${2:${3:Type} \\$${4:var}${5: = ${6:null}}}) {",
|
||||
"\t\\$this->${4:var} = \\$${4:var};$0",
|
||||
"}"
|
||||
]
|
||||
},
|
||||
"PHPDoc property": {
|
||||
"prefix": "doc_v",
|
||||
"body": [
|
||||
"/** @var ${1:Type} \\$${2:var} ${3:description} */",
|
||||
"${4:protected} \\$${2:var}${5: = ${6:null}};$0"
|
||||
],
|
||||
"description": "Documented Class Variable"
|
||||
},
|
||||
"PHPDoc function …": {
|
||||
"prefix": "doc_f",
|
||||
"body": [
|
||||
"/**",
|
||||
" * ${1:undocumented function summary}",
|
||||
" *",
|
||||
" * ${2:Undocumented function long description}",
|
||||
" *",
|
||||
"${3: * @param ${4:Type} \\$${5:var} ${6:Description}}",
|
||||
"${7: * @return ${8:type}}",
|
||||
"${9: * @throws ${10:conditon}}",
|
||||
" **/",
|
||||
"${11:public }function ${12:FunctionName}(${13:${14:${4:Type} }\\$${5:var}${15: = ${16:null}}}) {",
|
||||
"\t${0:# code...}",
|
||||
"}"
|
||||
],
|
||||
"description": "Documented function"
|
||||
},
|
||||
"PHPDoc param …": {
|
||||
"prefix": "param",
|
||||
"body": ["* @param ${1:Type} ${2:var} ${3:Description}$0"],
|
||||
"description": "Paramater documentation"
|
||||
},
|
||||
"function …": {
|
||||
"prefix": "fun",
|
||||
"body": [
|
||||
"${1:public }function ${2:FunctionName}(${3:${4:${5:Type} }\\$${6:var}${7: = ${8:null}}}) {",
|
||||
"\t${0:# code...}",
|
||||
"}"
|
||||
],
|
||||
"description": "Function"
|
||||
},
|
||||
"trait …": {
|
||||
"prefix": "trait",
|
||||
"body": [
|
||||
"/**",
|
||||
" * $1",
|
||||
" */",
|
||||
"trait ${2:TraitName}",
|
||||
"{",
|
||||
"\t$0",
|
||||
"}",
|
||||
""
|
||||
],
|
||||
"description": "Trait"
|
||||
},
|
||||
"define(…, …)": {
|
||||
"prefix": "def",
|
||||
"body": ["define('$1', ${2:'$3'});", "$0"],
|
||||
"description": "Definition"
|
||||
},
|
||||
"do … while …": {
|
||||
"prefix": "do",
|
||||
"body": [
|
||||
"do {",
|
||||
"\t${0:# code...}",
|
||||
"} while (${1:\\$${2:a} <= ${3:10}});"
|
||||
],
|
||||
"description": "Do-While loop"
|
||||
},
|
||||
"while …": {
|
||||
"prefix": "while",
|
||||
"body": ["while (${1:\\$${2:a} <= ${3:10}}) {", "\t${0:# code...}", "}"],
|
||||
"description": "While-loop"
|
||||
},
|
||||
"if …": {
|
||||
"prefix": "if",
|
||||
"body": ["if (${1:condition}) {", "\t${0:# code...}", "}"],
|
||||
"description": "If block"
|
||||
},
|
||||
"if … else …": {
|
||||
"prefix": "ifelse",
|
||||
"body": [
|
||||
"if (${1:condition}) {",
|
||||
"\t${2:# code...}",
|
||||
"} else {",
|
||||
"\t${3:# code...}",
|
||||
"}",
|
||||
"$0"
|
||||
],
|
||||
"description": "If Else block"
|
||||
},
|
||||
"$… = ( … ) ? … : …": {
|
||||
"prefix": "if?",
|
||||
"body": "\\$${1:retVal} = (${2:condition}) ? ${3:a} : ${4:b} ;",
|
||||
"description": "Ternary conditional assignment"
|
||||
},
|
||||
"else …": {
|
||||
"prefix": "else",
|
||||
"body": ["else {", "\t${0:# code...}", "}"],
|
||||
"description": "Else block"
|
||||
},
|
||||
"elseif …": {
|
||||
"prefix": "elseif",
|
||||
"body": ["elseif (${1:condition}) {", "\t${0:# code...}", "}"],
|
||||
"description": "Elseif block"
|
||||
},
|
||||
"for …": {
|
||||
"prefix": "for",
|
||||
"body": [
|
||||
"for (\\$${1:i}=${2:0}; \\$${1:i} < $3; \\$${1:i}++) { ",
|
||||
"\t${0:# code...}",
|
||||
"}"
|
||||
],
|
||||
"description": "For-loop"
|
||||
},
|
||||
"foreach …": {
|
||||
"prefix": "foreach",
|
||||
"body": [
|
||||
"foreach (\\$${1:variable} as \\$${2:key} ${3:=> \\$${4:value}}) {",
|
||||
"\t${0:# code...}",
|
||||
"}"
|
||||
],
|
||||
"description": "Foreach loop"
|
||||
},
|
||||
"$… = array (…)": {
|
||||
"prefix": "array",
|
||||
"body": "\\$${1:arrayName} = array('$2' => $3${4:,} $0);",
|
||||
"description": "Array initializer"
|
||||
},
|
||||
"$… = […]": {
|
||||
"prefix": "shorray",
|
||||
"body": "\\$${1:arrayName} = ['$2' => $3${4:,} $0];",
|
||||
"description": "Array initializer"
|
||||
},
|
||||
"… => …": {
|
||||
"prefix": "keyval",
|
||||
"body": "'$1' => $2${3:,} $0",
|
||||
"description": "Key-Value initializer"
|
||||
},
|
||||
"switch …": {
|
||||
"prefix": "switch",
|
||||
"body": [
|
||||
"switch (\\$${1:variable}) {",
|
||||
"\tcase '${2:value}':",
|
||||
"\t\t${3:# code...}",
|
||||
"\t\tbreak;",
|
||||
"\t$0",
|
||||
"\tdefault:",
|
||||
"\t\t${4:# code...}",
|
||||
"\t\tbreak;",
|
||||
"}"
|
||||
],
|
||||
"description": "Switch block"
|
||||
},
|
||||
"case …": {
|
||||
"prefix": "case",
|
||||
"body": ["case '${1:value}':", "\t${0:# code...}", "\tbreak;"],
|
||||
"description": "Case Block"
|
||||
},
|
||||
"$this->…": {
|
||||
"prefix": "this",
|
||||
"body": "\\$this->$0;",
|
||||
"description": "$this->..."
|
||||
},
|
||||
"echo $this->…": {
|
||||
"prefix": "ethis",
|
||||
"body": "echo \\$this->$0;",
|
||||
"description": "Echo this"
|
||||
},
|
||||
"Throw Exception": {
|
||||
"prefix": "throw",
|
||||
"body": [
|
||||
"throw new $1Exception(${2:\"${3:Error Processing Request}\"}${4:, ${5:1}});",
|
||||
"$0"
|
||||
],
|
||||
"description": "Throw exception"
|
||||
},
|
||||
"Region Start": {
|
||||
"prefix": "#region",
|
||||
"body": ["#region"],
|
||||
"description": "Folding Region Start"
|
||||
},
|
||||
"Region End": {
|
||||
"prefix": "#endregion",
|
||||
"body": ["#endregion"],
|
||||
"description": "Folding Region End"
|
||||
},
|
||||
"Try Catch Block": {
|
||||
"prefix": "try",
|
||||
"body": [
|
||||
"try {",
|
||||
"\t${1://code...}",
|
||||
"} catch (${2:\\Throwable} ${3:\\$th}) {",
|
||||
"\t${4://throw \\$th;}",
|
||||
"}"
|
||||
],
|
||||
"description": "Try catch block"
|
||||
}
|
||||
}
|
||||
209
dot_vim/plugged/friendly-snippets/snippets/plantuml.json
Normal file
209
dot_vim/plugged/friendly-snippets/snippets/plantuml.json
Normal file
@@ -0,0 +1,209 @@
|
||||
{
|
||||
"Activity": {
|
||||
"prefix": "act",
|
||||
"body": "\"$1\"",
|
||||
"description": "Describe the activity being done"
|
||||
},
|
||||
"Actor": {
|
||||
"prefix": "act",
|
||||
"body": "actor $0",
|
||||
"description": "An actor in the system"
|
||||
},
|
||||
"Aggregation": {
|
||||
"prefix": "ag",
|
||||
"body": " o-- $1 $2",
|
||||
"description": "An object aggregates X number of other objects"
|
||||
},
|
||||
"Arrow-down": {
|
||||
"prefix": "down",
|
||||
"body": " -down-> ",
|
||||
"description": [
|
||||
"down arrow, format: box -down-> box 2 (it will point downwards to the box 2"
|
||||
]
|
||||
},
|
||||
"Arrow-left": {
|
||||
"prefix": "la",
|
||||
"body": " -left-> ",
|
||||
"description": [
|
||||
"left arrow, format: box -left-> box 2 (it will point left towards the box 2"
|
||||
]
|
||||
},
|
||||
"Arrow-right": {
|
||||
"prefix": "ra",
|
||||
"body": " -right-> ",
|
||||
"description": [
|
||||
"Right arrow, format: box -right-> box 2 (it will point right towards the box 2"
|
||||
]
|
||||
},
|
||||
"Arrow-up": {
|
||||
"prefix": "up",
|
||||
"body": " -up-> ",
|
||||
"description": [
|
||||
"Up arrow, format: box -up-> box 2 (it will point upwards to the box 2"
|
||||
]
|
||||
},
|
||||
"Block comment": {
|
||||
"prefix": "block",
|
||||
"body": "/'\n' $1\n'/",
|
||||
"description": "Places a block comment in the document"
|
||||
},
|
||||
"Boundary": {
|
||||
"prefix": "bound",
|
||||
"body": "boundary $0",
|
||||
"description": "Model a boundary of the system"
|
||||
},
|
||||
"Class": {
|
||||
"prefix": "cla",
|
||||
"body": "class $1 {\n$2\n}\n",
|
||||
"description": "Class Object where fields are defined: \n public (+)\n private (-)\n protected (#) \n package (~).\n\nFunctions can also be named here ex:\n +funcName()"
|
||||
},
|
||||
"Cloud": {
|
||||
"prefix": "cl",
|
||||
"body": "cloud $1",
|
||||
"description": "Model the cloud servers"
|
||||
},
|
||||
"Constant": {
|
||||
"prefix": "const",
|
||||
"body": "!define $1 $2",
|
||||
"description": "$1 is param name, $2 is param value"
|
||||
},
|
||||
"Control": {
|
||||
"prefix": "ctrl",
|
||||
"body": "control $0",
|
||||
"description": "Models a loop back for control"
|
||||
},
|
||||
"Composition": {
|
||||
"prefix": "com",
|
||||
"body": " *-- $1",
|
||||
"description": "Model an object composition"
|
||||
},
|
||||
"Database": {
|
||||
"prefix": "db",
|
||||
"body": "database $0",
|
||||
"description": "Models a Database (depicted as a cylinder)"
|
||||
},
|
||||
"Dotted aggregation": {
|
||||
"prefix": "ag",
|
||||
"body": " o.. $1 $2",
|
||||
"description": "An object aggregates X number of other objects"
|
||||
},
|
||||
"Dotted composition": {
|
||||
"prefix": "dcom",
|
||||
"body": " *.. $1",
|
||||
"description": "Model an object composition"
|
||||
},
|
||||
"Dotted extension": {
|
||||
"prefix": "dext",
|
||||
"body": " <|.. $1",
|
||||
"description": "Arrow for object extends another object"
|
||||
},
|
||||
"Entity": {
|
||||
"prefix": "ent",
|
||||
"body": "entity $0",
|
||||
"description": "Models an entity of the system"
|
||||
},
|
||||
"Example": {
|
||||
"prefix": "example",
|
||||
"body": ["@startuml\nAlice -> Bob\nBob -> Alice\n@enduml"],
|
||||
"description": "Simple example to get started with PlantUML"
|
||||
},
|
||||
"Extend Arrow (left)": {
|
||||
"prefix": "lext",
|
||||
"body": " ..> $1",
|
||||
"description": "Extend, Include"
|
||||
},
|
||||
"Extend Arrow (Right)": {
|
||||
"prefix": "rext",
|
||||
"body": " <.. $1",
|
||||
"description": "Extend, Include"
|
||||
},
|
||||
"Extension": {
|
||||
"prefix": "ext",
|
||||
"body": " <|-- $1",
|
||||
"description": "Arrow for object extends another object"
|
||||
},
|
||||
"Folder": {
|
||||
"prefix": "fol",
|
||||
"body": "folder $1",
|
||||
"description": "A folder for project organization"
|
||||
},
|
||||
"Frame": {
|
||||
"prefix": "frame",
|
||||
"body": "frame $1",
|
||||
"description": "A frame of the components"
|
||||
},
|
||||
"If-else": {
|
||||
"prefix": "if",
|
||||
"body": ["if $1 then\n->[ok] $2\nelse\n -->[$3]\nendif\n"]
|
||||
},
|
||||
"Initial State activity": {
|
||||
"prefix": "init-state",
|
||||
"body": "(*) -> $1",
|
||||
"description": "Model an initial starting point for the activity diagram"
|
||||
},
|
||||
"Node": {
|
||||
"prefix": "no",
|
||||
"body": "node $1",
|
||||
"description": "A cube modelling a node in the system"
|
||||
},
|
||||
"Note left": {
|
||||
"prefix": "note-lf",
|
||||
"body": "note left : $0",
|
||||
"description": "A note that appears on the left"
|
||||
},
|
||||
"Note right": {
|
||||
"prefix": "note-rt",
|
||||
"body": "note right : $0",
|
||||
"description": "A note that appears on the right"
|
||||
},
|
||||
"Object": {
|
||||
"prefix": "ob",
|
||||
"body": "object $1 {\n$2\n}\n",
|
||||
"description": "A default Object"
|
||||
},
|
||||
"Package": {
|
||||
"prefix": "pa",
|
||||
"body": ["package $1 {\n$2\n}\n"],
|
||||
"description": "Package UML structure"
|
||||
},
|
||||
"Sequence Message": {
|
||||
"prefix": "mess",
|
||||
"body": "$1 -> $2",
|
||||
"description": "An arrow for the message sent on a Sequence diagram"
|
||||
},
|
||||
"Sequence Return": {
|
||||
"prefix": "ret",
|
||||
"body": "$1 <-- $2",
|
||||
"description": "An arrow for the message return on a Sequence diagram"
|
||||
},
|
||||
"State Final": {
|
||||
"prefix": "sfinal",
|
||||
"body": " --> [*]",
|
||||
"description": "Describe the final state of objects"
|
||||
},
|
||||
"State Initial": {
|
||||
"prefix": "sinit",
|
||||
"body": "[*] --> ",
|
||||
"description": "Describe the initial state of objects"
|
||||
},
|
||||
"Title": {
|
||||
"prefix": "ti",
|
||||
"body": "title $0",
|
||||
"description": "The document title"
|
||||
},
|
||||
"Start Uml Template": {
|
||||
"prefix": "startuml",
|
||||
"body": "@startuml\n $1\n@enduml",
|
||||
"description": "Inside $1 begin defining your diagram"
|
||||
},
|
||||
"Use Arrow (left)": {
|
||||
"prefix": ">",
|
||||
"body": " --> $1",
|
||||
"description": "Object A uses -> () <That is our use case notation to the left>"
|
||||
},
|
||||
"Use Arrow (Right)": {
|
||||
"prefix": "<",
|
||||
"body": " <-- $1",
|
||||
"description": "Object A uses -> () <That is our use case notation to the left>"
|
||||
}
|
||||
}
|
||||
173
dot_vim/plugged/friendly-snippets/snippets/python/base.json
Normal file
173
dot_vim/plugged/friendly-snippets/snippets/python/base.json
Normal file
@@ -0,0 +1,173 @@
|
||||
{
|
||||
"#!/usr/bin/env python": {
|
||||
"prefix": "env",
|
||||
"body": "#!/usr/bin/env python\n$0",
|
||||
"description": "Adds shebang line for default python interpreter."
|
||||
},
|
||||
"#!/usr/bin/env python3": {
|
||||
"prefix": "env3",
|
||||
"body": "#!/usr/bin/env python3\n$0",
|
||||
"description": "Adds shebang line for default python 3 interpreter."
|
||||
},
|
||||
"# -*- coding=utf-8 -*-": {
|
||||
"prefix": "enc",
|
||||
"body": "# -*- coding=utf-8 -*-\n$0",
|
||||
"description": "set default python2.x encoding specification to utf-8 as it is mentioned in pep-0263."
|
||||
},
|
||||
"# coding=utf-8": {
|
||||
"prefix": "enco",
|
||||
"body": "# coding=utf-8\n$0",
|
||||
"description": "Set default python3 encoding specification to utf-8, by default this is the encoding for python3.x as it is mentioned in pep-3120."
|
||||
},
|
||||
"from future import ...": {
|
||||
"prefix": "fenc",
|
||||
"body": [
|
||||
"# -*- coding: utf-8 -*-",
|
||||
"from __future__ import absolute_import, division, print_function, unicode_literals"
|
||||
],
|
||||
"description": "Import future statement definitions for python2.x scripts using utf-8 as encoding."
|
||||
},
|
||||
"from future import ... v1": {
|
||||
"prefix": "fenco",
|
||||
"body": [
|
||||
"# coding: utf-8",
|
||||
"from __future__ import absolute_import, division, print_function, unicode_literals"
|
||||
],
|
||||
"description": "Import future statement definitions for python3.x scripts using utf-8 as encoding."
|
||||
},
|
||||
"import": {
|
||||
"prefix": "im",
|
||||
"body": "import ${1:package/module}$0",
|
||||
"description": "Import a package or module"
|
||||
},
|
||||
"from ... import ...": {
|
||||
"prefix": "fim",
|
||||
"body": "from ${1:package/module} import ${2:names}$0",
|
||||
"description": "Import statement that allows individual objects from the module to be imported directly into the caller’s symbol table."
|
||||
},
|
||||
"class": {
|
||||
"prefix": "class",
|
||||
"body": ["class ${1:classname}(${2:object}):", "\t${3:pass}"],
|
||||
"description": "Code snippet for a class definition"
|
||||
},
|
||||
"New class": {
|
||||
"prefix": "classi",
|
||||
"body": "class ${1:ClassName}(${2:object}):\n\t\"\"\"${3:docstring for $1.}\"\"\"\n\tdef __init__(self, ${4:arg}):\n\t\t${5:super($1, self).__init__()}\n\t\tself.arg = arg\n\t\t$0",
|
||||
"description": "Code snippet for a class definition."
|
||||
},
|
||||
"New method": {
|
||||
"prefix": "defs",
|
||||
"body": "def ${1:mname}(self, ${2:arg}):\n\t${3:pass}$0",
|
||||
"description": "Code snippet for a class method definition."
|
||||
},
|
||||
"New method w/ return": {
|
||||
"prefix": "defst",
|
||||
"body": "def ${1:mname}(self, ${2:arg}) -> ${3:return_type}:\n\t${4:pass}$0",
|
||||
"description": "Code snippet for a class method definition."
|
||||
},
|
||||
"New function": {
|
||||
"prefix": "def",
|
||||
"body": "def ${1:fname}(${2:arg}):\n\t${3:pass}$0",
|
||||
"description": "Code snippet for function definition."
|
||||
},
|
||||
"New function w/ return": {
|
||||
"prefix": "deft",
|
||||
"body": "def ${1:fname}(${2:arg}) -> ${3:return_type}:\n\t${4:pass}$0",
|
||||
"description": "Code snippet for function definition."
|
||||
},
|
||||
"New async function": {
|
||||
"prefix": "adef",
|
||||
"body": "async def ${1:fname}(${2:arg}):\n\t${3:pass}$0",
|
||||
"description": "Code snippet for async function definition."
|
||||
},
|
||||
"New property": {
|
||||
"prefix": "property",
|
||||
"body": "@property\ndef ${1:foo}(self):\n \"\"\"${2:The $1 property.}\"\"\"\n ${3:return self._$1}\n@${4:$1}.setter\ndef ${5:$1}(self, value):\n ${6:self._$1} = value",
|
||||
"description": "New property: get and set via decorator"
|
||||
},
|
||||
"if": {
|
||||
"prefix": "if",
|
||||
"body": "if ${1:condition}:\n\t${2:pass}$0",
|
||||
"description": "Code snippet for the if statement."
|
||||
},
|
||||
"if/else": {
|
||||
"prefix": "if/else",
|
||||
"body": ["if ${1:condition}:", "\t${2:pass}", "else:", "\t${3:pass}"],
|
||||
"description": "Code snippet for an if statement with else"
|
||||
},
|
||||
"elif": {
|
||||
"prefix": "elif",
|
||||
"body": ["elif ${1:expression}:", "\t${2:pass}"],
|
||||
"description": "Code snippet for an elif"
|
||||
},
|
||||
"else": {
|
||||
"prefix": "else",
|
||||
"body": ["else:", "\t${1:pass}"],
|
||||
"description": "Code snippet for an else"
|
||||
},
|
||||
"for": {
|
||||
"prefix": "for",
|
||||
"body": "for ${1:value} in ${2:iterable}:\n\t${3:pass}$0",
|
||||
"description": "Code snippet to create a for loop structure."
|
||||
},
|
||||
"for/else": {
|
||||
"prefix": "for/else",
|
||||
"body": [
|
||||
"for ${1:target_list} in ${2:expression_list}:",
|
||||
"\t${3:pass}",
|
||||
"else:",
|
||||
"\t${4:pass}"
|
||||
],
|
||||
"description": "Code snippet for a for loop with else"
|
||||
},
|
||||
"while": {
|
||||
"prefix": "while",
|
||||
"body": "while ${1:condition}:\n\t${2:pass}$0",
|
||||
"description": "Code snippet to create a while loop structure."
|
||||
},
|
||||
"while/else": {
|
||||
"prefix": "while/else",
|
||||
"body": ["while ${1:expression}:", "\t${2:pass}", "else:", "\t${3:pass}"],
|
||||
"description": "Code snippet for a while loop with else"
|
||||
},
|
||||
"try:except:": {
|
||||
"prefix": "try",
|
||||
"body": "try:\n\t${1:pass}\nexcept ${2:Exception} as ${3:e}:\n\t${4:raise $3}$0",
|
||||
"description": "Code Snippet for a try and except blocks."
|
||||
},
|
||||
"try:except:else:finally": {
|
||||
"prefix": "tryef",
|
||||
"body": "try:\n\t${1:pass}\nexcept${2: ${3:Exception} as ${4:e}}:\n\t${5:raise}\nelse:\n\t${6:pass}\nfinally:\n\t${7:pass}$0",
|
||||
"description": "Code Snippet for a try/except/finally with else statement."
|
||||
},
|
||||
"try:except:else": {
|
||||
"prefix": "trye",
|
||||
"body": "try:\n\t${1:pass}\nexcept ${2:Exception} as ${3:e}:\n\t${4:raise $3}\nelse:\n\t${5:pass}$0",
|
||||
"description": "Code Snippet for a try/except with else statement."
|
||||
},
|
||||
"try:except:finally": {
|
||||
"prefix": "tryf",
|
||||
"body": "try:\n\t${1:pass}\nexcept ${2:Exception} as ${3:e}:\n\t${4:raise $3}\nfinally:\n\t${5:pass}$0",
|
||||
"description": "Code Snippet for a try/except/finally."
|
||||
},
|
||||
"with": {
|
||||
"prefix": "with",
|
||||
"body": ["with ${1:expression} as ${2:target}:", "\t${3:pass}"],
|
||||
"description": "Code snippet for a with statement"
|
||||
},
|
||||
"self": {
|
||||
"prefix": ".",
|
||||
"body": "self.$0",
|
||||
"description": "Shortend snippet to reference the self property in an object."
|
||||
},
|
||||
"__magic__": {
|
||||
"prefix": "__",
|
||||
"body": "__${1:init}__$0",
|
||||
"description": "Code snippet to create magic methods."
|
||||
},
|
||||
"if __name__ == \"__main__\"": {
|
||||
"prefix": "ifmain",
|
||||
"body": "if __name__ == \"__main__\":\n\t${1:main()}$0",
|
||||
"description": "Create implicitly all the code at the top level using the __name__ special variable."
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
{
|
||||
"List comprehension": {
|
||||
"prefix": "lc",
|
||||
"body": "[${1:value} for ${2:value} in ${3:iterable}]$0",
|
||||
"description" : "List comprehension for creating a list based on existing lists."
|
||||
},
|
||||
"List comprehension if else": {
|
||||
"prefix": "lcie",
|
||||
"body": "[${1:value} if ${2:condition} else ${3:condition} for ${4:value} in ${5:iterable}]$0",
|
||||
"description" : "List comprehension for creating a list based on existing lists, with conditional if-else statement."
|
||||
},
|
||||
"List comprehension if filter": {
|
||||
"prefix": "lci",
|
||||
"body": "[${1:value} for ${2:value} in ${3:iterable} if ${4:condition}$0]",
|
||||
"description" : "List comprehension for creating a list based on existing lists, with conditional if statement."
|
||||
},
|
||||
"Dictionary comprehension": {
|
||||
"prefix": "dc",
|
||||
"body": "{${1:key}: ${2:value} for ${3:key}, ${4:value} in ${5:iterable}}$0",
|
||||
"description" : "Handy and faster way to create dictories based on existing dictionaries."
|
||||
},
|
||||
"Dictionary comprehension if filter": {
|
||||
"prefix": "dci",
|
||||
"body": "{${1:key}: ${2:value} for ${3:key}, ${4:value} in ${5:iterable} if ${6:condition}}$0",
|
||||
"description" : "Handy and faster way to create dictories based on existing dictionaries, with conditional if statement."
|
||||
},
|
||||
"Set comprehension": {
|
||||
"prefix": "sc",
|
||||
"body": "{${1:value} for ${2:value} in ${3:iterable}}$0",
|
||||
"description" : "Create a set based on existing iterables."
|
||||
},
|
||||
"Set Comprehension if filter": {
|
||||
"prefix": "sci",
|
||||
"body": "{${1:value} for ${2:value} in ${3:iterable} if ${4:condition}}$0",
|
||||
"description" : "Create a set based on existing iterables, with condition if statement."
|
||||
},
|
||||
"Generator comprehension": {
|
||||
"prefix": "gc",
|
||||
"body": "(${1:key} for ${2:value} in ${3:iterable})$0",
|
||||
"description" : "Create a generator based on existing iterables."
|
||||
},
|
||||
"Generator comprehension if filter": {
|
||||
"prefix": "gci",
|
||||
"body": "(${1:key} for ${2:value} in ${3:iterable} if ${4:condition})$0",
|
||||
"description" : "Create a generator based on existing iterables, with condition if statement."
|
||||
}
|
||||
}
|
||||
34
dot_vim/plugged/friendly-snippets/snippets/python/debug.json
Normal file
34
dot_vim/plugged/friendly-snippets/snippets/python/debug.json
Normal file
@@ -0,0 +1,34 @@
|
||||
{
|
||||
"PDB set trace": {
|
||||
"prefix": "pdb",
|
||||
"body": "__import__('pdb').set_trace()$0",
|
||||
"description": "Code snippet for pdb debug"
|
||||
},
|
||||
"iPDB set trace": {
|
||||
"prefix": "ipdb",
|
||||
"body": "__import__('ipdb').set_trace()$0",
|
||||
"description": "Code snippet for ipdb debug"
|
||||
},
|
||||
"rPDB set trace": {
|
||||
"prefix": "rpdb",
|
||||
"body": "import rpdb2; rpdb2.start_embedded_debugger('${1:debug_password}')$0"
|
||||
},
|
||||
"PuDB set trace": {
|
||||
"prefix": "pudb",
|
||||
"body": "import pudb; pudb.set_trace()$0",
|
||||
"description": "Code snippet for pudb debug"
|
||||
},
|
||||
"IPython set trace": {
|
||||
"prefix": "ipydb",
|
||||
"body": "from IPython import embed; embed()$0"
|
||||
},
|
||||
"Celery set trace": {
|
||||
"prefix": "rdb",
|
||||
"body": "from celery.contrib import rdb; rdb.set_trace()$0",
|
||||
"description": "Code snippet for celery remote debugger breakpoint"
|
||||
},
|
||||
"Pretty print": {
|
||||
"prefix": "pprint",
|
||||
"body": "__import__('pprint').pprint(${1:expression})$0"
|
||||
}
|
||||
}
|
||||
122
dot_vim/plugged/friendly-snippets/snippets/python/python.json
Normal file
122
dot_vim/plugged/friendly-snippets/snippets/python/python.json
Normal file
@@ -0,0 +1,122 @@
|
||||
{
|
||||
"try/except": {
|
||||
"prefix": "try/except",
|
||||
"body": [
|
||||
"try:",
|
||||
"\t${1:pass}",
|
||||
"except ${2:expression} as ${3:identifier}:",
|
||||
"\t${4:pass}"
|
||||
],
|
||||
"description": "Code snippet for a try/except statement"
|
||||
},
|
||||
"try/finally": {
|
||||
"prefix": "try/finally",
|
||||
"body": ["try:", "\t${1:pass}", "finally:", "\t${2:pass}"],
|
||||
"description": "Code snippet for a try/finally statement"
|
||||
},
|
||||
"try/except/else": {
|
||||
"prefix": "try/except/else",
|
||||
"body": [
|
||||
"try:",
|
||||
"\t${1:pass}",
|
||||
"except ${2:expression} as ${3:identifier}:",
|
||||
"\t${4:pass}",
|
||||
"else:",
|
||||
"\t${5:pass}"
|
||||
],
|
||||
"description": "Code snippet for a try/except/else statement"
|
||||
},
|
||||
"try/except/finally": {
|
||||
"prefix": "try/except/finally",
|
||||
"body": [
|
||||
"try:",
|
||||
"\t${1:pass}",
|
||||
"except ${2:expression} as ${3:identifier}:",
|
||||
"\t${4:pass}",
|
||||
"finally:",
|
||||
"\t${5:pass}"
|
||||
],
|
||||
"description": "Code snippet for a try/except/finally statement"
|
||||
},
|
||||
"try/except/else/finally": {
|
||||
"prefix": "try/except/else/finally",
|
||||
"body": [
|
||||
"try:",
|
||||
"\t${1:pass}",
|
||||
"except ${2:expression} as ${3:identifier}:",
|
||||
"\t${4:pass}",
|
||||
"else:",
|
||||
"\t${5:pass}",
|
||||
"finally:",
|
||||
"\t${6:pass}"
|
||||
],
|
||||
"description": "Code snippet for a try/except/else/finally statement"
|
||||
},
|
||||
"def(class method)": {
|
||||
"prefix": "def class method",
|
||||
"body": ["def ${1:funcname}(self, ${2:parameter_list}):", "\t${3:pass}"],
|
||||
"description": "Code snippet for a class method"
|
||||
},
|
||||
"def(static class method)": {
|
||||
"prefix": "def static class method",
|
||||
"body": [
|
||||
"@staticmethod",
|
||||
"def ${1:funcname}(${2:parameter_list}):",
|
||||
"\t${3:pass}"
|
||||
],
|
||||
"description": "Code snippet for a static class method"
|
||||
},
|
||||
"def(abstract class method)": {
|
||||
"prefix": "def abstract class method",
|
||||
"body": [
|
||||
"def ${1:funcname}(self, ${2:parameter_list}):",
|
||||
"\traise NotImplementedError"
|
||||
],
|
||||
"description": "Code snippet for an abstract class method"
|
||||
},
|
||||
"lambda": {
|
||||
"prefix": "lambda",
|
||||
"body": ["lambda ${1:parameter_list}: ${2:expression}"],
|
||||
"description": "Code snippet for a lambda statement"
|
||||
},
|
||||
"if(main)": {
|
||||
"prefix": "__main__",
|
||||
"body": ["if __name__ == \"__main__\":", " ${1:pass}"],
|
||||
"description": "Code snippet for a `if __name__ == \"__main__\": ...` block"
|
||||
},
|
||||
"async/def": {
|
||||
"prefix": "async/def",
|
||||
"body": ["async def ${1:funcname}(${2:parameter_list}):", "\t${3:pass}"],
|
||||
"description": "Code snippet for an async statement"
|
||||
},
|
||||
"async/for": {
|
||||
"prefix": "async/for",
|
||||
"body": ["async for ${1:target} in ${2:iter}:", "\t${3:block}"],
|
||||
"description": "Code snippet for an async for statement"
|
||||
},
|
||||
"async/for/else": {
|
||||
"prefix": "async/for/else",
|
||||
"body": [
|
||||
"async for ${1:target} in ${2:iter}:",
|
||||
"\t${3:block}",
|
||||
"else:",
|
||||
"\t${4:block}"
|
||||
],
|
||||
"description": "Code snippet for an async for statement with else"
|
||||
},
|
||||
"async/with": {
|
||||
"prefix": "async/with",
|
||||
"body": ["async with ${1:expr} as ${2:var}:", "\t${3:block}"],
|
||||
"description": "Code snippet for an async with statement"
|
||||
},
|
||||
"add/new/cell": {
|
||||
"prefix": "add/new/cell",
|
||||
"body": "# %%",
|
||||
"description": "Code snippet to add a new cell"
|
||||
},
|
||||
"mark/markdown": {
|
||||
"prefix": "mark/markdown",
|
||||
"body": "# %% [markdown]",
|
||||
"description": "Code snippet to add a new markdown cell"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
{
|
||||
"Assert equal": {
|
||||
"prefix": "ase",
|
||||
"body": "self.assertEqual(${1:expected}, ${2:actual}${3:, '${4:message}'})$0"
|
||||
},
|
||||
"Assert not equal": {
|
||||
"prefix": "asne",
|
||||
"body": "self.assertNotEqual(${1:expected}, ${2:actual}${3:, '${4:message}'})$0"
|
||||
},
|
||||
"Assert raises": {
|
||||
"prefix": "asr",
|
||||
"body": "self.assertRaises(${1:exception}, ${2:callable}, ${3:args})$0"
|
||||
},
|
||||
"Assert True": {
|
||||
"prefix": "ast",
|
||||
"body": "self.assertTrue(${1:actual}${2:, '${3:message}'})$0"
|
||||
},
|
||||
"Assert False": {
|
||||
"prefix": "asf",
|
||||
"body": "self.assertFalse(${1:actual}${2:, '${3:message}'})$0"
|
||||
},
|
||||
"Assert is": {
|
||||
"prefix": "asi",
|
||||
"body": "self.assertIs(${1:expected}, ${2:actual}${3:, '${4:message}'})$0"
|
||||
},
|
||||
"Assert is not": {
|
||||
"prefix": "asint",
|
||||
"body": "self.assertIsNot(${1:expected}, ${2:actual}${3:, '${4:message}'})$0"
|
||||
},
|
||||
"Assert is None": {
|
||||
"prefix": "asino",
|
||||
"body": "self.assertIsNone(${1:actual}${2:, '${3:message}'})$0"
|
||||
},
|
||||
"Assert is not None": {
|
||||
"prefix": "asinno",
|
||||
"body": "self.assertIsNotNone(${1:actual}${2:, '${3:message}'})$0"
|
||||
},
|
||||
"Assert in": {
|
||||
"prefix": "asin",
|
||||
"body": "self.assertIn(${1:needle}, ${2:haystack}${3:, '${4:message}'})$0"
|
||||
},
|
||||
"Assert not in": {
|
||||
"prefix": "asni",
|
||||
"body": "self.assertNotIn(${1:needle}, ${2:haystack}${3:, '${4:message}'})$0"
|
||||
},
|
||||
"Assert": {
|
||||
"prefix": "as",
|
||||
"body": "self.assert_(${1:boolean expression}${2:, '${3:message}'})$0"
|
||||
},
|
||||
"Fail (a test)": {
|
||||
"prefix": "fail",
|
||||
"body": "self.fail('${1:message}')$0"
|
||||
}
|
||||
}
|
||||
128
dot_vim/plugged/friendly-snippets/snippets/quarto.json
Normal file
128
dot_vim/plugged/friendly-snippets/snippets/quarto.json
Normal file
@@ -0,0 +1,128 @@
|
||||
{
|
||||
"Insert bold text": {
|
||||
"prefix": "bold",
|
||||
"body": "**${1:${TM_SELECTED_TEXT}}**$0",
|
||||
"description": "Insert bold text"
|
||||
},
|
||||
"Insert italic text": {
|
||||
"prefix": "italic",
|
||||
"body": "*${1:${TM_SELECTED_TEXT}}*$0",
|
||||
"description": "Insert italic text"
|
||||
},
|
||||
"Insert quoted text": {
|
||||
"prefix": "quote",
|
||||
"body": "> ${1:${TM_SELECTED_TEXT}}",
|
||||
"description": "Insert quoted text"
|
||||
},
|
||||
"Insert inline code": {
|
||||
"prefix": "code",
|
||||
"body": "`${1:${TM_SELECTED_TEXT}}`$0",
|
||||
"description": "Insert inline code"
|
||||
},
|
||||
"Insert shortcode": {
|
||||
"prefix": "shortcode",
|
||||
"body": "{{< $0 >}}",
|
||||
"description": "Insert shortcode"
|
||||
},
|
||||
"Insert fenced code block": {
|
||||
"prefix": "fenced codeblock",
|
||||
"body": [
|
||||
"```${1|python,c,c++,c#,ruby,go,java,php,htm,css,javascript,json,markdown,console|}",
|
||||
"${TM_SELECTED_TEXT}$0",
|
||||
"```"
|
||||
],
|
||||
"description": "Insert fenced code block"
|
||||
},
|
||||
"Insert executable code block": {
|
||||
"prefix": "executable codeblock",
|
||||
"body": [
|
||||
"```{${1|python,r,julia,ojs,sql,bash|}}",
|
||||
"${TM_SELECTED_TEXT}$0",
|
||||
"```"
|
||||
],
|
||||
"description": "Insert executable code block"
|
||||
},
|
||||
"Insert raw code block": {
|
||||
"prefix": "raw codeblock",
|
||||
"body": [
|
||||
"```{${1|html,latex,openxml,opendocument,asciidoc,docbook,markdown,dokuwiki,fb2,gfm,haddock,icml,ipynb,jats,jira,json,man,mediawiki,ms,muse,opml,org,plain,rst,rtf,tei,texinfo,textile,xwiki,zimwiki,native|}}",
|
||||
"${TM_SELECTED_TEXT}$0",
|
||||
"```"
|
||||
],
|
||||
"description": "Insert raw code block"
|
||||
},
|
||||
"Insert heading level 1": {
|
||||
"prefix": "heading1",
|
||||
"body": "# ${1:${TM_SELECTED_TEXT}}",
|
||||
"description": "Insert heading level 1"
|
||||
},
|
||||
"Insert heading level 2": {
|
||||
"prefix": "heading2",
|
||||
"body": "## ${1:${TM_SELECTED_TEXT}}",
|
||||
"description": "Insert heading level 2"
|
||||
},
|
||||
"Insert heading level 3": {
|
||||
"prefix": "heading3",
|
||||
"body": "### ${1:${TM_SELECTED_TEXT}}",
|
||||
"description": "Insert heading level 3"
|
||||
},
|
||||
"Insert heading level 4": {
|
||||
"prefix": "heading4",
|
||||
"body": "#### ${1:${TM_SELECTED_TEXT}}",
|
||||
"description": "Insert heading level 4"
|
||||
},
|
||||
"Insert heading level 5": {
|
||||
"prefix": "heading5",
|
||||
"body": "##### ${1:${TM_SELECTED_TEXT}}",
|
||||
"description": "Insert heading level 5"
|
||||
},
|
||||
"Insert heading level 6": {
|
||||
"prefix": "heading6",
|
||||
"body": "###### ${1:${TM_SELECTED_TEXT}}",
|
||||
"description": "Insert heading level 6"
|
||||
},
|
||||
"Insert unordered list": {
|
||||
"prefix": "unordered list",
|
||||
"body": ["- ${1:first}", "- ${2:second}", "- ${3:third}", "$0"],
|
||||
"description": "Insert unordered list"
|
||||
},
|
||||
"Insert ordered list": {
|
||||
"prefix": "ordered list",
|
||||
"body": ["1. ${1:first}", "2. ${2:second}", "3. ${3:third}", "$0"],
|
||||
"description": "Insert ordered list"
|
||||
},
|
||||
"Insert horizontal rule": {
|
||||
"prefix": "horizontal rule",
|
||||
"body": "----------\n",
|
||||
"description": "Insert horizontal rule"
|
||||
},
|
||||
"Insert link": {
|
||||
"prefix": "link",
|
||||
"body": "[${TM_SELECTED_TEXT:${1:text}}](https://${2:link})$0",
|
||||
"description": "Insert link"
|
||||
},
|
||||
"Insert image": {
|
||||
"prefix": "image",
|
||||
"body": "$0",
|
||||
"description": "Insert image"
|
||||
},
|
||||
"Insert strikethrough": {
|
||||
"prefix": "strikethrough",
|
||||
"body": "~~${1:${TM_SELECTED_TEXT}}~~",
|
||||
"description": "Insert strikethrough"
|
||||
},
|
||||
"Insert div block": {
|
||||
"prefix": "div",
|
||||
"body": ["::: {.${1:class}}", "${TM_SELECTED_TEXT}$0", ":::"],
|
||||
"description": "Insert div block"
|
||||
},
|
||||
"Insert callout block": {
|
||||
"prefix": "callout",
|
||||
"body": [
|
||||
"::: {.${1|callout,callout-note,callout-tip,callout-important,callout-caution,callout-warning|}}",
|
||||
"${TM_SELECTED_TEXT}$0",
|
||||
":::"
|
||||
],
|
||||
"description": "Insert callout block"
|
||||
}
|
||||
}
|
||||
169
dot_vim/plugged/friendly-snippets/snippets/r.json
Normal file
169
dot_vim/plugged/friendly-snippets/snippets/r.json
Normal file
@@ -0,0 +1,169 @@
|
||||
{
|
||||
"library": {
|
||||
"prefix": "lib",
|
||||
"body": [
|
||||
"library(${1:package})"
|
||||
]
|
||||
},
|
||||
"require": {
|
||||
"prefix": "req",
|
||||
"body": [
|
||||
"require(${1:package})"
|
||||
]
|
||||
},
|
||||
"source": {
|
||||
"prefix": "src",
|
||||
"body": [
|
||||
"source(\"${1:file.R}\")"
|
||||
]
|
||||
},
|
||||
"return": {
|
||||
"prefix": "ret",
|
||||
"body": "return(${1:code})"
|
||||
},
|
||||
"matrix": {
|
||||
"prefix": "mat",
|
||||
"body": "matrix(${1:data}, nrow = ${2:rows}, ncol = ${3:cols})"
|
||||
},
|
||||
"setGeneric": {
|
||||
"prefix": "sg",
|
||||
"body": [
|
||||
"setGeneric(\"${1:generic}\", function(${2:x, ...}) {",
|
||||
" standardGeneric(\"${1:generic}\")",
|
||||
"})\n"
|
||||
]
|
||||
},
|
||||
"setMethod": {
|
||||
"prefix": "sm",
|
||||
"body": [
|
||||
"setMethod(\"${1:generic}\", ${2:class}, function(${2:x, ...}) {",
|
||||
" ${0}",
|
||||
"})\n"
|
||||
]
|
||||
},
|
||||
"setClass": {
|
||||
"prefix": "sc",
|
||||
"body": [
|
||||
"setClass(\"${1:Class}\", slots = c(${2:name = \"type\"}))\n"
|
||||
]
|
||||
},
|
||||
"if": {
|
||||
"prefix": "if",
|
||||
"body": [
|
||||
"if (${1:condition}) {",
|
||||
" ${0}",
|
||||
"}\n"
|
||||
]
|
||||
},
|
||||
"else": {
|
||||
"prefix": "el",
|
||||
"body": [
|
||||
"else {",
|
||||
" ${0}",
|
||||
"}\n"
|
||||
]
|
||||
},
|
||||
"else if": {
|
||||
"prefix": "ei",
|
||||
"body": [
|
||||
"else if (${1:condition}) {",
|
||||
" ${0}",
|
||||
"}\n"
|
||||
]
|
||||
},
|
||||
"function": {
|
||||
"prefix": "fun",
|
||||
"body": [
|
||||
"${1:name} <- function(${2:variables}) {",
|
||||
" ${0}",
|
||||
"}\n"
|
||||
]
|
||||
},
|
||||
"for": {
|
||||
"prefix": "for",
|
||||
"body": [
|
||||
"for (${1:variable} in ${2:vector}) {",
|
||||
" ${0}",
|
||||
"}\n"
|
||||
]
|
||||
},
|
||||
"while": {
|
||||
"prefix": "while",
|
||||
"body": [
|
||||
"while (${1:condition}) {",
|
||||
" ${0}",
|
||||
"}\n"
|
||||
]
|
||||
},
|
||||
"switch": {
|
||||
"prefix": "switch",
|
||||
"body": [
|
||||
"switch (${1:object},",
|
||||
" ${2:case} = ${3:action}",
|
||||
")\n"
|
||||
]
|
||||
},
|
||||
"apply": {
|
||||
"prefix": "apply",
|
||||
"body": "apply(${1:array}, ${2:margin}, ${3:...})"
|
||||
},
|
||||
"lapply": {
|
||||
"prefix": "lapply",
|
||||
"body": "lapply(${1:list}, ${2:function})"
|
||||
},
|
||||
"sapply": {
|
||||
"prefix": "sapply",
|
||||
"body": "sapply(${1:list}, ${2:function})"
|
||||
},
|
||||
"mapply": {
|
||||
"prefix": "mapply",
|
||||
"body": "mapply(${1:function}, ${2:...})"
|
||||
},
|
||||
"tapply": {
|
||||
"prefix": "tapply",
|
||||
"body": "tapply(${1:vector}, ${2:index}, ${3:function})"
|
||||
},
|
||||
"vapply": {
|
||||
"prefix": "vapply",
|
||||
"body": "vapply(${1:list}, ${2:function}, FUN.VALUE = ${3:type}, ${4:...})"
|
||||
},
|
||||
"rapply": {
|
||||
"prefix": "rapply",
|
||||
"body": "rapply(${1:list}, ${2:function})"
|
||||
},
|
||||
"timestamp": {
|
||||
"prefix": "ts",
|
||||
"body": "# ${CURRENT_DAY_NAME_SHORT} ${CURRENT_MONTH_NAME_SHORT} ${CURRENT_DATE} ${CURRENT_HOUR}:${CURRENT_MINUTE}:${CURRENT_SECOND} ${CURRENT_YEAR} ------------------------------\n"
|
||||
},
|
||||
"shinyapp": {
|
||||
"prefix": "shinyapp",
|
||||
"body": [
|
||||
"library(shiny)",
|
||||
"",
|
||||
"ui <- fluidPage(",
|
||||
" ${0}",
|
||||
")",
|
||||
"",
|
||||
"server <- function(input, output, session) {",
|
||||
" ",
|
||||
"}",
|
||||
"",
|
||||
"shinyApp(ui, server)\n"
|
||||
]
|
||||
},
|
||||
"shinymod": {
|
||||
"prefix": "shinymod",
|
||||
"body": [
|
||||
"${1:name}_UI <- function(id) {",
|
||||
" ns <- NS(id)",
|
||||
" tagList(",
|
||||
" ${0}",
|
||||
" )",
|
||||
"}",
|
||||
"",
|
||||
"${1:name} <- function(input, output, session) {",
|
||||
" ",
|
||||
"}\n"
|
||||
]
|
||||
}
|
||||
}
|
||||
217
dot_vim/plugged/friendly-snippets/snippets/rescript.json
Normal file
217
dot_vim/plugged/friendly-snippets/snippets/rescript.json
Normal file
@@ -0,0 +1,217 @@
|
||||
{
|
||||
"Module": {
|
||||
"prefix": ["module"],
|
||||
"body": [
|
||||
"module ${1:Name} = {",
|
||||
"\t${2:// Module contents}",
|
||||
"}"
|
||||
]
|
||||
},
|
||||
"Switch": {
|
||||
"prefix": ["switch"],
|
||||
"body": [
|
||||
"switch ${1:value} {",
|
||||
"| ${2:pattern1} => ${3:expression}",
|
||||
"${4:| ${5:pattern2} => ${6:expression}}",
|
||||
"}"
|
||||
]
|
||||
},
|
||||
"Try": {
|
||||
"prefix": ["try"],
|
||||
"body": [
|
||||
"try {",
|
||||
"\t${1:expression}",
|
||||
"} catch {",
|
||||
"| ${2:MyException} => ${3:expression}",
|
||||
"}"
|
||||
]
|
||||
},
|
||||
"For Loop": {
|
||||
"prefix": ["for"],
|
||||
"body": [
|
||||
"for ${1:i} in ${2:startValueInclusive} to ${3:endValueInclusive} {",
|
||||
"\t${4:Js.log(${1:i})}",
|
||||
"}"
|
||||
]
|
||||
},
|
||||
"Reverse For Loop": {
|
||||
"prefix": ["for"],
|
||||
"body": [
|
||||
"for ${1:i} in ${2:startValueInclusive} downto ${3:endValueInclusive} {",
|
||||
"\t${4:Js.log(${1:i})}",
|
||||
"}"
|
||||
]
|
||||
},
|
||||
"Global External Object": {
|
||||
"prefix": ["@bs", "external"],
|
||||
"body": [
|
||||
"@val external ${1:setTimeout}: ${2:(unit => unit, int) => float} = \"${3:setTimeout}\""
|
||||
]
|
||||
},
|
||||
"Global External Module": {
|
||||
"prefix": ["@bs", "external"],
|
||||
"body": [
|
||||
"@scope(\"${1:Math}\") @val external ${2:random}: ${3:unit => float} = \"${4:random}\""
|
||||
]
|
||||
},
|
||||
"JS Module External": {
|
||||
"prefix": ["@bs", "external"],
|
||||
"body": [
|
||||
"@module(\"${1:path}\") external ${2:dirname}: ${3:string => string} = \"${4:dirname}\""
|
||||
]
|
||||
},
|
||||
"JS Module Default External": {
|
||||
"prefix": ["@bs", "external"],
|
||||
"body": [
|
||||
"@module external ${1:leftPad}: ${2:(string, int) => string} = \"${3:leftPad}\""
|
||||
]
|
||||
},
|
||||
"variable": {
|
||||
"prefix": ["l", "let", "var"],
|
||||
"body": ["let ${1:x} = ${2:\"hello\"}"]
|
||||
},
|
||||
"mutable variable": {
|
||||
"prefix": ["lm", "letm", "mvar"],
|
||||
"body": ["let ${1:x} = ref(${2:\"hello\"})"]
|
||||
},
|
||||
"type": {
|
||||
"prefix": ["t", "tp", "type"],
|
||||
"body": ["type ${1:x} = ${2:int}"]
|
||||
},
|
||||
"type with generic": {
|
||||
"prefix": ["tpg", "typeg"],
|
||||
"body": ["type ${1:x}<'${2:a}> = ${3:int}"]
|
||||
},
|
||||
"type polimorphic variant": {
|
||||
"prefix": ["tpv", "typepv"],
|
||||
"body": ["type ${1:x} = [ #${2:one} | #${3:two} ]"]
|
||||
},
|
||||
"inline functin": {
|
||||
"prefix": ["fn"],
|
||||
"body": [
|
||||
"let ${1:name} = (${2}) => ${0}"
|
||||
]
|
||||
},
|
||||
"function": {
|
||||
"prefix": ["function"],
|
||||
"body": [
|
||||
"let ${1:doSomeStuff} = (${2}) => {",
|
||||
"\t${0}",
|
||||
"}"
|
||||
]
|
||||
},
|
||||
"pipe functions": {
|
||||
"prefix": ["fnpp", "funcpp", "pipe"],
|
||||
"body": [
|
||||
"${1:firstFunction}",
|
||||
"\t->${2:secondFunction}"
|
||||
]
|
||||
},
|
||||
"console.log": {
|
||||
"prefix": ["cl", "col"],
|
||||
"body": ["Js.log(${1:something})"]
|
||||
},
|
||||
"console.info": {
|
||||
"prefix": ["ci", "coi"],
|
||||
"body": ["Js.info(${1:something})"]
|
||||
},
|
||||
"console.warn": {
|
||||
"prefix": ["cw", "cow"],
|
||||
"body": ["Js.warn(${1:something})"]
|
||||
},
|
||||
"console.error": {
|
||||
"prefix": ["ce", "cer"],
|
||||
"body": ["Js.error(${1:something})"]
|
||||
},
|
||||
"console.trace": {
|
||||
"prefix": ["ct", "ctr"],
|
||||
"body": ["Js.trace(${1:something})"]
|
||||
},
|
||||
"console.timeStart": {
|
||||
"prefix": ["cts"],
|
||||
"body": ["Js.timeStart(${1:something})"]
|
||||
},
|
||||
"console.timeEnd": {
|
||||
"prefix": ["cte"],
|
||||
"body": ["Js.timeEnd(${1:something})"]
|
||||
},
|
||||
"Belt. fromString": {
|
||||
"prefix": ["bfs", "bfstr"],
|
||||
"body": ["Belt.Int.fromString(${1:10})"]
|
||||
},
|
||||
"Belt. toString": {
|
||||
"prefix": ["bts", "btstr"],
|
||||
"body": ["Belt.Int.toString(${1:10})"]
|
||||
},
|
||||
"if inline": {
|
||||
"prefix": ["ifi"],
|
||||
"body": ["if ${1:a} {${2:b}} else {${3:c}}"]
|
||||
},
|
||||
"Ternary operator": {
|
||||
"prefix": ["to"],
|
||||
"body": ["${1:a} ? ${2:b} : ${3:c}"]
|
||||
},
|
||||
"Object destructuring": {
|
||||
"prefix": ["dob"],
|
||||
"body": ["let {${1:a}} = ${2:data}"]
|
||||
},
|
||||
"Array destructuring": {
|
||||
"prefix": ["dar"],
|
||||
"body": ["let [${1:a}] = ${2:data}"]
|
||||
},
|
||||
"Raise exception": {
|
||||
"prefix": ["rs", "raise"],
|
||||
"body": ["raise(${1:SomeError}(${2:// write your text}))"]
|
||||
},
|
||||
"@genType": {
|
||||
"prefix": ["gt"],
|
||||
"body": ["@genType"]
|
||||
},
|
||||
"@genType import": {
|
||||
"prefix": ["gti"],
|
||||
"body": ["@genType.import(\"${1:./MyMath}\")"]
|
||||
},
|
||||
"@genType alias": {
|
||||
"prefix": ["gta"],
|
||||
"body": ["@genType.as(\"${1:CB}\")"]
|
||||
},
|
||||
"@@warning": {
|
||||
"prefix": ["@w"],
|
||||
"body": ["@@warning(\"${1:-27}\")"]
|
||||
},
|
||||
"alias": {
|
||||
"prefix": ["@a"],
|
||||
"body": ["@as(\"${1:aria-label}\")"]
|
||||
},
|
||||
"compiler deprecation warn": {
|
||||
"prefix": ["@dw"],
|
||||
"body": [
|
||||
"@deprecated(\"${1:This field deprecated}. Use ${2:something} instead\")"
|
||||
]
|
||||
},
|
||||
"Top level js embed": {
|
||||
"prefix": ["tle", "tlr"],
|
||||
"body": [
|
||||
"%%raw(`",
|
||||
"\t${1://js code}",
|
||||
"`)"
|
||||
]
|
||||
},
|
||||
"expression level js embed": {
|
||||
"prefix": ["ele", "exe", "elr"],
|
||||
"body": ["%raw(\"${1://js expression}\")"]
|
||||
},
|
||||
"js debugger": {
|
||||
"prefix": ["dbg"],
|
||||
"body": ["%%debugger"]
|
||||
},
|
||||
"React Component": {
|
||||
"prefix": ["react.component", "@react"],
|
||||
"body": [
|
||||
"@react.component",
|
||||
"let make = (${1}) => {",
|
||||
"\t${2}",
|
||||
"}"
|
||||
]
|
||||
}
|
||||
}
|
||||
40
dot_vim/plugged/friendly-snippets/snippets/rmarkdown.json
Normal file
40
dot_vim/plugged/friendly-snippets/snippets/rmarkdown.json
Normal file
@@ -0,0 +1,40 @@
|
||||
{
|
||||
"YAML Header": {
|
||||
"prefix": "---",
|
||||
"body": [
|
||||
"---",
|
||||
"title: ${1:title}",
|
||||
"date: ${2:\"`r Sys.Date()`\"}",
|
||||
"output: ${4:pdf_document}",
|
||||
"---"
|
||||
]
|
||||
},
|
||||
"Insert Block Chunck": {
|
||||
"prefix": "```",
|
||||
"body": [
|
||||
"```{r}",
|
||||
"${1}",
|
||||
"```"
|
||||
]
|
||||
},
|
||||
"Insert Inline Chunck": {
|
||||
"prefix": "`",
|
||||
"body": "`r ${0}`"
|
||||
},
|
||||
"Insert Code Language": {
|
||||
"prefix": "```",
|
||||
"body": [
|
||||
"```{${1:lang}}",
|
||||
"${0}",
|
||||
"```"
|
||||
]
|
||||
},
|
||||
"Insert Block Equation": {
|
||||
"prefix": "$$",
|
||||
"body": [
|
||||
"\\$$",
|
||||
"${0}",
|
||||
"\\$$"
|
||||
]
|
||||
}
|
||||
}
|
||||
440
dot_vim/plugged/friendly-snippets/snippets/ruby.json
Normal file
440
dot_vim/plugged/friendly-snippets/snippets/ruby.json
Normal file
@@ -0,0 +1,440 @@
|
||||
{
|
||||
"Exception block": {
|
||||
"prefix": "begin",
|
||||
"body": [
|
||||
"begin",
|
||||
"\t$1",
|
||||
"rescue => exception",
|
||||
"\t",
|
||||
"end"
|
||||
]
|
||||
},
|
||||
"Exception block with ensure": {
|
||||
"prefix": "begin ensure",
|
||||
"body": [
|
||||
"begin",
|
||||
"\t$1",
|
||||
"rescue => exception",
|
||||
"\t",
|
||||
"ensure",
|
||||
"\t",
|
||||
"end"
|
||||
]
|
||||
},
|
||||
"Exception block with else and ensure": {
|
||||
"prefix": "begin",
|
||||
"body": [
|
||||
"begin",
|
||||
"\t$1",
|
||||
"rescue => exception",
|
||||
"\t",
|
||||
"else",
|
||||
"\t",
|
||||
"ensure",
|
||||
"\t",
|
||||
"end"
|
||||
]
|
||||
},
|
||||
"Class definition with initialize": {
|
||||
"prefix": "class init",
|
||||
"body": [
|
||||
"class ${1:ClassName}",
|
||||
"\tdef initialize",
|
||||
"\t\t$0",
|
||||
"\tend",
|
||||
"end"
|
||||
]
|
||||
},
|
||||
"Class definition": {
|
||||
"prefix": "class",
|
||||
"body": [
|
||||
"class ${1:ClassName}",
|
||||
"\t$0",
|
||||
"end"
|
||||
]
|
||||
},
|
||||
"for loop": {
|
||||
"prefix": "for",
|
||||
"body": [
|
||||
"for ${1:value} in ${2:enumerable} do",
|
||||
"\t$0",
|
||||
"end"
|
||||
]
|
||||
},
|
||||
"if": {
|
||||
"prefix": "if",
|
||||
"body": [
|
||||
"if ${1:test}",
|
||||
"\t$0",
|
||||
"end"
|
||||
]
|
||||
},
|
||||
"if else": {
|
||||
"prefix": "ife",
|
||||
"body": [
|
||||
"if ${1:test}",
|
||||
"\t$0",
|
||||
"else",
|
||||
"\t",
|
||||
"end"
|
||||
]
|
||||
},
|
||||
"if elsif": {
|
||||
"prefix": "ifei",
|
||||
"body": [
|
||||
"if ${1:test}",
|
||||
"\t$0",
|
||||
"elsif ",
|
||||
"\t",
|
||||
"end"
|
||||
]
|
||||
},
|
||||
"if elsif else": {
|
||||
"prefix": "ifee",
|
||||
"body": [
|
||||
"if ${1:test}",
|
||||
"\t$0",
|
||||
"elsif ",
|
||||
"\t",
|
||||
"else",
|
||||
"\t",
|
||||
"end"
|
||||
]
|
||||
},
|
||||
"case": {
|
||||
"prefix": "case",
|
||||
"body": [
|
||||
"case ${1:test}",
|
||||
"when $2",
|
||||
"\t$3",
|
||||
"when $4",
|
||||
"\t$5",
|
||||
"else",
|
||||
"\t$6",
|
||||
"end"
|
||||
]
|
||||
},
|
||||
"forever loop": {
|
||||
"prefix": "loop",
|
||||
"body": [
|
||||
"loop do",
|
||||
"\t$0",
|
||||
"end"
|
||||
]
|
||||
},
|
||||
"Module definition": {
|
||||
"prefix": "module",
|
||||
"body": [
|
||||
"module ${1:ModuleName}",
|
||||
"\t$0",
|
||||
"end"
|
||||
]
|
||||
},
|
||||
"unless": {
|
||||
"prefix": "unless",
|
||||
"body": [
|
||||
"unless ${1:test}",
|
||||
"\t$0",
|
||||
"end"
|
||||
]
|
||||
},
|
||||
"until loop": {
|
||||
"prefix": "until",
|
||||
"body": [
|
||||
"until ${1:test}",
|
||||
"\t$0",
|
||||
"end"
|
||||
]
|
||||
},
|
||||
"while loop": {
|
||||
"prefix": "while",
|
||||
"body": [
|
||||
"while ${1:test}",
|
||||
"\t$0",
|
||||
"end"
|
||||
]
|
||||
},
|
||||
"method definition": {
|
||||
"prefix": "def",
|
||||
"body": [
|
||||
"def ${1:method_name}",
|
||||
"\t$0",
|
||||
"end"
|
||||
]
|
||||
},
|
||||
"class method definition": {
|
||||
"prefix": "defs",
|
||||
"body": [
|
||||
"def self.${1:method_name}",
|
||||
"\t$0",
|
||||
"end"
|
||||
]
|
||||
},
|
||||
"initialize method definition": {
|
||||
"prefix": "definit",
|
||||
"body": [
|
||||
"def initialize(${1:args})",
|
||||
"\t$0",
|
||||
"end"
|
||||
]
|
||||
},
|
||||
"method_missing definition": {
|
||||
"prefix": "defmm",
|
||||
"body": [
|
||||
"def method_missing(meth, *args, &blk)",
|
||||
"\t$0",
|
||||
"end"
|
||||
]
|
||||
},
|
||||
"delegator definition": {
|
||||
"prefix": "defd",
|
||||
"body": "def_delegator :${1:@del_obj}, :${2:del_meth}, :${0:new_name}"
|
||||
},
|
||||
"alias method definition": {
|
||||
"prefix": "am",
|
||||
"body": "alias_method :${1:new_name}, :${0:old_name}"
|
||||
},
|
||||
"Rake Task": {
|
||||
"prefix": "rake",
|
||||
"description": "Create a Rake Task",
|
||||
"body": [
|
||||
"namespace :${1} do",
|
||||
"\tdesc \"${2}\"",
|
||||
"\ttask ${3}: :environment do",
|
||||
"\t\t${4}",
|
||||
"\tend",
|
||||
"end"
|
||||
]
|
||||
},
|
||||
"Insert do … end block": {
|
||||
"prefix": "do",
|
||||
"body": [
|
||||
"do",
|
||||
"\t$0",
|
||||
"end"
|
||||
]
|
||||
},
|
||||
"Insert do |variable| … end block": {
|
||||
"prefix": "dop",
|
||||
"body": [
|
||||
"do |${1:variable}|",
|
||||
"\t$0",
|
||||
"end"
|
||||
]
|
||||
},
|
||||
"Insert curly braces block": {
|
||||
"prefix": [
|
||||
"{p",
|
||||
"{P"
|
||||
],
|
||||
"body": "{ ${1:|${2:variable}| }$0 "
|
||||
},
|
||||
"Insert encoding comment": {
|
||||
"prefix": "enc",
|
||||
"body": "# encoding: utf-8$0"
|
||||
},
|
||||
"Insert frozen literal string": {
|
||||
"prefix": "frozen",
|
||||
"body": "# frozen_string_literal: true$0"
|
||||
},
|
||||
"Insert require": {
|
||||
"prefix": "req",
|
||||
"body": "require '${1}'$0"
|
||||
},
|
||||
"Insert require_relative": {
|
||||
"prefix": "reqr",
|
||||
"body": "require_relative '${1}'$0"
|
||||
},
|
||||
"Insert attr_reader": {
|
||||
"prefix": "r",
|
||||
"body": "attr_reader :${0:attr_names}"
|
||||
},
|
||||
"Insert attr_writer": {
|
||||
"prefix": "w",
|
||||
"body": "attr_writer :${0:attr_names}"
|
||||
},
|
||||
"Insert attr_accessor": {
|
||||
"prefix": "rw",
|
||||
"body": "attr_accessor :${0:attr_names}"
|
||||
},
|
||||
"Insert inctance variable cache": {
|
||||
"prefix": "ivc",
|
||||
"body": "@${1:variable_name} ||= ${0:cached_value}"
|
||||
},
|
||||
"Insert each with inline block": {
|
||||
"prefix": "ea",
|
||||
"body": "each { |${1:e}| $0 }"
|
||||
},
|
||||
"Insert each with multiline block": {
|
||||
"prefix": "ead",
|
||||
"body": [
|
||||
"each do |${1:e}|",
|
||||
"\t$0",
|
||||
"end"
|
||||
]
|
||||
},
|
||||
"Insert each with index inline block": {
|
||||
"prefix": "eawi",
|
||||
"body": "each_with_index { |${1:e}, ${2:i}| $0 }"
|
||||
},
|
||||
"Insert each with index multiline block": {
|
||||
"prefix": "eawid",
|
||||
"body": [
|
||||
"each_with_index do |${1:e}, ${2:i}|",
|
||||
"\t$0",
|
||||
"end"
|
||||
]
|
||||
},
|
||||
"Insert reduce inline block": {
|
||||
"prefix": "red",
|
||||
"body": "reduce(${1:init}) { |${2:mem}, ${3:var}| $0 }"
|
||||
},
|
||||
"Insert reduce multiline block": {
|
||||
"prefix": "redd",
|
||||
"body": [
|
||||
"reduce(${1:init}) do |${2:mem}, ${3:var}|",
|
||||
"\t$0",
|
||||
"end"
|
||||
]
|
||||
},
|
||||
"Insert map inline block": {
|
||||
"prefix": "map",
|
||||
"body": "map { |${1:e}| $0 }"
|
||||
},
|
||||
"Insert map multiline block": {
|
||||
"prefix": "mapd",
|
||||
"body": [
|
||||
"map do |${1:e}|",
|
||||
"\t$0",
|
||||
"end"
|
||||
]
|
||||
},
|
||||
"Insert lambda arrow": {
|
||||
"prefix": "->",
|
||||
"body": "-> { $0 }"
|
||||
},
|
||||
"Insert lambda arrow with arguments": {
|
||||
"prefix": "->a",
|
||||
"body": "->(${1:args}) { $0 }"
|
||||
},
|
||||
"Insert do block": {
|
||||
"prefix": "do",
|
||||
"body": [
|
||||
"do",
|
||||
"\t$0",
|
||||
"end"
|
||||
]
|
||||
},
|
||||
"Insert do block with variables": {
|
||||
"prefix": "dov",
|
||||
"body": [
|
||||
"do |${1:v}|",
|
||||
"\t$0",
|
||||
"end"
|
||||
]
|
||||
},
|
||||
"Insert key: value": {
|
||||
"prefix": ":",
|
||||
"body": "${1:key}: ${2:value}"
|
||||
},
|
||||
"Insert inline block": {
|
||||
"prefix": "b",
|
||||
"body": "{ |${1:var}| $0 }"
|
||||
},
|
||||
"Insert byebug call": {
|
||||
"prefix": "debug",
|
||||
"body": "require 'byebug'; byebug"
|
||||
},
|
||||
"Insert pry call": {
|
||||
"prefix": "pry",
|
||||
"body": "require 'pry'; binding.pry"
|
||||
},
|
||||
"Insert irb call": {
|
||||
"prefix": "irb",
|
||||
"body": "binding.irb"
|
||||
},
|
||||
"Insert RSpec.describe class": {
|
||||
"prefix": "rdesc",
|
||||
"body": [
|
||||
"RSpec.describe ${1:described_class} do",
|
||||
"\t$0",
|
||||
"end"
|
||||
]
|
||||
},
|
||||
"Insert describe class": {
|
||||
"prefix": "desc",
|
||||
"body": [
|
||||
"describe ${1:described_class} do",
|
||||
"\t$0",
|
||||
"end"
|
||||
]
|
||||
},
|
||||
"Insert describe block": {
|
||||
"prefix": "descm",
|
||||
"body": [
|
||||
"describe '${1:#method}' do",
|
||||
"\t${0:pending 'Not implemented'}",
|
||||
"end"
|
||||
]
|
||||
},
|
||||
"Insert context block": {
|
||||
"prefix": "cont",
|
||||
"body": [
|
||||
"context '${1:message}' do",
|
||||
"\t$0",
|
||||
"end"
|
||||
]
|
||||
},
|
||||
"Insert before block": {
|
||||
"prefix": "bef",
|
||||
"body": [
|
||||
"before :${1:each} do",
|
||||
"\t$0",
|
||||
"end"
|
||||
]
|
||||
},
|
||||
"Insert let": {
|
||||
"prefix": "let",
|
||||
"body": "let(:${1:object}) { $0 }"
|
||||
},
|
||||
"Insert let!": {
|
||||
"prefix": "let!",
|
||||
"body": "let!(:${1:object}) { $0 }"
|
||||
},
|
||||
"Insert subject definition": {
|
||||
"prefix": "subj",
|
||||
"body": "subject(:${1:name}) { $0 }"
|
||||
},
|
||||
"Insert expect": {
|
||||
"prefix": "exp",
|
||||
"body": "expect(${1:object}).to ${0}"
|
||||
},
|
||||
"Insert expect with block": {
|
||||
"prefix": "expb",
|
||||
"body": "expect { ${1:object} }.to ${0}"
|
||||
},
|
||||
"Insert expect with raise_error": {
|
||||
"prefix": "experr",
|
||||
"body": "expect { ${1:object} }.to raise_error ${2:StandardError}"
|
||||
},
|
||||
"Insert allow": {
|
||||
"prefix": "allow",
|
||||
"body": "allow(${1:object}).to $0"
|
||||
},
|
||||
"Insert shared_examples": {
|
||||
"prefix": "shared",
|
||||
"body": "shared_examples '${0:shared examples name}'"
|
||||
},
|
||||
"Insert it_behaves_like": {
|
||||
"prefix": "ibl",
|
||||
"body": "it_behaves_like '${0:shared examples name}'"
|
||||
},
|
||||
"Insert it block": {
|
||||
"prefix": "it",
|
||||
"body": [
|
||||
"it '${1:spec_name}' do",
|
||||
"\t$0",
|
||||
"end"
|
||||
]
|
||||
}
|
||||
}
|
||||
413
dot_vim/plugged/friendly-snippets/snippets/rust.json
Normal file
413
dot_vim/plugged/friendly-snippets/snippets/rust.json
Normal file
@@ -0,0 +1,413 @@
|
||||
{
|
||||
"allow": {
|
||||
"prefix": "allow",
|
||||
"body": ["#![allow(${1})]"],
|
||||
"description": "#![allow(…)]"
|
||||
},
|
||||
"deny": {
|
||||
"prefix": "deny",
|
||||
"body": ["#![deny(${1})]"],
|
||||
"description": "#![deny(…)]"
|
||||
},
|
||||
"warn": {
|
||||
"prefix": "warn",
|
||||
"body": ["#![warn(${1})]"],
|
||||
"description": "#![warn(…)]"
|
||||
},
|
||||
"no_std": {
|
||||
"prefix": "no_std",
|
||||
"body": ["#![no_std]"],
|
||||
"description": "#![no_std]"
|
||||
},
|
||||
"no_core": {
|
||||
"prefix": "no_core",
|
||||
"body": ["#![no_core]"],
|
||||
"description": "#![no_core]"
|
||||
},
|
||||
"feature": {
|
||||
"prefix": "feature",
|
||||
"body": ["#![feature(${1})]"],
|
||||
"description": "#![feature(…)]"
|
||||
},
|
||||
"macro_use": {
|
||||
"prefix": "macro_use",
|
||||
"body": ["#[macro_use(${1})]"],
|
||||
"description": "#[macro_use(…)]"
|
||||
},
|
||||
"repr": {
|
||||
"prefix": "repr",
|
||||
"body": ["#[repr(${1})]"],
|
||||
"description": "#[repr(…)]"
|
||||
},
|
||||
"cfg": {
|
||||
"prefix": "cfg",
|
||||
"body": ["#[cfg(${1})]"],
|
||||
"description": "#[cfg(…)]"
|
||||
},
|
||||
"cfg_attr": {
|
||||
"prefix": "cfg_attr",
|
||||
"body": ["#[cfg_attr(${1}, ${2})]"],
|
||||
"description": "#[cfg_attr(…, …)]"
|
||||
},
|
||||
"cfg!": {
|
||||
"prefix": "cfg!",
|
||||
"body": ["cfg!(${1})"],
|
||||
"description": "cfg!(…)"
|
||||
},
|
||||
"column": {
|
||||
"prefix": "column",
|
||||
"body": ["column!()"],
|
||||
"description": "column!()"
|
||||
},
|
||||
"concat": {
|
||||
"prefix": "concat",
|
||||
"body": ["concat!(${1})"],
|
||||
"description": "concat!(…)"
|
||||
},
|
||||
"concat_idents": {
|
||||
"prefix": "concat_idents",
|
||||
"body": ["concat_idents!(${1})"],
|
||||
"description": "concat_idents!(…)"
|
||||
},
|
||||
"debug_assert": {
|
||||
"prefix": "debug_assert",
|
||||
"body": ["debug_assert!(${1});"],
|
||||
"description": "debug_assert!(…)"
|
||||
},
|
||||
"debug_assert_eq": {
|
||||
"prefix": "debug_assert_eq",
|
||||
"body": ["debug_assert_eq!(${1}, ${2});"],
|
||||
"description": "debug_assert_eq!(…, …)"
|
||||
},
|
||||
"env": {
|
||||
"prefix": "env",
|
||||
"body": ["env!(\"${1}\")"],
|
||||
"description": "env!(\"…\")"
|
||||
},
|
||||
"file": {
|
||||
"prefix": "file",
|
||||
"body": ["file!()"],
|
||||
"description": "file!()"
|
||||
},
|
||||
"format": {
|
||||
"prefix": "format",
|
||||
"body": ["format!(\"${1}\")"],
|
||||
"description": "format!(…)"
|
||||
},
|
||||
"format_args": {
|
||||
"prefix": "format_args",
|
||||
"body": ["format_args!(\"${1}\")"],
|
||||
"description": "format_args!(…)"
|
||||
},
|
||||
"include": {
|
||||
"prefix": "include",
|
||||
"body": ["include!(\"${1}\");"],
|
||||
"description": "include!(\"…\");"
|
||||
},
|
||||
"include_bytes": {
|
||||
"prefix": "include_bytes",
|
||||
"body": ["include_bytes!(\"${1}\")"],
|
||||
"description": "include_bytes!(\"…\")"
|
||||
},
|
||||
"include_str": {
|
||||
"prefix": "include_str",
|
||||
"body": ["include_str!(\"${1}\")"],
|
||||
"description": "include_str!(\"…\")"
|
||||
},
|
||||
"line": {
|
||||
"prefix": "line",
|
||||
"body": ["line!()"],
|
||||
"description": "line!()"
|
||||
},
|
||||
"module_path": {
|
||||
"prefix": "module_path",
|
||||
"body": ["module_path!()"],
|
||||
"description": "module_path!()"
|
||||
},
|
||||
"option_env": {
|
||||
"prefix": "option_env",
|
||||
"body": ["option_env!(\"${1}\")"],
|
||||
"description": "option_env!(\"…\")"
|
||||
},
|
||||
"panic": {
|
||||
"prefix": "panic",
|
||||
"body": ["panic!(\"${1}\");"],
|
||||
"description": "panic!(…);"
|
||||
},
|
||||
"print": {
|
||||
"prefix": "print",
|
||||
"body": ["print!(\"${1}\");"],
|
||||
"description": "print!(…);"
|
||||
},
|
||||
"println": {
|
||||
"prefix": "println",
|
||||
"body": ["println!(\"${1}\");"],
|
||||
"description": "println!(…);"
|
||||
},
|
||||
"stringify": {
|
||||
"prefix": "stringify",
|
||||
"body": ["stringify!(${1})"],
|
||||
"description": "stringify!(…)"
|
||||
},
|
||||
"thread_local": {
|
||||
"prefix": "thread_local",
|
||||
"body": ["thread_local!(static ${1:STATIC}: ${2:Type} = ${4:init});"],
|
||||
"description": "thread_local!(static …: … = …);"
|
||||
},
|
||||
"try": {
|
||||
"prefix": "try",
|
||||
"body": ["try!(${1})"],
|
||||
"description": "try!(…)"
|
||||
},
|
||||
"unimplemented": {
|
||||
"prefix": "unimplemented",
|
||||
"body": ["unimplemented!()"],
|
||||
"description": "unimplemented!()"
|
||||
},
|
||||
"unreachable": {
|
||||
"prefix": "unreachable",
|
||||
"body": ["unreachable!(${1})"],
|
||||
"description": "unreachable!(…)"
|
||||
},
|
||||
"vec": {
|
||||
"prefix": "vec",
|
||||
"body": ["vec![${1}]"],
|
||||
"description": "vec![…]"
|
||||
},
|
||||
"write": {
|
||||
"prefix": "write",
|
||||
"body": ["write!(${1}, \"${2}\")"],
|
||||
"description": "write!(…)"
|
||||
},
|
||||
"writeln": {
|
||||
"prefix": "writeln",
|
||||
"body": ["writeln!(${1}, \"${2}\")"],
|
||||
"description": "writeln!(…, …)"
|
||||
},
|
||||
"Err": {
|
||||
"prefix": "Err",
|
||||
"body": ["Err(${1})"],
|
||||
"description": "Err(…)"
|
||||
},
|
||||
"Ok": {
|
||||
"prefix": "Ok",
|
||||
"body": ["Ok(${1:result})"],
|
||||
"description": "Ok(…)"
|
||||
},
|
||||
"Some": {
|
||||
"prefix": "Some",
|
||||
"body": ["Some(${1})"],
|
||||
"description": "Some(…)"
|
||||
},
|
||||
"assert": {
|
||||
"prefix": "assert",
|
||||
"body": ["assert!(${1});"],
|
||||
"description": "assert!(…);"
|
||||
},
|
||||
"assert_eq": {
|
||||
"prefix": "assert_eq",
|
||||
"body": ["assert_eq!(${1}, ${2});"],
|
||||
"description": "assert_eq!(…, …);"
|
||||
},
|
||||
"bench": {
|
||||
"prefix": "bench",
|
||||
"body": [
|
||||
"#[bench]",
|
||||
"fn ${1:name}(b: &mut test::Bencher) {",
|
||||
" ${2:b.iter(|| ${3:/* benchmark code */})}",
|
||||
"}"
|
||||
],
|
||||
"description": "#[bench]"
|
||||
},
|
||||
"const": {
|
||||
"prefix": "const",
|
||||
"body": ["const ${1:CONST}: ${2:Type} = ${4:init};"],
|
||||
"description": "const …: … = …;"
|
||||
},
|
||||
"derive": {
|
||||
"prefix": "derive",
|
||||
"body": ["#[derive(${1})]"],
|
||||
"description": "#[derive(…)]"
|
||||
},
|
||||
"else": {
|
||||
"prefix": "else",
|
||||
"body": ["else {", " ${1:unimplemented!();}", "}"],
|
||||
"description": "else { … }"
|
||||
},
|
||||
"enum": {
|
||||
"prefix": "enum",
|
||||
"body": [
|
||||
"#[derive(Debug)]",
|
||||
"enum ${1:Name} {",
|
||||
" ${2:Variant1},",
|
||||
" ${3:Variant2},",
|
||||
"}"
|
||||
],
|
||||
"description": "enum … { … }"
|
||||
},
|
||||
"extern-crate": {
|
||||
"prefix": "extern-crate",
|
||||
"body": ["extern crate ${1:name};"],
|
||||
"description": "extern crate …;"
|
||||
},
|
||||
"extern-fn": {
|
||||
"prefix": "extern-fn",
|
||||
"body": [
|
||||
"extern \"C\" fn ${1:name}(${2:arg}: ${3:Type}) -> ${4:RetType} {",
|
||||
" ${5:// add code here}",
|
||||
"}"
|
||||
],
|
||||
"description": "extern \"C\" fn …(…) { … }"
|
||||
},
|
||||
"extern-mod": {
|
||||
"prefix": "extern-mod",
|
||||
"body": ["extern \"C\" {", " ${2:// add code here}", "}"],
|
||||
"description": "extern \"C\" { … }"
|
||||
},
|
||||
"fn": {
|
||||
"prefix": "fn",
|
||||
"body": [
|
||||
"fn ${1:name}(${2:arg}: ${3:Type}) -> ${4:RetType} {",
|
||||
" ${5:unimplemented!();}",
|
||||
"}"
|
||||
],
|
||||
"description": "fn …(…) { … }"
|
||||
},
|
||||
"for": {
|
||||
"prefix": "for",
|
||||
"body": ["for ${1:pat} in ${2:expr} {", " ${3:unimplemented!();}", "}"],
|
||||
"description": "for … in … { … }"
|
||||
},
|
||||
"if-let": {
|
||||
"prefix": "if-let",
|
||||
"body": [
|
||||
"if let ${1:Some(pat)} = ${2:expr} {",
|
||||
" ${0:unimplemented!();}",
|
||||
"}"
|
||||
],
|
||||
"description": "if let … = … { … }"
|
||||
},
|
||||
"if": {
|
||||
"prefix": "if",
|
||||
"body": ["if ${1:condition} {", " ${2:unimplemented!();}", "}"],
|
||||
"description": "if … { … }"
|
||||
},
|
||||
"impl-trait": {
|
||||
"prefix": "impl-trait",
|
||||
"body": [
|
||||
"impl ${1:Trait} for ${2:Type} {",
|
||||
" ${3:// add code here}",
|
||||
"}"
|
||||
],
|
||||
"description": "impl … for … { … }"
|
||||
},
|
||||
"impl": {
|
||||
"prefix": "impl",
|
||||
"body": ["impl ${1:Type} {", " ${2:// add code here}", "}"],
|
||||
"description": "impl … { … }"
|
||||
},
|
||||
"inline-fn": {
|
||||
"prefix": "inline-fn",
|
||||
"body": [
|
||||
"#[inline]",
|
||||
"pub fn ${1:name}() {",
|
||||
" ${2:unimplemented!();}",
|
||||
"}"
|
||||
],
|
||||
"description": "inlined function"
|
||||
},
|
||||
"let": {
|
||||
"prefix": "let",
|
||||
"body": ["let ${1:pat} = ${2:expr};"],
|
||||
"description": "let … = …;"
|
||||
},
|
||||
"loop": {
|
||||
"prefix": "loop",
|
||||
"body": ["loop {", " ${2:unimplemented!();}", "}"],
|
||||
"description": "loop { … }"
|
||||
},
|
||||
"macro_rules": {
|
||||
"prefix": "macro_rules",
|
||||
"body": ["macro_rules! ${1:name} {", " (${2}) => (${3})", "}"],
|
||||
"description": "macro_rules! … { … }"
|
||||
},
|
||||
"main": {
|
||||
"prefix": "main",
|
||||
"body": ["fn main() {", " ${1:unimplemented!();}", "}"],
|
||||
"description": "fn main() { … }"
|
||||
},
|
||||
"match": {
|
||||
"prefix": "match",
|
||||
"body": [
|
||||
"match ${1:expr} {",
|
||||
" ${2:Some(expr)} => ${3:expr},",
|
||||
" ${4:None} => ${5:expr},",
|
||||
"}"
|
||||
],
|
||||
"description": "match … { … }"
|
||||
},
|
||||
"mod": {
|
||||
"prefix": "mod",
|
||||
"body": ["mod ${1:name};"],
|
||||
"description": "mod …;"
|
||||
},
|
||||
"mod-block": {
|
||||
"prefix": "mod-block",
|
||||
"body": ["mod ${1:name} {", " ${2:// add code here}", "}"],
|
||||
"description": "mod … { … }"
|
||||
},
|
||||
"static": {
|
||||
"prefix": "static",
|
||||
"body": ["static ${1:STATIC}: ${2:Type} = ${4:init};"],
|
||||
"description": "static …: … = …;"
|
||||
},
|
||||
"struct-tuple": {
|
||||
"prefix": "struct-tuple",
|
||||
"body": ["struct ${1:Name}(${2:Type});"],
|
||||
"description": "struct …(…);"
|
||||
},
|
||||
"struct-unit": {
|
||||
"prefix": "struct-unit",
|
||||
"body": ["struct ${1:Name};"],
|
||||
"description": "struct …;"
|
||||
},
|
||||
"struct": {
|
||||
"prefix": "struct",
|
||||
"body": [
|
||||
"#[derive(Debug)]",
|
||||
"struct ${1:Name} {",
|
||||
" ${2:field}: ${3:Type}",
|
||||
"}"
|
||||
],
|
||||
"description": "struct … { … }"
|
||||
},
|
||||
"test": {
|
||||
"prefix": "test",
|
||||
"body": ["#[test]", "fn ${1:name}() {", " ${2:unimplemented!();}", "}"],
|
||||
"description": "#[test]"
|
||||
},
|
||||
"trait": {
|
||||
"prefix": "trait",
|
||||
"body": ["trait ${1:Name} {", " ${2:// add code here}", "}", ""],
|
||||
"description": "trait … { … }"
|
||||
},
|
||||
"type": {
|
||||
"prefix": "type",
|
||||
"body": ["type ${1:Alias} = ${2:Type};"],
|
||||
"description": "type … = …;"
|
||||
},
|
||||
"while-let": {
|
||||
"prefix": "while-let",
|
||||
"body": [
|
||||
"while let ${1:Some(pat)} = ${2:expr} {",
|
||||
" ${0:unimplemented!();}",
|
||||
"}"
|
||||
],
|
||||
"description": "while let … = … { … }"
|
||||
},
|
||||
"while": {
|
||||
"prefix": "while",
|
||||
"body": ["while ${1:condition} {", " ${2:unimplemented!();}", "}"],
|
||||
"description": "while … { … }"
|
||||
}
|
||||
}
|
||||
97
dot_vim/plugged/friendly-snippets/snippets/scala.json
Normal file
97
dot_vim/plugged/friendly-snippets/snippets/scala.json
Normal file
@@ -0,0 +1,97 @@
|
||||
{
|
||||
"object": {
|
||||
"prefix": "object",
|
||||
"body": ["object ${1:ObjectName} {",
|
||||
"\t${2:println(\"Hello, world!\")}",
|
||||
"}"
|
||||
],
|
||||
"description": "Object"
|
||||
},
|
||||
"class": {
|
||||
"prefix": "class",
|
||||
"body": ["class ${1:ClassName} {",
|
||||
"\t${2:println(\"Hello, world!\")}",
|
||||
"}"
|
||||
],
|
||||
"description": "Class"
|
||||
},
|
||||
"case_class": {
|
||||
"prefix": "case_class",
|
||||
"body": "case class ${1:CaseClassName}(${2:argName}: ${3:ArgType})",
|
||||
"description": "Case class"
|
||||
},
|
||||
"trait": {
|
||||
"prefix": "trait",
|
||||
"body": ["trait ${1:TraitName} {",
|
||||
"\t${2:}",
|
||||
"}"
|
||||
],
|
||||
"description": "Trait"
|
||||
},
|
||||
"main_object": {
|
||||
"prefix": "obj_main",
|
||||
"body": ["object ${1:ObjectName} {",
|
||||
"\tdef main(args: Array[String]): Unit = {",
|
||||
"\t\t${2:println(\"Hello, world!\")}",
|
||||
"\t}",
|
||||
"}"
|
||||
],
|
||||
"description": "Object with main method"
|
||||
},
|
||||
"app": {
|
||||
"prefix": "app",
|
||||
"body": ["object ${1:App} extends App {",
|
||||
"\t${2:println(\"Hello, world!\")}",
|
||||
"}"
|
||||
],
|
||||
"description": "Object extending App"
|
||||
},
|
||||
"def": {
|
||||
"prefix": "def",
|
||||
"body": ["def ${1:methodName}(${2:argName}: ${3:ArgType}): ${4:ReturnType} = {",
|
||||
"\t${5:println(\"Hello, world!\")}",
|
||||
"}"
|
||||
],
|
||||
"description": "Method"
|
||||
},
|
||||
"def_short": {
|
||||
"prefix": "def_short",
|
||||
"body": "def ${1:methodName}(${2:argName}: ${3:ArgType}): ${4:ReturnType} = ${5:println(\"Hello, world!\")}",
|
||||
"description": "Method as one-liner"
|
||||
},
|
||||
"for": {
|
||||
"prefix": "for",
|
||||
"body": ["for (${1:element} <- elements) {",
|
||||
"\t${2:println(element.toString)}",
|
||||
"}"
|
||||
],
|
||||
"description": "For loop"
|
||||
},
|
||||
"while": {
|
||||
"prefix": "while",
|
||||
"body": ["while(${1:condition}) {",
|
||||
"\t${2:println(\"Hello, world!\")}",
|
||||
"}"
|
||||
],
|
||||
"description": "While loop"
|
||||
},
|
||||
"ifelse": {
|
||||
"prefix": "ifelse",
|
||||
"body": ["if (${1:condition}) {",
|
||||
"\t${2:println(\"Hello, world!\")}",
|
||||
"} else {",
|
||||
"\t${2:println(\"Hello, world!\")}",
|
||||
"}"
|
||||
],
|
||||
"description": "Branch based on conditions using if/else"
|
||||
},
|
||||
"match": {
|
||||
"prefix": "match",
|
||||
"body": ["${1:x} match {",
|
||||
"\tcase ${2:0} => ${3:\"zero\"}",
|
||||
"\tcase ${4:1} => ${5:\"one\"}",
|
||||
"}"
|
||||
],
|
||||
"description": "Branch based on conditions using pattern matching"
|
||||
}
|
||||
}
|
||||
93
dot_vim/plugged/friendly-snippets/snippets/shell.json
Normal file
93
dot_vim/plugged/friendly-snippets/snippets/shell.json
Normal file
@@ -0,0 +1,93 @@
|
||||
{
|
||||
"bash": {
|
||||
"prefix": ["bash", "#!", "shebang"],
|
||||
"body": "${1|#!/bin/bash,#!/usr/bin/env bash,#!/bin/sh,#!/usr/bin/env sh|}\n",
|
||||
"description": [
|
||||
"Option 1:\n",
|
||||
"#!/bin/bash\n",
|
||||
"Description: Shebang Bash executor.\n",
|
||||
"Option 2:\n",
|
||||
"#!/usr/bin/env bash\n",
|
||||
"Description: Shell searchs for the first match of bash in the $PATH environment variable.\n",
|
||||
"It can be useful if you aren't aware of the absolute path or don't want to search for it.\n"
|
||||
]
|
||||
},
|
||||
"echo": {
|
||||
"prefix": "echo",
|
||||
"body": "echo \"${0:message}\"",
|
||||
"description": "Echo a message."
|
||||
},
|
||||
"read": {
|
||||
"prefix": "read",
|
||||
"body": "read -r ${0:VAR}",
|
||||
"description": "Read input of ${VAR}."
|
||||
},
|
||||
"if": {
|
||||
"prefix": "if",
|
||||
"body": "if [[ ${1:condition} ]]; then\n\t${0}\nfi",
|
||||
"description": "An IF statement."
|
||||
},
|
||||
"elseif": {
|
||||
"prefix": "elseif",
|
||||
"body": "elif [[ ${1:condition} ]]; then\n\t${0}",
|
||||
"description": "Add an elseif to an if statement."
|
||||
},
|
||||
"else": {
|
||||
"prefix": "else",
|
||||
"body": "else\n\t${0:command}",
|
||||
"description": "else"
|
||||
},
|
||||
"for_in": {
|
||||
"prefix": "for_in",
|
||||
"body": "for ${1:VAR} in ${0:LIST}\ndo\n\techo \"\\$${1:VAR}\"\ndone\n",
|
||||
"description": "for loop in list"
|
||||
},
|
||||
"for_i": {
|
||||
"prefix": "for_i",
|
||||
"body": "for ((${1:i} = 0; ${1:i} < ${0:10}; ${1:i}++)); do\n\techo \"\\$${1:i}\"\ndone\n",
|
||||
"description": "An index-based iteration for loop."
|
||||
},
|
||||
"while": {
|
||||
"prefix": "while",
|
||||
"body": "while [[ ${1:condition} ]]; do\n\t${0}\ndone\n",
|
||||
"description": "A while loop by condition."
|
||||
},
|
||||
"until": {
|
||||
"prefix": "until",
|
||||
"body": "until [[ ${1:condition} ]]; do\n\t${0}\ndone\n",
|
||||
"description": "until loop by condition"
|
||||
},
|
||||
"function": {
|
||||
"prefix": "function",
|
||||
"body": "${1:name} ()\n{\n\t${0}\n}",
|
||||
"description": [
|
||||
"This defines a function named name.\n",
|
||||
"The reserved word function is optional.\n",
|
||||
"If the function reserved word is supplied, the parentheses are optional.\n",
|
||||
"1. Recommended way:\n",
|
||||
"name() {}\n",
|
||||
"2. C-like-way:\nfunction name [()] {}"
|
||||
]
|
||||
},
|
||||
"case": {
|
||||
"prefix": "case",
|
||||
"body": "case \"\\$${1:VAR}\" in\n\t${2:1}) echo 1\n\t;;\n\t${3:2|3}) echo 2 or 3\n\t;;\n\t*) echo default\n\t;;\nesac\n",
|
||||
"description": [
|
||||
"case word in [ [(] pattern [ | pattern ] ... ) list ;; ] ... esac\n",
|
||||
"A case command first expands word, and tries to match it against each pattern in turn."
|
||||
]
|
||||
},
|
||||
"break": {
|
||||
"prefix": "break",
|
||||
"body": "break ${0}",
|
||||
"description": [
|
||||
"The break command tells Bash to leave the loop straight away.\n",
|
||||
"Enter the break or break (n) where n=number of loops."
|
||||
]
|
||||
},
|
||||
"expr": {
|
||||
"prefix": "expr",
|
||||
"body": "expr ${0:1 + 1}",
|
||||
"description": "Calculate numbers with Bash."
|
||||
}
|
||||
}
|
||||
210
dot_vim/plugged/friendly-snippets/snippets/solidity.json
Normal file
210
dot_vim/plugged/friendly-snippets/snippets/solidity.json
Normal file
File diff suppressed because one or more lines are too long
226
dot_vim/plugged/friendly-snippets/snippets/sql.json
Normal file
226
dot_vim/plugged/friendly-snippets/snippets/sql.json
Normal file
@@ -0,0 +1,226 @@
|
||||
{
|
||||
"createt": {
|
||||
"prefix": "createt",
|
||||
"body": ["CREATE TABLE ${1:tableName} (", "\t${2:attribute(s)}", ");"],
|
||||
"description": "Create regular table"
|
||||
},
|
||||
"createti": {
|
||||
"prefix": "createti",
|
||||
"body": ["CREATE TABLE IF NOT EXISTS ${1:tableName} (",
|
||||
"\t${2:attribute(s)}",
|
||||
");"
|
||||
],
|
||||
"description": "Create table with conditional"
|
||||
},
|
||||
"created": {
|
||||
"prefix": "created",
|
||||
"body": ["CREATE DATABASE ${1:name};"],
|
||||
"description": "Create regular table"
|
||||
},
|
||||
"createdi": {
|
||||
"prefix": "createdi",
|
||||
"body": ["CREATE DATABASE IF NOT EXISTS ${1:name};"],
|
||||
"description": "Create table with conditional"
|
||||
},
|
||||
"insert": {
|
||||
"prefix": "insert",
|
||||
"body": ["INSERT INTO ${1:tableName} (",
|
||||
"\t${2:attribute(s)}", ") VALUES ( ${3:values} )"
|
||||
],
|
||||
"description": "Insert value(s)"
|
||||
},
|
||||
"dropt": {
|
||||
"prefix": "dropt",
|
||||
"body": ["DROP TABLE ${1:tableName};"],
|
||||
"description": "Drop table"
|
||||
},
|
||||
"dropd": {
|
||||
"prefix": "dropd",
|
||||
"body": ["DROP DATABASE ${1:dbName};"],
|
||||
"description": "Drop database"
|
||||
},
|
||||
"dropti": {
|
||||
"prefix": "dropti",
|
||||
"body": ["DROP TABLE IF EXISTS ${1:tableName};"],
|
||||
"description": "Drop table with conditional"
|
||||
},
|
||||
"dropdi": {
|
||||
"prefix": "dropdi",
|
||||
"body": ["DROP DATABASE IF EXISTS ${1:dbName};"],
|
||||
"description": "Drop database with conditional"
|
||||
},
|
||||
"showt": {
|
||||
"prefix": "showt",
|
||||
"body": ["SHOW TABLES;"],
|
||||
"description": "Show tables"
|
||||
},
|
||||
"showd": {
|
||||
"prefix": "showd",
|
||||
"body": ["SHOW DATABASES;"],
|
||||
"description": "Show databases"
|
||||
},
|
||||
"select": {
|
||||
"prefix": "select",
|
||||
"body": ["SELECT ${1:attribute(s)} FROM ${2:tableName};"],
|
||||
"description": "Regular select"
|
||||
},
|
||||
"selectd": {
|
||||
"prefix": "selectd",
|
||||
"body": ["SELECT DISTINCT ${1:attribute(s)}", "\tFROM ${2:tableName};"],
|
||||
"description": "Select Distinct"
|
||||
},
|
||||
"selectw": {
|
||||
"prefix": "selectw",
|
||||
"body": ["SELECT ${1:attribute(s)}","\tFROM ${2:tableName}",
|
||||
"\tWHERE ${3:condition};"
|
||||
],
|
||||
"description": "Select with condition"
|
||||
},
|
||||
"selector": {
|
||||
"prefix": "selector",
|
||||
"body": ["SELECT ${1:attribute(s)}","\tFROM ${2:tableName}",
|
||||
"\tORDER BY ${3:attribute(s)} ${4:ASC|DESC};"
|
||||
],
|
||||
"description": "Select with order"
|
||||
},
|
||||
"updatet": {
|
||||
"prefix": "updatet",
|
||||
"body": ["UPDATE ${1:tableName}","\tSET ${2:attribute(s)}",
|
||||
"\tWHERE ${3:condition};"
|
||||
],
|
||||
"description": "Update table"
|
||||
},
|
||||
"delete": {
|
||||
"prefix": "delete",
|
||||
"body": ["DELETE FROM ${1:tableName}", "\tWHERE ${3:condition};"],
|
||||
"description": "Delete records"
|
||||
},
|
||||
"altert": {
|
||||
"prefix": "altert",
|
||||
"body": ["ALTER TABLE ${1:tableName}", "\t ${2:intructions};"],
|
||||
"description": "Alter table"
|
||||
},
|
||||
"alterad": {
|
||||
"prefix": "alterad",
|
||||
"body": ["ALTER TABLE ${1:tableName}", "\tADD COLUMN ${2:col_name};"],
|
||||
"description": "Alter table - Add column"
|
||||
},
|
||||
"alteraf": {
|
||||
"prefix": "alteraf",
|
||||
"body": ["ALTER TABLE ${1:tableName}", "\tADD COLUMN ${2:col_name}",
|
||||
"\tAFTER ${5:col_name};"
|
||||
],
|
||||
"description": "Alter table - Add column after"
|
||||
},
|
||||
"alterdb": {
|
||||
"prefix": "alterdb",
|
||||
"body": ["ALTER DATABASE ${1:dbName}", "\tCHARACTER SET ${2:charset}",
|
||||
"\tCOLLATE ${3:utf8_unicode_ci};"
|
||||
],
|
||||
"description": "Alter database"
|
||||
},
|
||||
"ijoin": {
|
||||
"prefix": "ijoin",
|
||||
"body": ["SELECT ${1:attribute(s)}", "\tFROM ${2:tableName}",
|
||||
"\tINNER JOIN ${3:tableName2}", "\tON ${4:match};"
|
||||
],
|
||||
"description": "Inner Join"
|
||||
},
|
||||
"rjoin": {
|
||||
"prefix": "rjoin",
|
||||
"body": ["SELECT ${1:attribute(s)}", "\tFROM ${2:tableName}",
|
||||
"\tRIGHT JOIN ${3:tableName2}", "\tON ${4:match};"
|
||||
],
|
||||
"description": "Right Join"
|
||||
},
|
||||
"ljoin": {
|
||||
"prefix": "ljoin",
|
||||
"body": ["SELECT ${1:attribute(s)}", "\tFROM ${2:tableName}",
|
||||
"\tLEFT JOIN ${3:tableName2}", "\tON ${4:match};"
|
||||
],
|
||||
"description": "Left Join"
|
||||
},
|
||||
"fjoin": {
|
||||
"prefix": "fjoin",
|
||||
"body": ["SELECT ${1:attribute(s)}", "\tFROM ${2:tableName}",
|
||||
"\tFULL JOIN OUTER ${3:tableName2}", "\tON ${4:match}",
|
||||
"\tWHERE ${5:condition};"
|
||||
],
|
||||
"description": "Full Join"
|
||||
},
|
||||
"union": {
|
||||
"prefix": "union",
|
||||
"body": ["SELECT ${1:attribute(s)} FROM ${2:tableName}", "UNION",
|
||||
"SELECT ${3:attribute(s)} FROM ${4:tableName2};"
|
||||
],
|
||||
"description": "Regular union"
|
||||
},
|
||||
"uniona": {
|
||||
"prefix": "uniona",
|
||||
"body": ["SELECT ${1:attribute(s)} FROM ${2:tableName}", "UNION ALL",
|
||||
"SELECT ${3:attribute(s)} FROM ${4:tableName2};"
|
||||
],
|
||||
"description": "All union"
|
||||
},
|
||||
"groupb": {
|
||||
"prefix": "groupb",
|
||||
"body": ["SELECT ${1:attribute(s)}", "\tFROM ${2:tableName}",
|
||||
"\tGROUP BY ${3:attribute(s)};"
|
||||
],
|
||||
"description": "Group by"
|
||||
},
|
||||
"bakupd": {
|
||||
"prefix": "bakupd",
|
||||
"body": ["BACKUP DATABASE ${1:dbName}", "\tTO DISK ${2:filepath};"],
|
||||
"description": "Backup database"
|
||||
},
|
||||
"bakupdw": {
|
||||
"prefix": "bakupdw",
|
||||
"body": ["BACKUP DATABASE ${1:dbName}", "\tTO DISK ${2:filepath}",
|
||||
"\tWITH ${3:DIFERENTIAL};"
|
||||
],
|
||||
"description": "Diferencial backup database"
|
||||
},
|
||||
"primaryk": {
|
||||
"prefix": "primaryk",
|
||||
"body": ["PRIMARY KEY(${1:attribute})"],
|
||||
"description": "Primary Key"
|
||||
},
|
||||
"primarykc": {
|
||||
"prefix": "primarykc",
|
||||
"body": ["CONSTRAINT ${1:attribute} PRIMARY KEY(${2:attribute(s)})"],
|
||||
"description": "Constraint rimary Key"
|
||||
},
|
||||
"foreingk": {
|
||||
"prefix": "foreingk",
|
||||
"body": ["FOREIGN KEY(${1:attribute}) REFERENCES ${2:tableName}(${3:attribute})"],
|
||||
"description": "Foreing Key"
|
||||
},
|
||||
"foreingkc": {
|
||||
"prefix": "foreingkc",
|
||||
"body": ["CONSTRAINT ${1:attribute} FOREIGN KEY (${2:attribute(s)})",
|
||||
"\tREFERENCES ${3:tableName}(${4:attribute})"
|
||||
],
|
||||
"description": "Constraint foreing Key"
|
||||
},
|
||||
"check": {
|
||||
"prefix": "check",
|
||||
"body": ["CHECK ( ${1:condition} )"],
|
||||
"description": "Check"
|
||||
},
|
||||
"creteuser": {
|
||||
"prefix": "createuser",
|
||||
"body": "CREATE USER '${1:username}'@'${2:localhost}' IDENTIFIED BY '${3:password}';",
|
||||
"description": "Create User"
|
||||
},
|
||||
"deleteuser": {
|
||||
"prefix": "deleteuser",
|
||||
"body": "DELETE FROM mysql.user WHERE user = '${1:userName}';",
|
||||
"description": "Delete user"
|
||||
},
|
||||
"grantuser":{
|
||||
"prefix": "grantuser",
|
||||
"body": "GRANT ALL PRIVILEGES ON ${1:db}.${2:tb} TO '${3:user_name}'@'${4:localhost}';",
|
||||
"description": "Grant privileges"
|
||||
}
|
||||
}
|
||||
616
dot_vim/plugged/friendly-snippets/snippets/svelte.json
Normal file
616
dot_vim/plugged/friendly-snippets/snippets/svelte.json
Normal file
@@ -0,0 +1,616 @@
|
||||
{
|
||||
"svelte-component-format": {
|
||||
"prefix": "s-component-format",
|
||||
"body": [
|
||||
"<script>",
|
||||
"\t${1:// your script goes here}",
|
||||
"</script>",
|
||||
"",
|
||||
"<style>",
|
||||
"\t${2:/* your styles go here */}",
|
||||
"</style>",
|
||||
"",
|
||||
"${3:<!-- markup (zero or more items) goes here -->}"
|
||||
],
|
||||
"description": "add a script to your svelte file"
|
||||
},
|
||||
"svelte-script-tag": {
|
||||
"prefix": "s-script",
|
||||
"body": ["<script>", "\t${1:// your script goes here}", "</script>"],
|
||||
"description": "add a script to your svelte file"
|
||||
},
|
||||
"svelte-script-context": {
|
||||
"prefix": "s-script-context",
|
||||
"body": [
|
||||
"<script context=\"module\">",
|
||||
"\t${1:// your script goes here}",
|
||||
"</script>"
|
||||
],
|
||||
"description": "add a script with context=\"module\" to your svelte file"
|
||||
},
|
||||
"svelte-style-tag": {
|
||||
"prefix": "s-style",
|
||||
"body": ["<style>", "\t${1:/* your styles go here */}", "</style>"],
|
||||
"description": "add styles to your svelte file"
|
||||
},
|
||||
"svelte-expression": {
|
||||
"prefix": "s-expression",
|
||||
"body": ["{${1:expression}}"],
|
||||
"description": "basic expression"
|
||||
},
|
||||
"svelte-expression-html": {
|
||||
"prefix": "s-expression-html",
|
||||
"body": ["{@html ${1:expression}}"],
|
||||
"description": "html content expression"
|
||||
},
|
||||
"svelte-expression-debug": {
|
||||
"prefix": "s-expression-debug",
|
||||
"body": ["{@debug ${1:var1}${2:,var2}}"],
|
||||
"description": "html content expression"
|
||||
},
|
||||
"svelte-if-block": {
|
||||
"prefix": "s-if-block",
|
||||
"body": ["{#if ${1:condition}}", "\t${2: <!-- content here -->}", "{/if}"],
|
||||
"description": "if block"
|
||||
},
|
||||
"svelte-if-else-block": {
|
||||
"prefix": "s-if-else-block",
|
||||
"body": [
|
||||
"{#if ${1:condition}}",
|
||||
"\t${2: <!-- content here -->}",
|
||||
"{:else}",
|
||||
"\t${3: <!-- else content here -->}",
|
||||
"{/if}"
|
||||
],
|
||||
"description": "if else block"
|
||||
},
|
||||
"svelte-else-block": {
|
||||
"prefix": "s-else-block",
|
||||
"body": ["{:else}", "\t${1: <!-- else content here -->}"],
|
||||
"description": "else block"
|
||||
},
|
||||
"svelte-if-else-if-block": {
|
||||
"prefix": "s-if-else-if-block",
|
||||
"body": [
|
||||
"{#if ${1:condition}}",
|
||||
"\t${2: <!-- content here -->}",
|
||||
"{:else if ${3: otherCondition}}",
|
||||
"\t${4: <!-- else if content here -->}",
|
||||
"{:else}",
|
||||
"\t${5: <!-- else content here -->}",
|
||||
"{/if}"
|
||||
],
|
||||
"description": "if else if block"
|
||||
},
|
||||
"svelte-else-if-block": {
|
||||
"prefix": "s-else-if-block",
|
||||
"body": [
|
||||
"{:else if ${1: otherCondition}}",
|
||||
"\t${2: <!-- else if content here -->}"
|
||||
],
|
||||
"description": "else if block"
|
||||
},
|
||||
"svelte-each-block": {
|
||||
"prefix": "s-each-block",
|
||||
"body": [
|
||||
"{#each ${1:items} as ${2:item}}",
|
||||
"\t${3: <!-- content here -->}",
|
||||
"{/each}"
|
||||
],
|
||||
"description": "each block"
|
||||
},
|
||||
"svelte-each-else-block": {
|
||||
"prefix": "s-each-else-block",
|
||||
"body": [
|
||||
"{#each ${1:items} as ${2:item}}",
|
||||
"\t${3: <!-- content here -->}",
|
||||
"{:else}",
|
||||
"\t${4: <!-- empty list -->}",
|
||||
"{/each}"
|
||||
],
|
||||
"description": "each else block"
|
||||
},
|
||||
"svelte-each-index-block": {
|
||||
"prefix": "s-each-index-block",
|
||||
"body": [
|
||||
"{#each ${1:items} as ${2:item},${3:i}}",
|
||||
"\t${4: <!-- content here -->}",
|
||||
"{/each}"
|
||||
],
|
||||
"description": "each index block"
|
||||
},
|
||||
"svelte-each-key-block": {
|
||||
"prefix": "s-each-key-block",
|
||||
"body": [
|
||||
"{#each ${1:items} as ${2:item},(${3:key})}",
|
||||
"\t${4: <!-- content here -->}",
|
||||
"{/each}"
|
||||
],
|
||||
"description": "each index block"
|
||||
},
|
||||
"svelte-each-index-key-block": {
|
||||
"prefix": "s-each-index-key-block",
|
||||
"body": [
|
||||
"{#each ${1:items} as ${2:item},i (${3:key})}",
|
||||
"\t${4: <!-- content here -->}",
|
||||
"{/each}"
|
||||
],
|
||||
"description": "each index key block"
|
||||
},
|
||||
"svelte-await-then-block": {
|
||||
"prefix": "s-await-then-block",
|
||||
"body": [
|
||||
"{#await ${1:promise}}",
|
||||
"\t<!-- promise is pending -->",
|
||||
"{:then ${2:value}}",
|
||||
"\t<!-- promise was fulfilled -->",
|
||||
"{/await}"
|
||||
],
|
||||
"description": "await then block"
|
||||
},
|
||||
"svelte-then-block": {
|
||||
"prefix": "s-then-block",
|
||||
"body": ["{:then ${1:value}}", "\t<!-- promise was fulfilled -->"],
|
||||
"description": "then block"
|
||||
},
|
||||
"svelte-await-short-block": {
|
||||
"prefix": "s-await-short-block",
|
||||
"body": [
|
||||
"{#await ${1:promise} then ${2:value}}",
|
||||
"\t<!-- promise was fulfilled -->",
|
||||
"{/await}"
|
||||
],
|
||||
"description": "await short block"
|
||||
},
|
||||
"svelte-await-catch-block": {
|
||||
"prefix": "s-await-catch-block",
|
||||
"body": [
|
||||
"{#await ${1:promise}}",
|
||||
"\t<!-- ${1:promise} is pending -->",
|
||||
"{:then ${value}}",
|
||||
"\t<!-- ${1:promise} was fulfilled -->",
|
||||
"{:catch error}",
|
||||
"\t<!-- ${1:promise} was rejected -->",
|
||||
"{/await}"
|
||||
],
|
||||
"description": "await catch block"
|
||||
},
|
||||
"svelte-catch-block": {
|
||||
"prefix": "s-catch-block",
|
||||
"body": ["{:catch error}", "\t<!-- promise was rejected -->"],
|
||||
"description": "catch block"
|
||||
},
|
||||
"svelte-on-event": {
|
||||
"prefix": "s-on-event",
|
||||
"body": ["on:${1:eventname}={${2:handler}}"],
|
||||
"description": "on event"
|
||||
},
|
||||
"svelte-on-event-forward": {
|
||||
"prefix": "s-on-event-foward",
|
||||
"body": ["on:${1:eventname}"],
|
||||
"description": "on event foward"
|
||||
},
|
||||
"svelte-on-event-modifiers": {
|
||||
"prefix": "s-on-event-modifiers",
|
||||
"body": [
|
||||
"on:${1:eventname}|${2|preventDefault,stopPropagation,passive,capture,once|}={${3:handler}}"
|
||||
],
|
||||
"description": "on event w/ modifiers"
|
||||
},
|
||||
"svelte-on-event-inline": {
|
||||
"prefix": "s-on-event-inline",
|
||||
"body": ["on:${1:click}=\"{() => ${2:count += 1}}\""],
|
||||
"description": "on event inline"
|
||||
},
|
||||
"svelte-modifiers": {
|
||||
"prefix": "s-modifier",
|
||||
"body": ["|${1|preventDefault,stopPropagation,passive,capture,once|}"],
|
||||
"description": "modifier"
|
||||
},
|
||||
"svelte-bind": {
|
||||
"prefix": "s-bind",
|
||||
"body": ["bind:${1:property}"],
|
||||
"description": "bind property"
|
||||
},
|
||||
"svelte-bind-property": {
|
||||
"prefix": "s-bind-property",
|
||||
"body": ["bind:${1:property}={${2:variable}}"],
|
||||
"description": "bind property"
|
||||
},
|
||||
"svelte-bind-video": {
|
||||
"prefix": "s-bind-video",
|
||||
"body": [
|
||||
"<video",
|
||||
"src={${1:clip}}",
|
||||
"bind:${2:duration}",
|
||||
"bind:${3:buffered}",
|
||||
"bind:${4:played}",
|
||||
"bind:${5:seekable}",
|
||||
"bind:${6:seeking}",
|
||||
"bind:${7:ended}",
|
||||
"bind:${8:currentTime}",
|
||||
"bind:${9:playbackRate}",
|
||||
"bind:${10:paused}",
|
||||
"bind:${11:volume}",
|
||||
"bind:${12:muted}",
|
||||
"bind:${13:videoWidth}",
|
||||
"bind:${14:videoHeight}",
|
||||
"></video>"
|
||||
],
|
||||
"description": "bind property"
|
||||
},
|
||||
"svelte-bind-audio": {
|
||||
"prefix": "s-bind-audio",
|
||||
"body": [
|
||||
"<audio",
|
||||
"src={${1:clip}}",
|
||||
"bind:${2:duration}",
|
||||
"bind:${3:buffered}",
|
||||
"bind:${4:played}",
|
||||
"bind:${5:seekable}",
|
||||
"bind:${6:seeking}",
|
||||
"bind:${7:ended}",
|
||||
"bind:${8:currentTime}",
|
||||
"bind:${9:playbackRate}",
|
||||
"bind:${10:paused}",
|
||||
"bind:${11:volume}",
|
||||
"bind:${12:muted}",
|
||||
"></audio>"
|
||||
],
|
||||
"description": "bind property"
|
||||
},
|
||||
"svelte-bind-media-elements": {
|
||||
"prefix": "s-bind-media-elements",
|
||||
"body": [
|
||||
"bind:${1|duration,buffered,played,seekable,seeking,ended,currentTime,playbackRate,paused,volume,muted,videoWidth,videoHeight|}"
|
||||
],
|
||||
"description": "bind property"
|
||||
},
|
||||
"svelte-bind-block-level": {
|
||||
"prefix": "s-bind-block-level",
|
||||
"body": [
|
||||
"bind:${1|clientWidth,clientHeight,offsetWidth,offsetHeight|}={${2:variable}}"
|
||||
],
|
||||
"description": "bind property"
|
||||
},
|
||||
"svelte-bind-group": {
|
||||
"prefix": "s-bind-group",
|
||||
"body": ["bind:group={${1:variable}}"],
|
||||
"description": "bind group"
|
||||
},
|
||||
"svelte-bind-this": {
|
||||
"prefix": "s-bind-this",
|
||||
"body": ["bind:this={${1:dom_node}}"],
|
||||
"description": "bind this"
|
||||
},
|
||||
"svelte-class": {
|
||||
"prefix": "s-class",
|
||||
"body": ["class:${1:name}={${2:condition}}"],
|
||||
"description": "class"
|
||||
},
|
||||
"svelte-class-short": {
|
||||
"prefix": "s-class-short",
|
||||
"body": ["class:${1:name}}"],
|
||||
"description": "class shorthand"
|
||||
},
|
||||
"svelte-use": {
|
||||
"prefix": "s-use",
|
||||
"body": ["use:action"],
|
||||
"description": "use action"
|
||||
},
|
||||
"svelte-use-parameters": {
|
||||
"prefix": "s-use-parameters",
|
||||
"body": ["use:action={${1:parameters}}"],
|
||||
"description": "use action w/ parameters"
|
||||
},
|
||||
"svelte-transition": {
|
||||
"prefix": "s-transition",
|
||||
"body": ["${1|transition,in,out|}:${2:name}"],
|
||||
"description": "transition"
|
||||
},
|
||||
"svelte-transition-params": {
|
||||
"prefix": "s-transition-params",
|
||||
"body": ["${1|transition,in,out|}:${2:name}={${3:params}}"],
|
||||
"description": "transition-params"
|
||||
},
|
||||
"svelte-transition-events": {
|
||||
"prefix": "s-transition-events",
|
||||
"body": [
|
||||
"on:${1|introstart,introend,outrostart,outroend|}=\"{() => status = '${1|introstart,introend,outrostart,outroend|}'}\""
|
||||
],
|
||||
"description": "transition-events"
|
||||
},
|
||||
"svelte-transition-local": {
|
||||
"prefix": "s-transition-local",
|
||||
"body": ["${1|transition,in,out|}:${2:name}|${3:local}"],
|
||||
"description": "transition local"
|
||||
},
|
||||
"svelte-transition-all": {
|
||||
"prefix": "s-transition-all",
|
||||
"body": ["${1|transition,in,out|}:${2:name}|${3:local}={${4:params}}"],
|
||||
"description": "transition"
|
||||
},
|
||||
"svelte-animate": {
|
||||
"prefix": "s-animate",
|
||||
"body": ["animate:${1:name}={${2:params}}"],
|
||||
"description": "animate"
|
||||
},
|
||||
"svelte-slot": {
|
||||
"prefix": "s-slot",
|
||||
"body": ["<slot>${1:<!-- optional fallback -->}</slot>"],
|
||||
"description": "slot"
|
||||
},
|
||||
"svelte-slot-name": {
|
||||
"prefix": "s-slot-name",
|
||||
"body": ["<slot name=\"${1:x}\">${2:<!-- optional fallback -->}</slot>"],
|
||||
"description": "slot w/ name"
|
||||
},
|
||||
"svelte-slot-prop": {
|
||||
"prefix": "s-slot-prop",
|
||||
"body": [
|
||||
"<slot ${1:prop}={${2:value}}>${3:<!-- optional fallback -->}</slot>"
|
||||
],
|
||||
"description": "slot w/ prop"
|
||||
},
|
||||
"svelte-self": {
|
||||
"prefix": "s-self",
|
||||
"body": ["<svelte:self />"],
|
||||
"description": "svelte:self"
|
||||
},
|
||||
"svelte-self-prop": {
|
||||
"prefix": "s-self-prop",
|
||||
"body": ["<svelte:self ${1:prop}={${2:value}} />"],
|
||||
"description": "svelte:self"
|
||||
},
|
||||
"svelte-component": {
|
||||
"prefix": "s-component",
|
||||
"body": ["<svelte:component this={${1:component}} />"],
|
||||
"description": "svelte:component"
|
||||
},
|
||||
"svelte-window": {
|
||||
"prefix": "s-window",
|
||||
"body": ["<svelte:window />"],
|
||||
"description": "svelte:window"
|
||||
},
|
||||
"svelte-window-bind": {
|
||||
"prefix": "s-window-bind",
|
||||
"body": [
|
||||
"bind:${1|innerWidth,innerHeight,outerWidth,outerHeight,scrollX,scrollY,online|}={${2:variable}}"
|
||||
],
|
||||
"description": "svelte:window bind properties"
|
||||
},
|
||||
"svelte-body": {
|
||||
"prefix": "s-body",
|
||||
"body": ["<svelte:body />"],
|
||||
"description": "svelte:body"
|
||||
},
|
||||
"svelte-head": {
|
||||
"prefix": "s-head",
|
||||
"body": ["<svelte:head>", "\t${1:<!-- head content -->}", "</svelte:head>"],
|
||||
"description": "svelte:head"
|
||||
},
|
||||
"svelte-options": {
|
||||
"prefix": "s-options",
|
||||
"body": [
|
||||
"<svelte:options ${1|immutable,accessors,namespace,tag|}={${2:value}}/>"
|
||||
],
|
||||
"description": "svelte:options"
|
||||
},
|
||||
"svelte-create-component": {
|
||||
"prefix": "s-create-component",
|
||||
"body": [
|
||||
"const component = new ${1:App}({",
|
||||
"\ttarget: ${2|target,document.body|},",
|
||||
"\tprops: ${3:props},",
|
||||
"\tanchor: ${4:anchor},",
|
||||
"\thydrate: ${5|false,true|},",
|
||||
"\tintro: ${5|false,true|}",
|
||||
"})"
|
||||
],
|
||||
"description": "svelte create component"
|
||||
},
|
||||
"svelte-reactive-statement": {
|
||||
"prefix": "s-reactive-statement",
|
||||
"body": ["$: ${1:variable} = ${2:prop}"],
|
||||
"description": "reactive statement"
|
||||
},
|
||||
"svelte-reactive-block": {
|
||||
"prefix": "s-reactive-block",
|
||||
"body": ["$: { ${1:console.log(${2:prop});}}"],
|
||||
"description": "reactive block"
|
||||
},
|
||||
"svelte-action": {
|
||||
"prefix": "s-action",
|
||||
"body": [
|
||||
"function ${1:foo}(node) {",
|
||||
"\t// the node has been mounted in the DOM",
|
||||
"\treturn {",
|
||||
"\t\tdestroy() {",
|
||||
"\t\t\t// the node has been removed from the DOM",
|
||||
"\t\t}",
|
||||
"\t};",
|
||||
"}"
|
||||
],
|
||||
"description": "action function"
|
||||
},
|
||||
"svelte-action-parameters": {
|
||||
"prefix": "s-action-parameters",
|
||||
"body": [
|
||||
"function ${1:foo}(node, ${2:parameters}) {",
|
||||
"\t// the node has been mounted in the DOM",
|
||||
"\treturn {",
|
||||
"\t\tdestroy() {",
|
||||
"\t\t\t// the node has been removed from the DOM",
|
||||
"\t\t}",
|
||||
"\t};",
|
||||
"}"
|
||||
],
|
||||
"description": "action function"
|
||||
},
|
||||
"svelte-action-update": {
|
||||
"prefix": "s-action-update",
|
||||
"body": [
|
||||
"function ${1:foo}(node, ${2:parameters}) {",
|
||||
"\t// the node has been mounted in the DOM",
|
||||
"\treturn {",
|
||||
"\t\tupdate(${2:parameters}) {",
|
||||
"\t\t\t// the value of `${2:parameters}` has changed",
|
||||
"\t\t}",
|
||||
"\t\tdestroy() {",
|
||||
"\t\t\t// the node has been removed from the DOM",
|
||||
"\t\t}",
|
||||
"\t};",
|
||||
"}"
|
||||
],
|
||||
"description": "action w/ update function"
|
||||
},
|
||||
"svelte-on-mount": {
|
||||
"prefix": "s-lifecycle-mount",
|
||||
"body": ["onMount(() => {", "\t${1:// content here}", "});"],
|
||||
"description": "onMount lifecycle function"
|
||||
},
|
||||
"svelte-before-update": {
|
||||
"prefix": "s-lifecycle-before-update",
|
||||
"body": ["beforeUpdate(() => {", "\t${1:// content here}", "});"],
|
||||
"description": "beforeUpdate lifecycle function"
|
||||
},
|
||||
"svelte-after-update": {
|
||||
"prefix": "s-lifecycle-after-update",
|
||||
"body": ["afterUpdate(() => {", "\t${1:// content here}", "});"],
|
||||
"description": "afterUpdate lifecycle function"
|
||||
},
|
||||
"svelte-on-destroy": {
|
||||
"prefix": "s-lifecycle-destroy",
|
||||
"body": ["onDestroy(() => {", "\t${1:// content here}", "});"],
|
||||
"description": "onDestroy lifecycle function"
|
||||
},
|
||||
"svelte-tick": {
|
||||
"prefix": "s-tick",
|
||||
"body": ["await tick()"],
|
||||
"description": "svelte tick function"
|
||||
},
|
||||
"svelte-set-context": {
|
||||
"prefix": "s-set-content",
|
||||
"body": ["setContext(${1:key}, ${2:context})"],
|
||||
"description": "svelte setContext"
|
||||
},
|
||||
"svelte-get-context": {
|
||||
"prefix": "s-get-content",
|
||||
"body": ["getContext(${1:key})"],
|
||||
"description": "svelte getContext"
|
||||
},
|
||||
"svelte-dispatch": {
|
||||
"prefix": "s-dispatch",
|
||||
"body": ["const dispatch = createEventDispatcher();"],
|
||||
"description": "svelte dispatch"
|
||||
},
|
||||
"svelte-dispatch-event": {
|
||||
"prefix": "s-dispatch-event",
|
||||
"body": ["dispatch(${1:key},${2:data})"],
|
||||
"description": "svelte dispatch event"
|
||||
},
|
||||
"svelte-writeable": {
|
||||
"prefix": "s-writeable",
|
||||
"body": ["const ${1:store} = writable(${2:initialValue});"],
|
||||
"description": "svelte writeable"
|
||||
},
|
||||
"svelte-writeable-set": {
|
||||
"prefix": "s-writeable-set",
|
||||
"body": [
|
||||
"const ${1:store} = writable(${2:initialValue}, () => {",
|
||||
"\t${3:console.log('got a subscriber');}",
|
||||
"\treturn () => ${4:console.log('no more subscribers');}",
|
||||
"});"
|
||||
],
|
||||
"description": "svelte writeable w/ set function"
|
||||
},
|
||||
"svelte-readable": {
|
||||
"prefix": "s-readable",
|
||||
"body": [
|
||||
"const ${1:store} = readable(${2:initialValue}, () => {",
|
||||
"\t${3:console.log('got a subscriber');}",
|
||||
"\treturn () => ${4:console.log('no more subscribers');}",
|
||||
"});"
|
||||
],
|
||||
"description": "svelte readable (set function required)"
|
||||
},
|
||||
"svelte-derived": {
|
||||
"prefix": "s-derived",
|
||||
"body": [
|
||||
"const ${1:derivedStore} = derived(${2:storeA}, $${2:storeA} => $${2:storeA} * 2);"
|
||||
],
|
||||
"description": "svelte derived store"
|
||||
},
|
||||
"svelte-derived-multiple": {
|
||||
"prefix": "s-derived-multiple",
|
||||
"body": [
|
||||
"const ${1:derivedStore} = derived([${2:storeA}, ${3:storeB}], ([$${2:storeA}, $${3:storeB}]) => $${2:storeA} + $${3:storeB});"
|
||||
],
|
||||
"description": "svelte derived store"
|
||||
},
|
||||
"svelte-derived-set": {
|
||||
"prefix": "s-derived-set",
|
||||
"body": [
|
||||
"const ${1:derivedStore} = derived(${2:storeA}, ($${2:storeA}, set) => {",
|
||||
"\tsetTimeout(() => set($${2:storeA}), 1000);",
|
||||
"}, 'one moment...');"
|
||||
],
|
||||
"description": "svelte derived store"
|
||||
},
|
||||
"svelte-derived-multiple-set": {
|
||||
"prefix": "s-derived-multiple-set",
|
||||
"body": [
|
||||
"const ${1:derivedStore} = derived([${2:storeA}, ${3:storeB}], ([$${2:storeA}, $${3:storeB}], set) => {",
|
||||
"\tsetTimeout(() => set($${2:storeA} + $${3:storeB}), 1000);",
|
||||
"}, 'one moment...');"
|
||||
],
|
||||
"description": "svelte derived store"
|
||||
},
|
||||
"svelte-store-get": {
|
||||
"prefix": "s-store-get-value",
|
||||
"body": ["const ${1:value} = get(${2:store});"],
|
||||
"description": "svelte get value from store"
|
||||
},
|
||||
"svelte-component-set": {
|
||||
"prefix": "s-component-set",
|
||||
"body": ["${1:component}.$set(${2: params});"],
|
||||
"description": "svelte component api $set"
|
||||
},
|
||||
"svelte-component-on": {
|
||||
"prefix": "s-component-on",
|
||||
"body": ["${1:component}.$on(${2:eventname}, ${3:handler});"],
|
||||
"description": "svelte component api $on"
|
||||
},
|
||||
"svelte-component-destroy": {
|
||||
"prefix": "s-component-destroy",
|
||||
"body": ["${1:component}.$destroy();"],
|
||||
"description": "svelte component api $destroy"
|
||||
},
|
||||
"svelte-render-component": {
|
||||
"prefix": "s-render-component",
|
||||
"body": [
|
||||
"const { head, html, css } = ${1:App}.render({",
|
||||
"\tprops: ${3:props},",
|
||||
"})"
|
||||
],
|
||||
"description": "svelte render component"
|
||||
},
|
||||
"svelte-tweened": {
|
||||
"prefix": "s-tweened",
|
||||
"body": ["const ${1:store} = tweened(${2:value}, ${3:options});"],
|
||||
"description": "svelte create tweened store"
|
||||
},
|
||||
"svelte-spring": {
|
||||
"prefix": "s-spring",
|
||||
"body": ["const ${1:store} = spring(${2:value}, ${3:options});"],
|
||||
"description": "svelte create spring store"
|
||||
},
|
||||
"svelte-register": {
|
||||
"prefix": "s-register",
|
||||
"body": [
|
||||
"require('svelte/register');",
|
||||
"const ${1:App} = require('${2:./App.svelte}').default;"
|
||||
],
|
||||
"description": "svelte register"
|
||||
}
|
||||
}
|
||||
175
dot_vim/plugged/friendly-snippets/snippets/swift.json
Normal file
175
dot_vim/plugged/friendly-snippets/snippets/swift.json
Normal file
@@ -0,0 +1,175 @@
|
||||
{
|
||||
"print": {
|
||||
"prefix": "print",
|
||||
"body": "print(\"$1\")\n$0",
|
||||
"description": "print(\"...\")"
|
||||
},
|
||||
"print value": {
|
||||
"prefix": "printv",
|
||||
"body": "print(\"\\($1)\")\n$0",
|
||||
"description": "print(\"\\(...)\")"
|
||||
},
|
||||
"while": {
|
||||
"prefix": "while",
|
||||
"body": [
|
||||
"while ${1:condition} {",
|
||||
"\t$0",
|
||||
"}"
|
||||
],
|
||||
"description": "while statement"
|
||||
},
|
||||
"repeat-while": {
|
||||
"prefix": "repeat",
|
||||
"body": [
|
||||
"repeat {",
|
||||
"\t$0",
|
||||
"} while ${1:condition}"
|
||||
],
|
||||
"description": "repeat-while statement"
|
||||
},
|
||||
"for": {
|
||||
"prefix": "for",
|
||||
"body": [
|
||||
"for ${1:item} in ${2:collection} {",
|
||||
"\t$0",
|
||||
"}"
|
||||
],
|
||||
"description": "for-in statement"
|
||||
},
|
||||
"if": {
|
||||
"prefix": "if",
|
||||
"body": [
|
||||
"if ${1:condition} {",
|
||||
"\t$0",
|
||||
"}"
|
||||
],
|
||||
"description": "if statement"
|
||||
},
|
||||
"else if": {
|
||||
"prefix": "elif",
|
||||
"body": [
|
||||
"else if ${1:condition} {",
|
||||
"\t$0",
|
||||
"}"
|
||||
],
|
||||
"description": "else clause with a nested if statement"
|
||||
},
|
||||
"else": {
|
||||
"prefix": "else",
|
||||
"body": [
|
||||
"else {",
|
||||
"\t$0",
|
||||
"}"
|
||||
],
|
||||
"description": "else clause"
|
||||
},
|
||||
"if let": {
|
||||
"prefix": "iflet",
|
||||
"body": [
|
||||
"if let ${1:value} = ${2:optional} {",
|
||||
"\t$0",
|
||||
"}"
|
||||
],
|
||||
"description": "if statement with optional binding"
|
||||
},
|
||||
"guard": {
|
||||
"prefix": "guard",
|
||||
"body": [
|
||||
"guard ${1:condition} else {",
|
||||
"\t$0",
|
||||
"}"
|
||||
],
|
||||
"description": "guard statement"
|
||||
},
|
||||
"guard let": {
|
||||
"prefix": "guardlet",
|
||||
"body": [
|
||||
"guard let ${1:value} = ${2:optional} else {",
|
||||
"\t$0",
|
||||
"}"
|
||||
],
|
||||
"description": "guard statement with optional binding"
|
||||
},
|
||||
"switch": {
|
||||
"prefix": "switch",
|
||||
"body": [
|
||||
"switch ${1:value} {",
|
||||
"case ${2:pattern}:",
|
||||
"\t$0",
|
||||
"default:",
|
||||
"\t",
|
||||
"}"
|
||||
],
|
||||
"description": "switch statement"
|
||||
},
|
||||
"do": {
|
||||
"prefix": "do",
|
||||
"body": [
|
||||
"do {",
|
||||
"\t$0",
|
||||
"} catch ${1:error} {",
|
||||
"\t$2",
|
||||
"}"
|
||||
],
|
||||
"description": "do statement"
|
||||
},
|
||||
"func": {
|
||||
"prefix": "func",
|
||||
"body": [
|
||||
"func ${1:name}(${2:parameters}) -> ${3:Type} {",
|
||||
"\t$0",
|
||||
"}"
|
||||
],
|
||||
"description": "function declaration"
|
||||
},
|
||||
"struct": {
|
||||
"prefix": "struct",
|
||||
"body": [
|
||||
"struct ${1:Name} {",
|
||||
"",
|
||||
"\t$0",
|
||||
"}"
|
||||
],
|
||||
"description": "struct declaration"
|
||||
},
|
||||
"enum": {
|
||||
"prefix": "enum",
|
||||
"body": [
|
||||
"enum ${1:Name} {",
|
||||
"",
|
||||
"\tcase $0",
|
||||
"}"
|
||||
],
|
||||
"description": "enum declaration"
|
||||
},
|
||||
"class": {
|
||||
"prefix": "class",
|
||||
"body": [
|
||||
"class ${1:Name} {",
|
||||
"",
|
||||
"\t$0",
|
||||
"}"
|
||||
],
|
||||
"description": "class declaration"
|
||||
},
|
||||
"protocol": {
|
||||
"prefix": "protocol",
|
||||
"body": [
|
||||
"protocol ${1:Name} {",
|
||||
"",
|
||||
"\t$0",
|
||||
"}"
|
||||
],
|
||||
"description": "protocol declaration"
|
||||
},
|
||||
"extension": {
|
||||
"prefix": "extension",
|
||||
"body": [
|
||||
"extension ${1:Type} {",
|
||||
"",
|
||||
"\t$0",
|
||||
"}"
|
||||
],
|
||||
"description": "extension declaration"
|
||||
}
|
||||
}
|
||||
1434
dot_vim/plugged/friendly-snippets/snippets/systemverilog.json
Normal file
1434
dot_vim/plugged/friendly-snippets/snippets/systemverilog.json
Normal file
File diff suppressed because it is too large
Load Diff
114
dot_vim/plugged/friendly-snippets/snippets/verilog.json
Normal file
114
dot_vim/plugged/friendly-snippets/snippets/verilog.json
Normal file
@@ -0,0 +1,114 @@
|
||||
{
|
||||
"if": {
|
||||
"prefix": "if",
|
||||
"body": ["if (${1}) begin", "\n${0}", "\nend"],
|
||||
"description": "If statement"
|
||||
},
|
||||
"if-else": {
|
||||
"prefix": "ife",
|
||||
"body": [
|
||||
"if (${1}) begin",
|
||||
"\n\t${2}",
|
||||
"\nend",
|
||||
"\nelse begin",
|
||||
"\n\t${3}",
|
||||
"\nend"
|
||||
],
|
||||
"description": "If-else statement"
|
||||
},
|
||||
"else-if": {
|
||||
"prefix": "eif",
|
||||
"body": ["else if (${1}) begin", "\n${0}", "\nend"],
|
||||
"description": "else-if statement"
|
||||
},
|
||||
"else": {
|
||||
"prefix": "el",
|
||||
"body": ["else begin", "\n${0}", "\nend"],
|
||||
"description": "else-if statement"
|
||||
},
|
||||
"while": {
|
||||
"prefix": "wh",
|
||||
"body": ["whlie (${1}) begin\n\t${0}\nend"],
|
||||
"description": "While loop"
|
||||
},
|
||||
"repeat loop": {
|
||||
"prefix": "repeat (${1}) begin",
|
||||
"body": ["repeat (${1}) begin\n\t${0}\nend"],
|
||||
"description": "Repeat loop"
|
||||
},
|
||||
"case statement": {
|
||||
"prefix": "case",
|
||||
"body": [
|
||||
"case (${1:variable})\n\t${2: value}: begin\n\t\t${3}\n\tend\ndefault: begin\n\t${4}\n",
|
||||
"end",
|
||||
"endcase"
|
||||
],
|
||||
"description": "Case Statement"
|
||||
},
|
||||
"casez statement": {
|
||||
"prefix": "casez",
|
||||
"body": [
|
||||
"casez (${1:variable})\n\t${2: value}: begin\n\t\t${3}\n\tend\ndefault: begin\n\t${4}\n",
|
||||
"end",
|
||||
"endcase"
|
||||
],
|
||||
"description": "Casez Statement"
|
||||
},
|
||||
"always block": {
|
||||
"prefix": "al",
|
||||
"body": ["always @(${1:Sensitive list}) begin\n", "\t${0}", "\nend"],
|
||||
"description": "Always block"
|
||||
},
|
||||
"module block": {
|
||||
"prefix": "modu",
|
||||
"body": ["module ${1:FILENAME} (\n\t${2}\n);", "\t${0}", "\nendmodule"],
|
||||
"description": "Module Block"
|
||||
},
|
||||
"for": {
|
||||
"prefix": "for",
|
||||
"body": [
|
||||
"for (int ${2:i} = 0; $2 < ${1:count}; $2${3:++}) begin",
|
||||
"\n\t${4}",
|
||||
"\nend"
|
||||
],
|
||||
"description": "For loop"
|
||||
},
|
||||
"forever": {
|
||||
"prefix": "forev",
|
||||
"body": ["forever begin\n\t${0}\nend"],
|
||||
"description": "Forever loop"
|
||||
},
|
||||
"function": {
|
||||
"prefix": "fun",
|
||||
"body": [
|
||||
"function ${1:void} ${2:name}(${3});",
|
||||
"\n\t${0}",
|
||||
"endfunction: $2"
|
||||
],
|
||||
"description": "Function snippet"
|
||||
},
|
||||
"task": {
|
||||
"prefix": "task",
|
||||
"body": ["task ${1:name}(${2});", "\n\t${0}", "\nendtask: $1"],
|
||||
"description": "Task snippet"
|
||||
},
|
||||
"Initial Begin": {
|
||||
"prefix": "ini",
|
||||
"body": ["initial begin\n\t${0}\nend"],
|
||||
"description": "Initial Begin"
|
||||
},
|
||||
"typedef struct packed": {
|
||||
"prefix": "tdsp",
|
||||
"body": ["typedef struct packed {", "\n\tint ${2:data};", "\n${1:name}"],
|
||||
"description": "Typedef struct packed"
|
||||
},
|
||||
"typedef enum": {
|
||||
"prefix": "tde",
|
||||
"body": [
|
||||
"typedef enum ${2:logic[15:0]} \n{",
|
||||
"\n${3:REG = 16'h0000}",
|
||||
"\n} ${1:my_dest_t};"
|
||||
],
|
||||
"description": "Typedef enum"
|
||||
}
|
||||
}
|
||||
249
dot_vim/plugged/friendly-snippets/snippets/vhdl.json
Normal file
249
dot_vim/plugged/friendly-snippets/snippets/vhdl.json
Normal file
@@ -0,0 +1,249 @@
|
||||
{
|
||||
"ieee_imports": {
|
||||
"prefix": "ieee",
|
||||
"description": "IEEE Standard Packages",
|
||||
"body": [
|
||||
"library IEEE;",
|
||||
"use IEEE.std_logic_1164.all;",
|
||||
"use IEEE.numeric_std.all;"
|
||||
]
|
||||
},
|
||||
"entity_declaration": {
|
||||
"prefix": "ent",
|
||||
"description": "Entity Declaration",
|
||||
"body": [
|
||||
"entity ${1:$TM_FILENAME_BASE} is",
|
||||
"\tport (",
|
||||
"\t\t$0",
|
||||
"\t);",
|
||||
"end entity ${1:$TM_FILENAME_BASE};"
|
||||
]
|
||||
},
|
||||
"architecture_declaration": {
|
||||
"prefix": "arch",
|
||||
"description": "Architecture Declaration",
|
||||
"body": [
|
||||
"architecture ${1:rtl} of ${2:$TM_FILENAME_BASE} is",
|
||||
"\t",
|
||||
"begin",
|
||||
"\t",
|
||||
"\t$0",
|
||||
"\t",
|
||||
"end architecture ${1:rtl};"
|
||||
]
|
||||
},
|
||||
"configuration_declaration": {
|
||||
"prefix": "conf",
|
||||
"description": "Configuration Declaration",
|
||||
"body": [
|
||||
"configuration ${1:rtl} of ${2:$TM_FILENAME_BASE} is",
|
||||
"\t",
|
||||
"\t$0",
|
||||
"\t",
|
||||
"end configuration ${1:rtl};"
|
||||
]
|
||||
},
|
||||
"package_declaration": {
|
||||
"prefix": "pack",
|
||||
"description": "Package Declaration",
|
||||
"body": [
|
||||
"package ${1:$TM_FILENAME_BASE} is",
|
||||
"\t",
|
||||
"\t$0",
|
||||
"\t",
|
||||
"end package ${1:$TM_FILENAME_BASE};"
|
||||
]
|
||||
},
|
||||
"package_body_declaration": {
|
||||
"prefix": "pack",
|
||||
"description": "Package Body Declaration",
|
||||
"body": [
|
||||
"package body ${1:$TM_FILENAME_BASE} is",
|
||||
"\t",
|
||||
"\t$0",
|
||||
"\t",
|
||||
"end package body ${1:$TM_FILENAME_BASE};"
|
||||
]
|
||||
},
|
||||
"case": {
|
||||
"prefix": "case",
|
||||
"description": "Case Statement",
|
||||
"body": [
|
||||
"case ${1:expression} is",
|
||||
"\twhen ${2:choice} =>",
|
||||
"\t\t$0",
|
||||
"",
|
||||
"\twhen others =>",
|
||||
"\t\t",
|
||||
"",
|
||||
"end case;"
|
||||
]
|
||||
},
|
||||
"case_generate": {
|
||||
"prefix": "case",
|
||||
"description": "Case Generate Statement",
|
||||
"body": [
|
||||
"${1:generate_label}: case ${2:expression} generate",
|
||||
"\twhen ${3:choice} =>",
|
||||
"\t\t$0",
|
||||
"",
|
||||
"\twhen others =>",
|
||||
"\t\tnull;",
|
||||
"",
|
||||
"end generate $1;"
|
||||
]
|
||||
},
|
||||
"if": {
|
||||
"prefix": "if",
|
||||
"description": "If Statement",
|
||||
"body": [
|
||||
"if ${1:condition} then",
|
||||
"\t$0",
|
||||
"end if;"
|
||||
]
|
||||
},
|
||||
"if_generate": {
|
||||
"prefix": "if",
|
||||
"description": "If Generate Statement",
|
||||
"body": [
|
||||
"${1:generate_label}: if ${2:condition} generate",
|
||||
"\t$0",
|
||||
"end generate $1;"
|
||||
]
|
||||
},
|
||||
"for": {
|
||||
"prefix": "for",
|
||||
"description": "For Loop",
|
||||
"body": [
|
||||
"for ${1:loop_var} in ${2:range} loop",
|
||||
"\t$0",
|
||||
"end loop;"
|
||||
]
|
||||
},
|
||||
"for_generate": {
|
||||
"prefix": "for",
|
||||
"description": "For Generate",
|
||||
"body": [
|
||||
"${1:generate_label}: for ${2:iteration} generate",
|
||||
"\t$0",
|
||||
"end generate $1;"
|
||||
]
|
||||
},
|
||||
"assert": {
|
||||
"prefix": "assert",
|
||||
"description": "Assertion",
|
||||
"body": [
|
||||
"assert ${1:neg_condition} report ${2:message} severity ${3|note,warning,error,failure|};"
|
||||
]
|
||||
},
|
||||
"enumeration_type": {
|
||||
"prefix": "typeenum",
|
||||
"description": "Enumeration type declaration",
|
||||
"body": [
|
||||
"type ${1:type_name} is (${0});"
|
||||
]
|
||||
},
|
||||
"array_type": {
|
||||
"prefix": "typearray",
|
||||
"description": "Array type declaration",
|
||||
"body": [
|
||||
"type ${1:type_name} is array (${2:range}) of ${3:element_type};"
|
||||
]
|
||||
},
|
||||
"record_type": {
|
||||
"prefix": "typerecord",
|
||||
"description": "Record type declaration",
|
||||
"body": [
|
||||
"type ${1:type_name} is record",
|
||||
"\t${0}",
|
||||
"end record ${1:type_name};"
|
||||
]
|
||||
},
|
||||
"subtype": {
|
||||
"prefix": "subt",
|
||||
"description": "Subtype declaration",
|
||||
"body": [
|
||||
"subtype ${1:subtype_name} is ${2:base_type} range ${3:0} ${4|to,downto|} ${5:7};"
|
||||
]
|
||||
},
|
||||
"testbench_process": {
|
||||
"prefix": "tproc, processt",
|
||||
"description": "Testbench Process (No Sensitivity List)",
|
||||
"body": [
|
||||
"${1:proc_name}: process",
|
||||
"begin",
|
||||
"\t$0",
|
||||
"end process $1;"
|
||||
]
|
||||
},
|
||||
"combinational_process": {
|
||||
"prefix": "cproc, processc",
|
||||
"description": "Combinational Process",
|
||||
"body": [
|
||||
"${1:proc_name}: process(${2:sensitivity_list})",
|
||||
"begin",
|
||||
"\t$0",
|
||||
"end process $1;"
|
||||
]
|
||||
},
|
||||
"asynchronous_reset_clocked_process": {
|
||||
"prefix": "aproc, processa",
|
||||
"description": "Clocked Process (Asynchronous Reset)",
|
||||
"body": [
|
||||
"${1:proc_name}: process(${3:clk}, ${4:rst})",
|
||||
"begin",
|
||||
"\tif ${4:rst} = ${5:rst_val} then",
|
||||
"\t\t$0",
|
||||
"\telsif ${2|rising_edge,falling_edge|}(${3:clk}) then",
|
||||
"\t\t",
|
||||
"\tend if;",
|
||||
"end process $1;"
|
||||
]
|
||||
},
|
||||
"synchronous_reset_clocked_process": {
|
||||
"prefix": "sproc, processs",
|
||||
"description": "Clocked Process (Synchronous Reset)",
|
||||
"body": [
|
||||
"${1:proc_name}: process(${3:clk})",
|
||||
"begin",
|
||||
"\tif ${2|rising_edge,falling_edge|}(${3:clk}) then",
|
||||
"\t\tif ${4:rst} = ${5:rst_val} then",
|
||||
"\t\t\t$0",
|
||||
"\t\telse",
|
||||
"\t\t\t",
|
||||
"\t\tend if;",
|
||||
"\tend if;",
|
||||
"end process $1;"
|
||||
]
|
||||
},
|
||||
"std_logic_vector": {
|
||||
"prefix": "std",
|
||||
"description": "std_logic_vector Type",
|
||||
"body": "std_logic_vector(${1:7} ${2|downto,to|} ${3:0})"
|
||||
},
|
||||
"std_ulogic_vector": {
|
||||
"prefix": "stdu",
|
||||
"description": "std_ulogic_vector Type",
|
||||
"body": "std_ulogic_vector(${1:7} ${2|downto,to|} ${3:0})"
|
||||
},
|
||||
"signed": {
|
||||
"prefix": "si",
|
||||
"description": "signed Type",
|
||||
"body": "signed(${1:7} ${2|downto,to|} ${3:0})"
|
||||
},
|
||||
"unsigned": {
|
||||
"prefix": "uns",
|
||||
"description": "unsigned Type",
|
||||
"body": "unsigned(${1:7} ${2|downto,to|} ${3:0})"
|
||||
},
|
||||
"zeroes": {
|
||||
"prefix": "oth",
|
||||
"description": "Zero Others",
|
||||
"body": "others => '0'"
|
||||
},
|
||||
"integer_range_limitation": {
|
||||
"prefix": "intr",
|
||||
"description": "Integer (Range Limitation)",
|
||||
"body": "integer range ${1:0} ${2|downto,to|} ${3:255}"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user