Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion auto formatting
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Luc Bourlier  
View profile  
 More options Nov 15 2012, 12:50 pm
From: Luc Bourlier <luc.bourl...@typesafe.com>
Date: Thu, 15 Nov 2012 09:50:08 -0800 (PST)
Local: Thurs, Nov 15 2012 12:50 pm
Subject: Re: auto formatting

Fun, I didn't even know about this shortcut.

The shortcut you should use to format code in the Scala editor is Ctrl+F
(Cmd+F on mac).

Ctrl+I is only supposed to fix the indentation, and it is the
implementation for Java, so it doesn't work well with Scala code.

HTH,
Luc

On Thursday, November 15, 2012 6:00:50 PM UTC+1, gmseed wrote:

> Hi

> I have the follwing block of code:

>   test("average of points list") {
>   intercept[IllegalArgumentException] {
>   // average of empty list should throw exception
>   val points = List()
>   val averagePoint = Point3D.averagePoint(points)
>   }
>   }

> If I auto format the code by selecting and pressing Ctril+I I get:

>   test("average of points list") {
>   intercept[IllegalArgumentException] {
>   // average of empty list should throw exception
>   val points = List()
>   val averagePoint = Point3D.averagePoint(points)
>   }
>   }

> Why does it assign a large indent to?:

> val averagePoint = Point3D.averagePoint(points)

> Thanks

> Graham


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.