vscode
This commit is contained in:
68
vscode/snippets/gbs.code-snippets
Normal file
68
vscode/snippets/gbs.code-snippets
Normal file
@ -0,0 +1,68 @@
|
||||
{
|
||||
/*
|
||||
Die Snippets ermöglichen es euch, anstelle von den Kommentaren einfach die Abkürzungen zu verwenden.
|
||||
Wenn ihr also zum Beispiel im C-Code die Punkte anmerken wollt, navigiert an die entsprechende Stelle und
|
||||
tippt dort das Kürzel "pkt" ein. Die VSCode-Autovervollständigung schlägt dann das entsprechende Snippet vor.
|
||||
|
||||
Mit TAB kann man dann durch die Eingabefelder ($1, $2) navigieren.
|
||||
*/
|
||||
"PUNKTE C" : {
|
||||
"scope" : "c",
|
||||
"prefix" : "pkt",
|
||||
"body": ["// PUNKTE: $1"]
|
||||
},
|
||||
"PUNKTE" : {
|
||||
"scope" : "plaintext,markdown",
|
||||
"prefix" : "pkt",
|
||||
"body" : ["PUNKTE: $1"]
|
||||
},
|
||||
"ANMERKUNG C" : {
|
||||
"scope": "c",
|
||||
"prefix": "anm",
|
||||
"body" : ["// ANMERKUNG: $1"]
|
||||
},
|
||||
"multiline ANMERKUNG C" : {
|
||||
"scope" : "c",
|
||||
"prefix": "manm",
|
||||
"body" : ["/* ANMERKUNG:", "\t$1", "*/"]
|
||||
},
|
||||
"ANMERKUNG" : {
|
||||
"scope": "plaintext,markdown",
|
||||
"prefix": "anm",
|
||||
"body" : ["ANMERKUNG: $1"]
|
||||
},
|
||||
"KORREKTUR C" : {
|
||||
"scope" : "c",
|
||||
"prefix": "krk",
|
||||
"body" : ["// KORREKTUR: $1 (-$2P)"]
|
||||
},
|
||||
"multiline KORREKTUR C" : {
|
||||
"scope" : "c",
|
||||
"prefix": "mkrk",
|
||||
"body" : ["/* KORREKTUR:", "\t$1 (-$2P)", "*/"]
|
||||
},
|
||||
"KORREKTUR" : {
|
||||
"scope" : "plaintext,markdown",
|
||||
"prefix": "krk",
|
||||
"body" : ["KORREKTUR: $1 (-$2P)"]
|
||||
},
|
||||
"change to multiline KORREKTUR c" : {
|
||||
"scope" : "c",
|
||||
"prefix" : "cmkrk",
|
||||
"body" : [
|
||||
"\n/* KORREKTUR:",
|
||||
"\t${TM_CURRENT_LINE/.+KORREKTUR: (.*) \\(-P\\) .*/$1/}",
|
||||
"\t(-$2P)",
|
||||
"*/"
|
||||
]
|
||||
},
|
||||
"change to multiline ANMERKUNG c" : {
|
||||
"scope" : "c",
|
||||
"prefix" : "cmanm",
|
||||
"body" : [
|
||||
"\n/* ANMERKUNG:",
|
||||
"\t${TM_CURRENT_LINE/.+ANMERKUNG: (.*) c.*/$1/}",
|
||||
"*/"
|
||||
]
|
||||
}
|
||||
}
|
||||
15
vscode/snippets/markdown.json
Normal file
15
vscode/snippets/markdown.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
// Place your snippets for markdown 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"
|
||||
// }
|
||||
}
|
||||
49
vscode/snippets/py-main.code-snippets
Normal file
49
vscode/snippets/py-main.code-snippets
Normal file
@ -0,0 +1,49 @@
|
||||
{
|
||||
// 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"
|
||||
// }
|
||||
"python main method" : {
|
||||
"scope": "python",
|
||||
"prefix": "pymain",
|
||||
"body": [
|
||||
"if __name__ == \"__main__\":",
|
||||
"\t"
|
||||
],
|
||||
"description": "Add a main method."
|
||||
},
|
||||
"python argparse" : {
|
||||
"scope": "python",
|
||||
"prefix": "ap",
|
||||
"body": [
|
||||
"import argparse",
|
||||
"",
|
||||
"if __name__ == \"__main__\":",
|
||||
"\t",
|
||||
"\tparser = argparse.ArgumentParser()",
|
||||
"\targs = parser.parse_args()"
|
||||
]
|
||||
},
|
||||
"python argparse add argument" : {
|
||||
"scope": "python",
|
||||
"prefix": "apadd",
|
||||
"body": "parser.add_argument(\"${1:-o}\", dest=\"${2:o}\", type=${3:str}, help=\"${4:option}\")"
|
||||
},
|
||||
"python shebang" : {
|
||||
"scope": "python",
|
||||
"prefix": "sb",
|
||||
"body": "#!/usr/bin/python3"
|
||||
}
|
||||
}
|
||||
40
vscode/snippets/tsx.code-snippets
Normal file
40
vscode/snippets/tsx.code-snippets
Normal file
@ -0,0 +1,40 @@
|
||||
{
|
||||
// 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"
|
||||
// }
|
||||
"boilerplate" : {
|
||||
"scope" : "typescriptreact",
|
||||
"prefix" : "bp",
|
||||
"body" : [
|
||||
"import { Typography } from \"@mui/material\";",
|
||||
""
|
||||
"type Props = {};",
|
||||
"",
|
||||
"export default function $1({}: Props){",
|
||||
"\treturn <Typography>TODO</Typography>;"
|
||||
"}"
|
||||
]
|
||||
},
|
||||
"grid-item" : {
|
||||
"scope" : "typescriptreact",
|
||||
"prefix" : "gi",
|
||||
"body" : [
|
||||
"<Grid item xs={$1}>",
|
||||
"\t$2",
|
||||
"</Grid>"
|
||||
]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user