Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save leonardoraele/d8b1780f692450bc445a07fb63501ce0 to your computer and use it in GitHub Desktop.

Select an option

Save leonardoraele/d8b1780f692450bc445a07fb63501ce0 to your computer and use it in GitHub Desktop.
Godot Code Snippers
{
// 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:
"godot/node": {
"description": "New Godot node or resource",
"scope": "csharp",
"prefix": ["namespace", "using"],
"body": [
"using Godot;",
"",
"namespace Raele.${3:MyProject};",
"",
"public partial class ${1:MyNode} : ${2:Node}",
"{",
"\t// -----------------------------------------------------------------------------------------------------------------",
"\t// STATICS",
"\t// -----------------------------------------------------------------------------------------------------------------",
"",
"\t// public static readonly string MyConstant = \"\";",
"",
"\t// -----------------------------------------------------------------------------------------------------------------",
"\t// EXPORTS",
"\t// -----------------------------------------------------------------------------------------------------------------",
"",
"\t// [Export] public",
"",
"\t// -----------------------------------------------------------------------------------------------------------------",
"\t// FIELDS",
"\t// -----------------------------------------------------------------------------------------------------------------",
"",
"",
"",
"\t// -----------------------------------------------------------------------------------------------------------------",
"\t// PROPERTIES",
"\t// -----------------------------------------------------------------------------------------------------------------",
"",
"",
"",
"\t// -----------------------------------------------------------------------------------------------------------------",
"\t// SIGNALS",
"\t// -----------------------------------------------------------------------------------------------------------------",
"",
"\t// [Signal] public delegate void EventHandler()",
"",
"\t// -----------------------------------------------------------------------------------------------------------------",
"\t// INTERNAL TYPES",
"\t// -----------------------------------------------------------------------------------------------------------------",
"",
"\t// private enum Type {",
"\t// \tValue1,",
"\t// }",
"",
"\t// -----------------------------------------------------------------------------------------------------------------",
"\t// GODOT EVENTS",
"\t// -----------------------------------------------------------------------------------------------------------------",
"",
"\t// public override void _EnterTree()",
"\t// {",
"\t// \tbase._EnterTree();",
"\t// }",
"",
"\t// public override void _ExitTree()",
"\t// {",
"\t// \tbase._ExitTree();",
"\t// }",
"",
"\t// public override void _Ready()",
"\t// {",
"\t// \tbase._Ready();",
"\t// }",
"",
"\t// public override void _Process(double delta)",
"\t// {",
"\t// \tbase._Process(delta);",
"\t// }",
"",
"\t// public override void _PhysicsProcess(double delta)",
"\t// {",
"\t// \tbase._PhysicsProcess(delta);",
"\t// }",
"",
"\t// public override string[] _GetConfigurationWarnings()",
"\t// \t=> base._PhysicsProcess(delta);",
"",
"\t// -----------------------------------------------------------------------------------------------------------------",
"\t// METHODS",
"\t// -----------------------------------------------------------------------------------------------------------------",
"",
"",
"}",
"",
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment