Skip to content

Commit

Permalink
Merge pull request #28 from BlueAndi/Snippets
Browse files Browse the repository at this point in the history
Snippets
  • Loading branch information
BlueAndi authored Nov 5, 2023
2 parents 7677998 + 74e3089 commit 5a1947c
Show file tree
Hide file tree
Showing 2 changed files with 208 additions and 1 deletion.
205 changes: 205 additions & 0 deletions .vscode/templates.code-snippets
Original file line number Diff line number Diff line change
@@ -0,0 +1,205 @@
{
// Place your RadonUlzer workspace 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"
// }
"Simple Comment": {
"prefix": "comment",
"scope": "c, cpp",
"body": [
"/* ${1:Comment} */"
],
"description": "Simple C-styled comment."
},
"Doxygen In-Line Comment": {
"prefix": "doxy_inline",
"scope": "c, cpp",
"body": [
"/**< ${1:Comment} */",
],
"description": "Simple in-line Doxygen comment."
},
"Doxygen Comment": {
"prefix": "doxy_comment",
"scope": "c, cpp",
"body": [
"/** ${1:Comment} */",
"$0"
],
"description": "Simple Doxygen comment."
},
"Doxygen Block Comment/Description": {
"prefix": "doxy_block",
"scope": "c, cpp",
"body": [
"/**",
" * ${1:description}",
" *",
" * ${2:parameters}",
" *",
" * ${3:returns}",
" */",
"$0"
],
"description": "Doxygen comment/description block."
},
"Template Header File": {
"prefix": "template_header",
"scope": "c, cpp",
"body": [
"/* MIT License",
" *",
" * Copyright (c) $CURRENT_YEAR Andreas Merkle <[email protected]>",
" *",
" * 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.",
" */",
"",
"/*******************************************************************************",
" DESCRIPTION",
"*******************************************************************************/",
"/**",
" * @brief ${1:Description}.",
" * @author ${2:Author}",
" *",
" * @addtogroup ${3:doxygen group}",
" *",
" * @{",
" */",
"#ifndef ${4:FILE_NAME}_H",
"#define ${4:FILE_NAME}_H",
"",
"/******************************************************************************",
" * Compile Switches",
" *****************************************************************************/",
"$0",
"/******************************************************************************",
" * Includes",
" *****************************************************************************/",
"",
"/******************************************************************************",
" * Macros",
" *****************************************************************************/",
"",
"/******************************************************************************",
" * Types and Classes",
" *****************************************************************************/",
"",
"/******************************************************************************",
" * Functions",
" *****************************************************************************/",
"",
"#endif /* ${4:FILE_NAME}_H */",
"/** @} */",
""
],
"description": "Template for a header file."
},
"Template Source File": {
"prefix": "template_source",
"scope": "c, cpp",
"body": [
"/* MIT License",
" *",
" * Copyright (c) $CURRENT_YEAR Andreas Merkle <[email protected]>",
" *",
" * 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.",
" */",
"",
"/*******************************************************************************",
" DESCRIPTION",
"*******************************************************************************/",
"/**",
" * @brief ${1:Description}",
" * @author ${2:Author}",
" */",
"",
"/******************************************************************************",
" * Includes",
" *****************************************************************************/",
"",
"#include \"${3:File Name}.h\"",
"$0",
"/******************************************************************************",
" * Compiler Switches",
" *****************************************************************************/",
"",
"/******************************************************************************",
" * Macros",
" *****************************************************************************/",
"",
"/******************************************************************************",
" * Types and classes",
" *****************************************************************************/",
"",
"/******************************************************************************",
" * Prototypes",
" *****************************************************************************/",
"",
"/******************************************************************************",
" * Local Variables",
" *****************************************************************************/",
"",
"/******************************************************************************",
" * Protected Methods",
" *****************************************************************************/",
"",
"/******************************************************************************",
" * Private Methods",
" *****************************************************************************/",
"",
"/******************************************************************************",
" * External Functions",
" *****************************************************************************/",
"",
"/******************************************************************************",
" * Local Functions",
" *****************************************************************************/",
""
],
"description": "Template for a source file."
}
}
4 changes: 3 additions & 1 deletion RadonUlzer.code-workspace
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,7 @@
"path": "."
}
],
"settings": {}
"settings": {
"editor.formatOnSave": true
}
}

0 comments on commit 5a1947c

Please sign in to comment.