Skip to content

Commit 069d369

Browse files
committed
Add timer snippets
1 parent d6f7a76 commit 069d369

3 files changed

+40
-0
lines changed

README.md

+20
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,24 @@ ${1:ClassName}.prototype.${2:methodName} = function(${3:arguments}) {
195195
}
196196
```
197197
198+
## Timer
199+
200+
### [si] setInterval
201+
202+
```javascript
203+
setInterval(function() {
204+
${2:// body...}
205+
}, ${1:delay});
206+
```
207+
208+
### [st] setTimeout
209+
210+
```javascript
211+
setTimeout(function() {
212+
${2:// body...}
213+
}, ${1:delay});
214+
```
215+
198216
## NodeJS
199217
200218
### [ase] assert.equal
@@ -247,6 +265,8 @@ require('${1:module}');
247265
248266
## History
249267
268+
* [v0.1.2](https://github.com/zenorocha/sublime-snippets-js/releases/tag/0.1.2) August 14, 2013
269+
* Added timer function snippets
250270
* [v0.1.1](https://github.com/zenorocha/sublime-snippets-js/releases/tag/0.1.1) August 14, 2013
251271
* Added NodeJS assert snippets
252272
* [v0.1.0](https://github.com/zenorocha/sublime-snippets-js/releases/tag/0.1.0) August 14, 2013

timer-setInterval.sublime-snippet

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<snippet>
2+
<content><![CDATA[
3+
setInterval(function() {
4+
${2:// body...}
5+
}, ${1:delay});
6+
]]></content>
7+
<tabTrigger>si</tabTrigger>
8+
<scope>source.js</scope>
9+
<description>setInterval</description>
10+
</snippet>

timer-setTimeout.sublime-snippet

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<snippet>
2+
<content><![CDATA[
3+
setTimeout(function() {
4+
${2:// body...}
5+
}, ${1:delay});
6+
]]></content>
7+
<tabTrigger>st</tabTrigger>
8+
<scope>source.js</scope>
9+
<description>setTimeout</description>
10+
</snippet>

0 commit comments

Comments
 (0)