From 069d369523bc878582d7ece5de17a970af99183f Mon Sep 17 00:00:00 2001 From: Zeno Rocha Date: Wed, 14 Aug 2013 18:34:59 -0300 Subject: [PATCH] Add timer snippets --- README.md | 20 ++++++++++++++++++++ timer-setInterval.sublime-snippet | 10 ++++++++++ timer-setTimeout.sublime-snippet | 10 ++++++++++ 3 files changed, 40 insertions(+) create mode 100644 timer-setInterval.sublime-snippet create mode 100644 timer-setTimeout.sublime-snippet diff --git a/README.md b/README.md index 4edced1..de53bcc 100644 --- a/README.md +++ b/README.md @@ -195,6 +195,24 @@ ${1:ClassName}.prototype.${2:methodName} = function(${3:arguments}) { } ``` +## Timer + +### [si] setInterval + +```javascript +setInterval(function() { + ${2:// body...} +}, ${1:delay}); +``` + +### [st] setTimeout + +```javascript +setTimeout(function() { + ${2:// body...} +}, ${1:delay}); +``` + ## NodeJS ### [ase] assert.equal @@ -247,6 +265,8 @@ require('${1:module}'); ## History +* [v0.1.2](https://github.com/zenorocha/sublime-snippets-js/releases/tag/0.1.2) August 14, 2013 + * Added timer function snippets * [v0.1.1](https://github.com/zenorocha/sublime-snippets-js/releases/tag/0.1.1) August 14, 2013 * Added NodeJS assert snippets * [v0.1.0](https://github.com/zenorocha/sublime-snippets-js/releases/tag/0.1.0) August 14, 2013 diff --git a/timer-setInterval.sublime-snippet b/timer-setInterval.sublime-snippet new file mode 100644 index 0000000..488cbdb --- /dev/null +++ b/timer-setInterval.sublime-snippet @@ -0,0 +1,10 @@ + + + si + source.js + setInterval + \ No newline at end of file diff --git a/timer-setTimeout.sublime-snippet b/timer-setTimeout.sublime-snippet new file mode 100644 index 0000000..45504a1 --- /dev/null +++ b/timer-setTimeout.sublime-snippet @@ -0,0 +1,10 @@ + + + st + source.js + setTimeout + \ No newline at end of file