Simplify JS for snippet bodies

As suggested by @SirVer[1], having `Things[i]` be pre-populated in the
body of the `for` loop snippets is not very useful given the merits of
autocompletion. This commit simplifies these bodies by simply using
`${VISUAL}$0`.

[1]: https://github.com/SirVer/ultisnips/pull/123/files#r8686533
This commit is contained in:
Joe Lencioni 2014-01-06 22:19:25 -08:00
parent 983d494752
commit 23d7ded754

View File

@ -34,13 +34,13 @@ endsnippet
snippet ford "for (...) {...} (counting down, faster)" b
for (var ${2:i} = ${1:Things.length} - 1; $2 >= 0; $2--) {
${3:${1/([^.]+).*/$1/}[$2]}${VISUAL}$0
${VISUAL}$0
}
endsnippet
snippet for "for (...) {...} (counting up)" b
for (var ${1:i} = 0, ${2:len} = ${3:Things.length}; $1 < $2; $1++) {
${4:${3/([^.]+).*/$1/}[$1]}${VISUAL}$0
${VISUAL}$0
}
endsnippet