From faeacc8c27094db6ec2176a80af60b97bbe6faf9 Mon Sep 17 00:00:00 2001 From: Louis Pilfold Date: Thu, 9 Oct 2014 14:38:25 +0100 Subject: [PATCH] Remove Scala braces to adhere to the style guide Scala if statements can have braces, but convention is not to use them except in specific situations; so let's not use them by default. Let's also add a space before the opening `(`, as this is also convention. Lastly, remove the useless placeholder text, as recommende in the project README. Everyone knows how an if statement works. :) http://www.codecommit.com/scala-style-guide.pdf --- snippets/scala.snippets | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/snippets/scala.snippets b/snippets/scala.snippets index 09d69ad..4e147a0 100644 --- a/snippets/scala.snippets +++ b/snippets/scala.snippets @@ -6,32 +6,27 @@ # Scala lang #if snippet if - if(${1:obj}) { + if (${1}) ${0} - } #if not snippet ifn - if(!${1:obj}) { + if (!${1}) ${0} - } #if-else snippet ife - if(${1:obj}) { + if (${1}) ${2} - } else { + else ${0} - } #if-else-if snippet ifelif - if(${1:obj}) { + if (${1}) ${2} - } else if(${3:obj}) { + else if (${3}) ${0} - } snippet eif - else if(${3:obj}) { + else if (${3}) ${0} - } #while loop snippet wh while (${1:obj}) {