From 6fa064468542ee5f3a86e32bc19d2108f7d820cd Mon Sep 17 00:00:00 2001 From: Joe Lencioni Date: Mon, 6 Jan 2014 08:18:33 -0800 Subject: [PATCH] Improve descriptions of JS `for` snippets More specifically than "faster" and not faster, these snippets count down and count up, respectively. Adding this information to the descriptions will help people make the correct decision. --- UltiSnips/javascript.snippets | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/UltiSnips/javascript.snippets b/UltiSnips/javascript.snippets index b866903..ffc9e36 100644 --- a/UltiSnips/javascript.snippets +++ b/UltiSnips/javascript.snippets @@ -32,13 +32,13 @@ ${1:class_name}.prototype.${2:method_name} = function(${3:first_argument}) { endsnippet -snippet for "for (...) {...} (faster)" +snippet for "for (...) {...} (counting down, faster)" for (var ${2:i} = ${1:Things.length} - 1; $2 >= 0; $2--) { ${3:${1/([^.]+).*/$1/}[$2]}${VISUAL}$0 } endsnippet -snippet for "for (...) {...}" +snippet for "for (...) {...} (counting up)" for (var ${1:i} = 0, ${2:len} = ${3:Things.length}; $1 < $2; $1++) { ${4:${3/([^.]+).*/$1/}[$1]}${VISUAL}$0 }