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.
How can I set up Scala-IDE to add a blank line when I start a multiline code block?
Frage
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.
Lösung