views:

69

answers:

0

I'm using Eclipse to edit JavaScript files and I guess I'm "doing it wrong". Given the following code, where
» represents a tab,
· represents a space, and
| represents the cursor:

function·foo()·{
»   var·baz·=·[|
}

If I hit enter at this point, I get

function·foo()·{
»   var·baz·=·[
»   ···········|
}

Yuck. I would much rather get

function·foo()·{
»   var·baz·=·[
»   »   |
}

I've dug through the various "Typing" and "Formatter" preferences to no success. Did I overlook something? Or is there a particular incantation that I must chant or spell I can cast on Eclipse, to make it behave this way? Thanks.