Skip to content

Commit 3f443fb

Browse files
author
Zeno Rocha
committed
Merge pull request #11 from chmanie/fix-tab-sequence
fixed tab sequence for function bodies
2 parents be4bf9d + 7b117e0 commit 3f443fb

14 files changed

+25
-24
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.DS_Store

README.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ console.warn(${1:obj});
4343

4444
```javascript
4545
${1:document}.addEventListener('${2:event}', function(e) {
46-
${3:// body...}
46+
${0:// body...}
4747
});
4848
```
4949
@@ -155,15 +155,15 @@ ${1:document}.querySelectorAll('${2:selector}');
155155
156156
```javascript
157157
${1:myArray}.forEach(function (${2:elem}) {
158-
${3:// body...}
158+
${0:// body...}
159159
});
160160
```
161161
162162
### [fec] forEachCall
163163
164164
```javascript
165165
[].forEach.call(document.querySelectorAll(${1:selector}), function (${2:elem}) {
166-
${3:// body...}
166+
${0:// body...}
167167
});
168168
```
169169
@@ -172,7 +172,7 @@ ${1:myArray}.forEach(function (${2:elem}) {
172172
```javascript
173173
for (var ${1:prop} in ${2:obj}) {
174174
if (${2:obj}.hasOwnProperty(${1:prop})) {
175-
${3:// body...}
175+
${0:// body...}
176176
}
177177
}
178178
```
@@ -183,23 +183,23 @@ for (var ${1:prop} in ${2:obj}) {
183183
184184
```javascript
185185
function ${1:methodName} (${2:arguments}) {
186-
${3:// body...}
186+
${0:// body...}
187187
}
188188
```
189189
190190
### [pr] prototype
191191
192192
```javascript
193193
${1:ClassName}.prototype.${2:methodName} = function(${3:arguments}) {
194-
${4:// body...}
194+
${0:// body...}
195195
}
196196
```
197197
198198
### [iife] immediately-invoked function expression
199199
200200
```javascript
201201
(function (window, document, undefined) {
202-
${1:// body...}
202+
${0:// body...}
203203
})(window, document);
204204
```
205205
@@ -215,15 +215,15 @@ ${1:methodName}.call(${2:context}, ${3:arguments})
215215
216216
```javascript
217217
setInterval(function() {
218-
${2:// body...}
218+
${0:// body...}
219219
}, ${1:delay});
220220
```
221221
222222
### [st] setTimeout
223223
224224
```javascript
225225
setTimeout(function() {
226-
${2:// body...}
226+
${0:// body...}
227227
}, ${1:delay});
228228
```
229229
@@ -270,22 +270,22 @@ require('${1:module}');
270270
271271
```javascript
272272
describe('${1:description}', function () {
273-
${2:// body...}
273+
${0:// body...}
274274
});
275275
```
276276
### [ita] it asynchronous
277277
278278
```javascript
279279
it('${1:description}', function (done) {
280-
${2:// body...}
280+
${0:// body...}
281281
});
282282
```
283283
284284
### [its] it synchronous
285285
286286
```javascript
287287
it('${1:description}', function () {
288-
${2:// body...}
288+
${0:// body...}
289289
});
290290
```
291291

bdd.describe.sublime-snippet

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<snippet>
22
<content><![CDATA[
33
describe('${1:description}', function () {
4-
${2:// body...}
4+
${0:// body...}
55
});
66
]]></content>
77
<tabTrigger>desc</tabTrigger>

bdd.ita.sublime-snippet

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<snippet>
22
<content><![CDATA[
33
it('${1:description}', function (done) {
4-
${2:// body...}
4+
${0:// body...}
55
});
66
]]></content>
77
<tabTrigger>ita</tabTrigger>

bdd.its.sublime-snippet

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<snippet>
22
<content><![CDATA[
33
it('${1:description}', function () {
4-
${2:// body...}
4+
${0:// body...}
55
});
66
]]></content>
77
<tabTrigger>its</tabTrigger>

dom-addEvent.sublime-snippet

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<snippet>
22
<content><![CDATA[
33
${1:document}.addEventListener('${2:event}', function(e) {
4-
${3:// body...}
4+
${0:// body...}
55
});
66
]]></content>
77
<tabTrigger>ae</tabTrigger>

for-each.sublime-snippet

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<snippet>
22
<content><![CDATA[
33
${1:myArray}.forEach(function (${2:elem}) {
4-
${3:// body...}
4+
${0:// body...}
55
});
66
]]></content>
77
<tabTrigger>fe</tabTrigger>

for-eachCall.sublime-snippet

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<snippet>
22
<content><![CDATA[
33
[].forEach.call(document.querySelectorAll(${1:selector}), function (${2:elem}) {
4-
${3:// body...}
4+
${0:// body...}
55
});
66
]]></content>
77
<tabTrigger>fec</tabTrigger>

for-in.sublime-snippet

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<content><![CDATA[
33
for (${1:prop} in ${2:obj}) {
44
if (${2:obj}.hasOwnProperty(${1:prop})) {
5-
${3:// body...}
5+
${0:// body...}
66
}
77
}
88
]]></content>

function-iife.sublime-snippet

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<snippet>
22
<content><![CDATA[
33
(function (window, document, undefined) {
4-
${1:// body...}
4+
${0:// body...}
55
})(window, document);
66
]]></content>
77
<tabTrigger>iife</tabTrigger>

0 commit comments

Comments
 (0)