This commit is contained in:
2025-11-12 19:03:13 +08:00
parent 1c92add6e1
commit 601ccbaf14
6 changed files with 699 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
{
// Place your snippets for css here. Each snippet is defined under a snippet name and has a prefix, body and
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the
// same ids are connected.
// Example:
// "Print to console": {
// "prefix": "log",
// "body": [
// "console.log('$1');",
// "$2"
// ],
// "description": "Log output to console"
// }
}

View File

@@ -0,0 +1,32 @@
{
// Place your GLOBAL snippets here. Each snippet is defined under a snippet name and has a scope, prefix, body and
// description. Add comma separated ids of the languages where the snippet is applicable in the scope field. If scope
// is left empty or omitted, the snippet gets applied to all languages. The prefix is what is
// used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders.
// Placeholders with the same ids are connected.
// Example:
// "Print to console": {
// "scope": "javascript,typescript",
// "prefix": "log",
// "body": [
// "console.log('$1');",
// "$2"
// ],
// "description": "Log output to console"
// }
"One line TODO": {
"prefix": ["todo", "туду", "nele", "ещвщ"],
"body": [
"${LINE_COMMENT} TODO: ${0}",
],
},
"Muliline TODO": {
"prefix": ["todom", "тудум", "nelev", "ещвщм"],
"body": [
"${BLOCK_COMMENT_START}",
"${LINE_COMMENT} TODO: ${0}",
"${BLOCK_COMMENT_END}"
],
}
}

View File

@@ -0,0 +1,96 @@
{
"DocBlock": {
"description": "Комментарий для функции",
"prefix": ["doc", "док", "вщс", "ljr"],
"body": [
"",
"${LINE_COMMENT}purpose\t${1}",
"${LINE_COMMENT}argument\t\\$1 - ${2}",
"${LINE_COMMENT}exitcode\t0 - ${3}",
"${LINE_COMMENT}returns\t${4}",
"${LINE_COMMENT}usage\t\t${0}",
],
},
"Condition: if": {
"description": "Условие (простое)",
"prefix": ["if", "ша"],
"body": [
"if ${1}; then",
" ${0}",
"fi",
],
},
"Condition: if []": {
"description": "Условие (со скобками [])",
"prefix": ["if2", "ша"],
"body": [
"if [ ${1} ]; then",
" ${0}",
"fi",
],
},
"Condition: if [[]]": {
"description": "Условие (со скобками [[]])",
"prefix": ["if3", "ша"],
"body": [
"if [[ ${1} ]]; then",
" ${0}",
"fi",
],
},
"Condition: if ... else ...": {
"description": "Условие (с двумя ветками)",
"prefix": ["ifel", "шауд"],
"body": [
"if [ ${1} ]; then",
" ${2}",
"else",
" ${0}",
"fi",
],
},
"Loop: for": {
"description": "Цикл по счётчику",
"prefix": ["for", "ащк"],
"body": [
"for ((idx=${1:0}; idx<${2:\\$limit}; ++idx)) do",
" ${0}",
"done",
],
},
"Loop: for in": {
"description": "Цикл по массиву",
"prefix": ["forin", "ащкшт"],
"body": [
"for var in \"${${1:array}[@]}\"; do",
" ${0:}",
"done",
],
},
"Loop: while": {
"description": "Цикл",
"prefix": ["while", "цршду"],
"body": [
"while ${1:true}; do",
" ${0}",
"done"
],
},
"Function": {
"description": "Функция",
"prefix": ["func", "агтс"],
"body": [
"${1:myfunc}() {",
" ${0}",
"}"
],
},
"Hashbang": {
"description": "Hashbang",
"prefix": ["bb", "#!"],
"body": [
"#!/usr/bin/env bash"
],
}
}