Skip to content

Commit d1d398f

Browse files
committed
Merge pull request #4 from isRuslan/ultisnips
snippets: UltiSnips support
2 parents 1eb06fb + 6d45e45 commit d1d398f

File tree

2 files changed

+37
-0
lines changed

2 files changed

+37
-0
lines changed

UltiSnips/javascript.snippets

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Welcome to the Javascript ES6 snippets!
2+
3+
# Generator function
4+
snippet gfn
5+
function* ${1:name}(${2}) {
6+
yield ${3};
7+
}
8+
endsnippet
9+
10+
# Arrow function
11+
snippet =>
12+
(${1}) => {
13+
${2}
14+
}
15+
endsnippet
16+
17+
# Class
18+
snippet class
19+
class ${1:name} {
20+
constructor (${2:arg}) {
21+
${3:// init}
22+
}
23+
${4}
24+
}
25+
endsnippet
26+
27+
# For of loop
28+
snippet forof
29+
for (let ${1:s} of ${2:sequence}) {
30+
${3}
31+
}
32+
endsnippet
33+
34+
# Import
35+
snippet im
36+
import ${1:foo} from "${2:bar}"
37+
endsnippet
File renamed without changes.

0 commit comments

Comments
 (0)