Add snippets
This commit is contained in:
parent
41ee0b00be
commit
d704c3b289
|
@ -59,6 +59,12 @@
|
|||
"CMakeCache"
|
||||
]
|
||||
}
|
||||
],
|
||||
"snippets": [
|
||||
{
|
||||
"language": "cmake",
|
||||
"path": "./snippets.json"
|
||||
}
|
||||
]
|
||||
},
|
||||
"scripts": {
|
||||
|
|
|
@ -0,0 +1,59 @@
|
|||
{
|
||||
"Function": {
|
||||
"prefix": "function",
|
||||
"body": [
|
||||
"function($1)",
|
||||
"\t$2",
|
||||
"endfunction()"
|
||||
]
|
||||
},
|
||||
"While Loop": {
|
||||
"prefix": "while",
|
||||
"body": [
|
||||
"while($1)",
|
||||
"\t$2",
|
||||
"endwhile()"
|
||||
]
|
||||
},
|
||||
"Foreach Loop": {
|
||||
"prefix": "foreach",
|
||||
"body": [
|
||||
"foreach(VAR $1)",
|
||||
"\t$2",
|
||||
"endforeach()"
|
||||
]
|
||||
},
|
||||
"If Condition": {
|
||||
"prefix": "if",
|
||||
"body": [
|
||||
"if($1)",
|
||||
"\t$2",
|
||||
"endif()"
|
||||
]
|
||||
},
|
||||
"CMake Minimum Version": {
|
||||
"prefix": "cmake_minimum_required",
|
||||
"body": "cmake_minimum_required(VERSION $1)"
|
||||
},
|
||||
"Project Command": {
|
||||
"prefix": "project",
|
||||
"body": [
|
||||
"project($1",
|
||||
" VERSION $2",
|
||||
" LANGUAGES C CXX",
|
||||
" DESCRIPTION \"$3\")"
|
||||
]
|
||||
},
|
||||
"Add An Executable": {
|
||||
"prefix": "add_executable",
|
||||
"body": "add_executable($1)"
|
||||
},
|
||||
"Add A Library": {
|
||||
"prefix": "add_library",
|
||||
"body": "add_library($1)"
|
||||
},
|
||||
"Link Libraries": {
|
||||
"prefix": "target_link_libraries",
|
||||
"body": "target_link_libraries($1)"
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue