Sublime Text refactor

This commit is contained in:
Bartek Zbytniewski
2025-04-20 13:09:38 +02:00
parent e14db77f26
commit ede0484e9b
3 changed files with 17 additions and 5 deletions

View File

@@ -4,7 +4,7 @@
// Keywords // Keywords
{ {
"trigger": "if", "trigger": "if",
"contents": "if (${1:condition}) {\n\t${2:// Your start code here}\n}", "contents": "if ${1:condition} {\n\t${2:// Your start code here}\n}",
"details": "if (condition) { block }", "details": "if (condition) { block }",
"kind": "keyword" "kind": "keyword"
}, },
@@ -40,7 +40,7 @@
}, },
{ {
"trigger": "branch_if", "trigger": "branch_if",
"contents": "branch_if (${1:condition}): ${2:label};", "contents": "branch_if ${1:condition}: ${2:label};",
"details": "branch_if (condition): label;", "details": "branch_if (condition): label;",
"kind": "keyword" "kind": "keyword"
}, },
@@ -62,6 +62,18 @@
"details": "include \"path\"", "details": "include \"path\"",
"kind": "keyword" "kind": "keyword"
}, },
{
"trigger": "api",
"contents": "include \"../include/microw8-api.cwa\"",
"details": "include \"path\"",
"kind": "keyword"
},
{
"trigger": "common",
"contents": "include \"../include/common.cwa\"",
"details": "include \"path\"",
"kind": "keyword"
},
{ {
"trigger": "export", "trigger": "export",
"contents": "export fn ${1:name}(${2:params}) ${3:-> ${4:return_type}} { ${5:block} }", "contents": "export fn ${1:name}(${2:params}) ${3:-> ${4:return_type}} { ${5:block} }",
@@ -70,7 +82,7 @@
}, },
{ {
"trigger": "block", "trigger": "block",
"contents": "block ${1:label} { ${2:block} }", "contents": "block ${1:label} {\n\t${2://content}\n}",
"details": "block label { block }", "details": "block label { block }",
"kind": "keyword" "kind": "keyword"
}, },

View File

@@ -1,6 +1,6 @@
<snippet> <snippet>
<content><![CDATA[ <content><![CDATA[
if (${1:condition}) { if ${1:condition} {
${2:// Your if code here} ${2:// Your if code here}
} else { } else {
${3:// Your else code here} ${3:// Your else code here}

View File

@@ -3,7 +3,7 @@
${1:label} = 0; ${1:label} = 0;
loop ${1:label} { loop ${1:label} {
${2:// Your loop code here} ${2:// Your loop code here}
branch_if (${3:condition}): ${1:label}; branch_if ${3:condition}: ${1:label};
} }
]]></content> ]]></content>
<tabTrigger>loopbr</tabTrigger> <tabTrigger>loopbr</tabTrigger>