Skip to content

Commit

Permalink
Merge pull request #5 from s0ber/master
Browse files Browse the repository at this point in the history
snippets: improvements to snippets code and to syntax highlighting
  • Loading branch information
isRuslan committed Oct 25, 2015
2 parents 5e46027 + c99d38a commit 8e8fb16
Show file tree
Hide file tree
Showing 3 changed files with 521 additions and 19 deletions.
32 changes: 16 additions & 16 deletions UltiSnips/javascript.snippets
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,36 @@

# Generator function
snippet gfn
function* ${1:name}(${2}) {
yield ${3};
}
function* ${1:name}(${2}) {
yield ${3};
}
endsnippet

# Arrow function
snippet =>
(${1}) => {
${2}
}
snippet => "Arrow function" i
(${1}) => {
${2}
}
endsnippet

# Class
snippet class
class ${1:name} {
constructor (${2:arg}) {
${3:// init}
}
${4}
class ${1:name} {
constructor(${2:arg}) {
${3:// init}
}
${4}
}
endsnippet

# For of loop
snippet forof
for (let ${1:s} of ${2:sequence}) {
${3}
}
for (let ${1:s} of ${2:sequence}) {
${3}
}
endsnippet

# Import
snippet im
import ${1:foo} from "${2:bar}"
import ${1:foo} from '${2:bar}'
endsnippet
Loading

0 comments on commit 8e8fb16

Please sign in to comment.