Skip to content

Commit

Permalink
VS Code tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
statico committed Jan 8, 2024
1 parent ecf6f26 commit 39bebcb
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .vscode-mac.keybindings.json
Original file line number Diff line number Diff line change
Expand Up @@ -354,5 +354,9 @@
{
"key": "shift+cmd+e",
"command": "workbench.explorer.fileView.focus"
},
{
"key": "ctrl+cmd+r",
"command": "godot-tool.run_project"
}
]
2 changes: 1 addition & 1 deletion .vscode-mac.settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@
"git.openRepositoryInParentFolders": "never",
"editor.showFoldingControls": "never",
"editor.guides.indentation": false,
"editor.lineNumbers": "off",
"editor.lineNumbers": "on",
"update.showReleaseNotes": false,
"editor.fontSize": 15,
"explorer.autoRevealExclude": {
Expand Down
58 changes: 58 additions & 0 deletions .vscode-snippets/gdscript.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{
// Place your snippets for gdscript 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"
// }
"cn": {
"prefix": "cn",
"body": [
"class_name ${1:SomeClass}",
],
"description": "Class Name"
},
"_ready": {
"prefix": "_ready",
"body": [
"func _ready() -> void:",
"\t${1:pass}"
],
"description": "Ready"
},
"_process": {
"prefix": "_process",
"body": [
"func _process(_delta: float) -> void:",
"\t${1:pass}"
],
"description": "Process"
},
"_physics_process": {
"prefix": "_physics_process",
"body": [
"func _physics_process(_delta: float) -> void:",
"\t${1:pass}"
],
"description": "Physics Process"
},
"weakref": {
"prefix": "var _target: WeakRef",
"body": [
"var _${1:target}: WeakRef",
"var ${1:target}: ${2:Node2D}:",
"\tget:",
"\t\treturn _${1:target}.get_ref() if _${1:target} else null",
"\tset(value):",
"\t\t_${1:target} = weakref(value)"
],
"description": "WeakRef"
},
}

0 comments on commit 39bebcb

Please sign in to comment.