From 5edbfec78655c606e595d0db94080de7fe58c4d0 Mon Sep 17 00:00:00 2001 From: r4d2 Date: Thu, 24 Apr 2014 21:14:31 -0400 Subject: [PATCH 1/2] Fix syntax in R for loop --- UltiSnips/r.snippets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UltiSnips/r.snippets b/UltiSnips/r.snippets index d78a1d7..2d67594 100644 --- a/UltiSnips/r.snippets +++ b/UltiSnips/r.snippets @@ -48,7 +48,7 @@ while(${1}) { endsnippet snippet for "for loop" -for ({${1:item} in ${2:list}) { +for (${1:item} in ${2:list}) { ${3} } endsnippet From 74ef5cbd446216995d94f1ddcd2b84619f1125ef Mon Sep 17 00:00:00 2001 From: r4d2 Date: Thu, 24 Apr 2014 21:14:50 -0400 Subject: [PATCH 2/2] Add R for and while snippets --- snippets/r.snippets | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/snippets/r.snippets b/snippets/r.snippets index c7ca5ac..d9b210f 100644 --- a/snippets/r.snippets +++ b/snippets/r.snippets @@ -23,6 +23,16 @@ snippet ei ${0} } +# loops +snippet wh +while(${1}) { + ${2} +} +snippet for +for (${1:item} in ${2:list}) { + ${3} +} + # functions snippet fun ${1:name} = function (${2:variables}) {