0

These are the typing steps one has to take when creating a new code block in Scala-IDE. The pipe character represents the cursor:

def test(x: Int): Int = |

If you start block by typing {, the IDE will automatically add the closing brace and put the cursor in the middle:

def test(x: Int): Int = {|}

Hit return to start a multiline block:

def test(x: Int): Int = {
    |}

Hit return again to create a black line:

def test(x: Int): Int = {

    |}

Use arrow-up to get the cursor back to the previous line:

def test(x: Int): Int = {
    |
    }

How can you avoid the last two keystrokes, but still end up with my cursor on a blank line between the opening and closing brace? I tried, Ctrl+Return, Shift+Return but no such luck.

I use a Microsoft Arc keyboard. In my opinion, it's the world's greatest keyboard for typing, but unfortunately also the world's worst keyboard for using arrow keys, which is why I dearly avoid using arrow keys where possible. May the guy who invented the multi-function rocker arrow key on the Arc get a cramp in his little finger every time I have to use the confounded key.

Cœur
  • 37,241
  • 25
  • 195
  • 267
Jack
  • 16,506
  • 19
  • 100
  • 167

1 Answers1

1

There is no such feature in the editor (yet), but it would be a welcome addition. The best thing about it is to file a ticket.

Iulian Dragos
  • 5,692
  • 23
  • 31
  • Done, thanks (https://www.assembla.com/spaces/scala-ide/support/tickets/1001382#/activity/ticket:) – Jack Dec 11 '12 at 09:49