Skip to content

Commit

Permalink
Merge pull request #1 from sleutho/master
Browse files Browse the repository at this point in the history
Adding Tcl snippets to the Visual Studio Code Extension
  • Loading branch information
rashwell authored Nov 6, 2016
2 parents 7ae7350 + 74f4e4f commit 09bc576
Show file tree
Hide file tree
Showing 5 changed files with 76 additions and 4 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@

This extension adds rich language support for the TCL language. including so far

- Colorization
- Colorization
- Snippets
Binary file added images/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed images/plume.png
Binary file not shown.
12 changes: 9 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "tcl",
"displayName": "TCL",
"description": "TCL Language Support",
"version": "0.0.1",
"version": "0.0.2",
"publisher": "rashwell",
"engines": {
"vscode": "^0.10.1"
Expand Down Expand Up @@ -38,6 +38,12 @@
"scopeName": "source.tcl",
"path": "./syntaxes/tcl.tmLanguage"
}
]
],
"snippets": [
{
"language": "tcl",
"path": "./snippets/tcl.json"
}
]
}
}
}
65 changes: 65 additions & 0 deletions snippets/tcl.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
{
"For Loop": {
"prefix": "for",
"body": [
"for \\{set ${index} 0\\} \\{ \\$${index} < ${length} \\} \\{ incr ${index} \\} \\{",
"\t$0",
"}"
],
"description": "For Loop"
},
"Foreach Loop": {
"prefix": "foreach",
"body": [
"foreach ${var} ${list} \\{",
"\t$0",
"}"
],
"description": "Foreach Loop"
},
"If Condition": {
"prefix": "if",
"body": [
"if \\{${var}\\} \\{",
"\t$0",
"}"
],
"description": "If Condition"
},
"ElseIf Condition": {
"prefix": "elseif",
"body": [
"elseif \\{${var}\\} \\{",
"\t$0",
"}"
],
"description": "ElseIf Condition"
},
"Else Block": {
"prefix": "else",
"body": [
"else \\{",
"\t$0",
"}"
],
"description": "Else Block"
},
"Proc Block": {
"prefix": "proc",
"body": [
"proc ${name} \\{${args}\\} \\{",
"\t$0",
"}"
],
"description": "Proc Block"
},
"While Lopp": {
"prefix": "while",
"body": [
"while \\{${var}\\} \\{",
"\t$0",
"}"
],
"description": "While Loop"
}
}

0 comments on commit 09bc576

Please sign in to comment.