From 67c619ee61997f086ad00703034b288806196c59 Mon Sep 17 00:00:00 2001 From: Dmitry Dementev Date: Mon, 2 Jan 2012 23:18:24 +0400 Subject: [PATCH] add dart language snippet --- snippets/dart.snippets | 82 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 snippets/dart.snippets diff --git a/snippets/dart.snippets b/snippets/dart.snippets new file mode 100644 index 0000000..6f0b8ac --- /dev/null +++ b/snippets/dart.snippets @@ -0,0 +1,82 @@ +snippet lib + #library('${1}'); + ${2} +snippet im + #import('${1}'); + ${2} +snippet so + #source('${1}'); + ${2} +snippet main + static void main() { + ${1:/* code */} + } +snippet st + static ${1} +snippet fi + final ${1} +snippet re + return ${1} +snippet br + break; +snippet th + throw ${1} +snippet cl + class ${1:`Filename("", "untitled")`} ${2} +snippet in + interface ${1:`Filename("", "untitled")`} ${2} +snippet imp + implements ${1} +snippet ext + extends ${1} +snippet if + if (${1:true}) { + ${2} + } +snippet ife + if (${1:true}) { + ${2} + } else { + ${3} + } +snippet el + else +snippet sw + switch (${1}) { + ${2} + } +snippet cs + case ${1}: + ${2} +snippet de + default: + ${1} +snippet for + for (var ${2:i} = 0, len = ${1:things}.length; $2 < len; ${3:++}$2) { + ${4:$1[$2]} + } +snippet fore + for (final ${2:item} in ${1:itemList}) { + ${3:/* code */} + } +snippet wh + while (${1:/* condition */}) { + ${2:/* code */} + } +snippet dowh + do { + ${2:/* code */} + } while (${1:/* condition */}); +snippet as + assert(${1:/* condition */}); +snippet try + try { + ${2} + } catch (${1:Exception e}) { + } +snippet tryf + try { + ${2} + } catch (${1:Exception e}) { + } finally { + }