citadel

My dotfiles, scripts and nix configs
git clone git://jb55.com/citadel
Log | Files | Refs | README | LICENSE

dart.snippets (1151B)


      1 snippet lib
      2 	#library('${1}');
      3 	${2}
      4 snippet im
      5 	#import('${1}');
      6 	${2}
      7 snippet so
      8 	#source('${1}');
      9 	${2}
     10 snippet main
     11 	static void main() {
     12 	  ${1:/* code */}
     13 	}
     14 snippet st
     15 	static ${1}
     16 snippet fi
     17 	final ${1}
     18 snippet re
     19 	return ${1}
     20 snippet br
     21 	break;
     22 snippet th
     23 	throw ${1}
     24 snippet cl
     25 	class ${1:`Filename("", "untitled")`} ${2}
     26 snippet in
     27 	interface ${1:`Filename("", "untitled")`} ${2}
     28 snippet imp
     29 	implements ${1}
     30 snippet ext
     31 	extends ${1}
     32 snippet if
     33 	if (${1:true}) {
     34 	  ${2}
     35 	}
     36 snippet ife
     37 	if (${1:true}) {
     38 	  ${2}
     39 	} else {
     40 	  ${3}
     41 	}
     42 snippet el
     43 	else
     44 snippet sw
     45 	switch (${1}) {
     46 	  ${2}
     47 	}
     48 snippet cs
     49 	case ${1}:
     50 	  ${2}
     51 snippet de
     52 	default:
     53 	  ${1}
     54 snippet for
     55 	for (var ${2:i} = 0, len = ${1:things}.length; $2 < len; ${3:++}$2) {
     56 	  ${4:$1[$2]}
     57 	}
     58 snippet fore
     59 	for (final ${2:item} in ${1:itemList}) {
     60 	  ${3:/* code */}
     61 	}
     62 snippet wh
     63 	while (${1:/* condition */}) {
     64 	  ${2:/* code */}
     65 	}
     66 snippet dowh
     67 	do {
     68 	  ${2:/* code */}
     69 	} while (${1:/* condition */});
     70 snippet as
     71 	assert(${1:/* condition */});
     72 snippet try
     73 	try {
     74 	  ${2}
     75 	} catch (${1:Exception e}) {
     76 	}
     77 snippet tryf
     78 	try {
     79 	  ${2}
     80 	} catch (${1:Exception e}) {
     81 	} finally {
     82 	}