From 23d7ded7546d0621d05c0ef6c727b43352471368 Mon Sep 17 00:00:00 2001 From: Joe Lencioni Date: Mon, 6 Jan 2014 22:19:25 -0800 Subject: [PATCH] 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 --- UltiSnips/javascript.snippets | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/UltiSnips/javascript.snippets b/UltiSnips/javascript.snippets index 8389156..b36ef71 100644 --- a/UltiSnips/javascript.snippets +++ b/UltiSnips/javascript.snippets @@ -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