Fix indentations

Add more snippet
This commit is contained in:
Geequlim
2017-08-14 20:47:31 +08:00
parent 921977fbdb
commit 57b6f1ad01
2 changed files with 32 additions and 3 deletions

View File

@@ -24,6 +24,6 @@
],
"indentationRules": {
"increaseIndentPattern": "^\\s*((class|func|else|elif|for|if|match|while|enum)|(.*\\sdo\\b))\\b[^\\{;]*$",
"decreaseIndentPattern": "^\\s*([}\\]]([,)]?\\s*(#|$)|\\.[a-zA-Z_]\\w*\\b)|(else|elif|return|break|continue)\\b)"
"decreaseIndentPattern": "^\\s*([}\\]]([,)]?\\s*(#|$)|\\.[a-zA-Z_]\\w*\\b)|(else|elif)\\b)"
}
}

View File

@@ -4,7 +4,7 @@
// 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, ${id} and ${id:label} and ${1:label} for variables. Variables with the same id are connected.
// Example:
"Subclass": {
"Inner class": {
"prefix": "class",
"body": [
"class $1 extends ${2:Reference}",
@@ -57,7 +57,23 @@
"func _input_event(event):",
"\t${1:pass}"
]
},
},
"_draw method of Node": {
"prefix": "draw",
"body": [
"func _draw():",
"\t${1:pass}"
]
},
"_gui_input method of Node": {
"prefix": "guii",
"body": [
"func _gui_input(event):",
"\t${1:pass}"
]
},
"for loop": {
"prefix": "for",
@@ -156,6 +172,13 @@
]
},
"Is instance of a class or script": {
"prefix": "is",
"body": [
"${1:instance} is ${2:class}"
]
},
"element in array": {
"prefix": "in",
"body": [
@@ -192,5 +215,11 @@
"body": [
"set_process_input(true)"
]
},
"pass statement": {
"prefix": "pass",
"body": [
"pass"
]
}
}