corrade-nucleus-nucleons – Blame information for rev 24
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
20 | office | 1 | ace.define("ace/snippets/coffee",["require","exports","module"], function(require, exports, module) { |
2 | "use strict"; |
||
3 | |||
4 | exports.snippetText = "# Closure loop\n\ |
||
5 | snippet forindo\n\ |
||
6 | for ${1:name} in ${2:array}\n\ |
||
7 | do ($1) ->\n\ |
||
8 | ${3:// body}\n\ |
||
9 | # Array comprehension\n\ |
||
10 | snippet fora\n\ |
||
11 | for ${1:name} in ${2:array}\n\ |
||
12 | ${3:// body...}\n\ |
||
13 | # Object comprehension\n\ |
||
14 | snippet foro\n\ |
||
15 | for ${1:key}, ${2:value} of ${3:object}\n\ |
||
16 | ${4:// body...}\n\ |
||
17 | # Range comprehension (inclusive)\n\ |
||
18 | snippet forr\n\ |
||
19 | for ${1:name} in [${2:start}..${3:finish}]\n\ |
||
20 | ${4:// body...}\n\ |
||
21 | snippet forrb\n\ |
||
22 | for ${1:name} in [${2:start}..${3:finish}] by ${4:step}\n\ |
||
23 | ${5:// body...}\n\ |
||
24 | # Range comprehension (exclusive)\n\ |
||
25 | snippet forrex\n\ |
||
26 | for ${1:name} in [${2:start}...${3:finish}]\n\ |
||
27 | ${4:// body...}\n\ |
||
28 | snippet forrexb\n\ |
||
29 | for ${1:name} in [${2:start}...${3:finish}] by ${4:step}\n\ |
||
30 | ${5:// body...}\n\ |
||
31 | # Function\n\ |
||
32 | snippet fun\n\ |
||
33 | (${1:args}) ->\n\ |
||
34 | ${2:// body...}\n\ |
||
35 | # Function (bound)\n\ |
||
36 | snippet bfun\n\ |
||
37 | (${1:args}) =>\n\ |
||
38 | ${2:// body...}\n\ |
||
39 | # Class\n\ |
||
40 | snippet cla class ..\n\ |
||
41 | class ${1:`substitute(Filename(), '\\(_\\|^\\)\\(.\\)', '\\u\\2', 'g')`}\n\ |
||
42 | ${2}\n\ |
||
43 | snippet cla class .. constructor: ..\n\ |
||
44 | class ${1:`substitute(Filename(), '\\(_\\|^\\)\\(.\\)', '\\u\\2', 'g')`}\n\ |
||
45 | constructor: (${2:args}) ->\n\ |
||
46 | ${3}\n\ |
||
47 | \n\ |
||
48 | ${4}\n\ |
||
49 | snippet cla class .. extends ..\n\ |
||
50 | class ${1:`substitute(Filename(), '\\(_\\|^\\)\\(.\\)', '\\u\\2', 'g')`} extends ${2:ParentClass}\n\ |
||
51 | ${3}\n\ |
||
52 | snippet cla class .. extends .. constructor: ..\n\ |
||
53 | class ${1:`substitute(Filename(), '\\(_\\|^\\)\\(.\\)', '\\u\\2', 'g')`} extends ${2:ParentClass}\n\ |
||
54 | constructor: (${3:args}) ->\n\ |
||
55 | ${4}\n\ |
||
56 | \n\ |
||
57 | ${5}\n\ |
||
58 | # If\n\ |
||
59 | snippet if\n\ |
||
60 | if ${1:condition}\n\ |
||
61 | ${2:// body...}\n\ |
||
62 | # If __ Else\n\ |
||
63 | snippet ife\n\ |
||
64 | if ${1:condition}\n\ |
||
65 | ${2:// body...}\n\ |
||
66 | else\n\ |
||
67 | ${3:// body...}\n\ |
||
68 | # Else if\n\ |
||
69 | snippet elif\n\ |
||
70 | else if ${1:condition}\n\ |
||
71 | ${2:// body...}\n\ |
||
72 | # Ternary If\n\ |
||
73 | snippet ifte\n\ |
||
74 | if ${1:condition} then ${2:value} else ${3:other}\n\ |
||
75 | # Unless\n\ |
||
76 | snippet unl\n\ |
||
77 | ${1:action} unless ${2:condition}\n\ |
||
78 | # Switch\n\ |
||
79 | snippet swi\n\ |
||
80 | switch ${1:object}\n\ |
||
81 | when ${2:value}\n\ |
||
82 | ${3:// body...}\n\ |
||
83 | \n\ |
||
84 | # Log\n\ |
||
85 | snippet log\n\ |
||
86 | console.log ${1}\n\ |
||
87 | # Try __ Catch\n\ |
||
88 | snippet try\n\ |
||
89 | try\n\ |
||
90 | ${1}\n\ |
||
91 | catch ${2:error}\n\ |
||
92 | ${3}\n\ |
||
93 | # Require\n\ |
||
94 | snippet req\n\ |
||
95 | ${2:$1} = require '${1:sys}'${3}\n\ |
||
96 | # Export\n\ |
||
97 | snippet exp\n\ |
||
98 | ${1:root} = exports ? this\n\ |
||
99 | "; |
||
100 | exports.scope = "coffee"; |
||
101 | |||
102 | }); |