Skip to content

Commit 022a7bc

Browse files
authored
Merge pull request #2 from Hamburger317/main
Added snippets
2 parents 3491f10 + 58845e7 commit 022a7bc

2 files changed

Lines changed: 62 additions & 0 deletions

File tree

package.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,12 @@
5151
"scopeName": "source.8xp",
5252
"path": "./syntaxes/ti-basic.tmLanguage.json"
5353
}
54+
],
55+
"snippets": [
56+
{
57+
"language": "ti-basic",
58+
"path": "snippets/tibasic.code-snippets"
59+
}
5460
]
5561
}
5662
}

snippets/tibasic.code-snippets

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
{
2+
"for": {
3+
"scope": "ti-basic",
4+
"prefix": ["for", "For"],
5+
"body": [
6+
"For(${1:variable},${2:start},${3:end},${4:step})",
7+
"$0",
8+
"End"
9+
],
10+
"description": "Basic For loop, the fourth argument and parentheses is optional."
11+
},
12+
13+
"if": {
14+
"scope": "ti-basic",
15+
"prefix": ["if", "If"],
16+
"body": ["If ${1:condition}",
17+
"Then",
18+
"$0",
19+
"End"
20+
],
21+
"description": "Basic If statement."
22+
},
23+
24+
"if-else": {
25+
"scope": "ti-basic",
26+
"prefix": ["ife", "IfE"],
27+
"body": ["If ${1:condition}",
28+
"Then",
29+
"${2:statements}",
30+
"Else",
31+
"$0",
32+
"End"
33+
],
34+
"description": "Basic If-Else statement."
35+
},
36+
37+
"while": {
38+
"scope": "ti-basic",
39+
"prefix": ["while", "While"],
40+
"body": ["While ${1: condition}",
41+
"$0",
42+
"End"
43+
]
44+
},
45+
46+
"repeat":{
47+
"scope": "ti-basic",
48+
"prefix": ["repeat", "Repeat"],
49+
"body": ["Repeat ${1: condition}",
50+
"$0",
51+
"End"
52+
]
53+
}
54+
55+
56+
}

0 commit comments

Comments
 (0)