Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added own Javascripts snippets for Ultisnip
- Loading branch information
1 parent
a82643a
commit 206752b
Showing
1 changed file
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
snippet def "Define (js)" b | ||
define([${1:deps}], function (${2:params}) { | ||
'use strict'; | ||
|
||
$0 | ||
}); | ||
endsnippet | ||
|
||
snippet req "Require (js)" b | ||
require([${1:deps}], function (${2:params}) { | ||
$0 | ||
}); | ||
endsnippet | ||
|
||
snippet afun "Anonymous function (js)" i | ||
function () { | ||
$0 | ||
} | ||
endsnippet | ||
|
||
snippet con "Log to console" b | ||
console.log("${1:message}"); | ||
endsnippet | ||
|
||
snippet des "Describe (js)" b! | ||
describe('${1:description}', function () { | ||
$0 | ||
}); | ||
endsnippet | ||
|
||
snippet it "it (js)" b! | ||
it('${1:description}', function () { | ||
$0 | ||
}); | ||
endsnippet |