diff --git a/README.md b/README.md index 49484ca..db7c8e4 100644 --- a/README.md +++ b/README.md @@ -2,4 +2,5 @@ This extension adds rich language support for the TCL language. including so far -- Colorization \ No newline at end of file +- Colorization +- Snippets \ No newline at end of file diff --git a/images/logo.png b/images/logo.png new file mode 100644 index 0000000..3020ac5 Binary files /dev/null and b/images/logo.png differ diff --git a/images/plume.png b/images/plume.png deleted file mode 100644 index 855f1bb..0000000 Binary files a/images/plume.png and /dev/null differ diff --git a/package.json b/package.json index 6c6e7f2..4004619 100644 --- a/package.json +++ b/package.json @@ -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" @@ -38,6 +38,12 @@ "scopeName": "source.tcl", "path": "./syntaxes/tcl.tmLanguage" } - ] + ], + "snippets": [ + { + "language": "tcl", + "path": "./snippets/tcl.json" + } + ] } -} \ No newline at end of file +} diff --git a/snippets/tcl.json b/snippets/tcl.json new file mode 100644 index 0000000..6024448 --- /dev/null +++ b/snippets/tcl.json @@ -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" + } +}