Skip to content

Instantly share code, notes, and snippets.

@caiofcm
Created August 30, 2019 16:10
Show Gist options
  • Select an option

  • Save caiofcm/58dc0664babbdc1895c00348cb8501ee to your computer and use it in GitHub Desktop.

Select an option

Save caiofcm/58dc0664babbdc1895c00348cb8501ee to your computer and use it in GitHub Desktop.
VSCode snippets - Comment, import
{
/*
// Place your snippets for Python 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"
}
*/
"Section Delimiter": {
"prefix": "secd",
"body": [
"############################################\n###########################################\n#\n#\n# \t $1 \t \n#\n#\n###########################################\n###########################################",
"$2"
]
},
"Subsection Delimiter": {
"prefix": "ssecd",
"body": [
"#--------------------------------------------\n# \t $1 \t \n#--------------------------------------------",
"$2"
]
},
"Import x from module": {
"prefix": "fromimp",
"body": [
"from $1 import $2",
"$3"
]
},
"Numpy and Matplotlib imports": {
"prefix": "impnp",
"body": [
"import numpy as np",
"from matplotlib import pyplot as plt",
"$2"
]
}
}
{
// 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"
// }
"Section Delimiter": {
"prefix": "secd",
"body": [
"$LINE_COMMENT############################################\n$LINE_COMMENT###########################################\n$LINE_COMMENT\n$LINE_COMMENT\n$LINE_COMMENT\t$1\t\n$LINE_COMMENT\n$LINE_COMMENT\n$LINE_COMMENT###########################################\n$LINE_COMMENT###########################################\n",
"$2"
]
},
"Subsection Delimiter": {
"prefix": "ssecd",
"body": [
"$LINE_COMMENT--------------------------------------------\n$LINE_COMMENT\t$1\t\n$LINE_COMMENT--------------------------------------------",
"$2"
]
},
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment