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
This commit is contained in:
Louis Pilfold 2014-10-09 14:38:25 +01:00
parent c34ee98d85
commit faeacc8c27

View File

@ -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}) {