change in auto insert of brackets from 9 to 10

Hi,

I've been having a lot of trouble with auto inserted brackets in 10.  Now, I don't like the "insert pair brackets" because I have a long habit of typing in { <enter> } when coding.  So I leave that off.  So, with that off, in 9, when I would autocomplete a method, it would autocomplete the () at the end (and put the cursor either inbetween the () or after them as appropriate).  However, in 10, if I autocomplete a method, it puts the method name followed by the opening ( but not the closing ).  It does this regardless of whether the method has arguments or not.  If I turn on "insert pair brackets", it autocompletes the parenthesis too, the way it used to in 9 without that turned on.  However, then I am constantly having to go back and delete the extraneous } that I've typed in, and it doesn't do my language any favors.  So...is there some way to get 10 to act more like 9?  I'd really like the autocomplete of parenthesis not be wedded to the autocomplete of brackets (they are, after all, different things...).

Thanks!

2 comments
Comment actions Permalink

Oh, and the other thing which makes it really annoying when insert braces is turned off is that when I autocomplete, it inserts the opening paren followed by a semicolon.

For example, if I type

String s = new S

and then type ctrl-shift-space, it inserts this:

String s = new String(;

with the cursor placed after the semicolon.  So it's guaranteeing that I have to delete or press an arrow back or something to continue, can't just continue coding.

0
Comment actions Permalink

Jacy,

The behavior was changed because of http://youtrack.jetbrains.net/issue/IDEA-54362. One problem is that there's only one option for all 4 kinds of braces, perhaps it should be named in some other way.
Another problem is that I don't see any good solution for call completion when pair parenthesis insertion is disabled:
1. If () is inserted, then the ) overtype won't work, and exiting such a construction will be cumbersome.
1.1. If overtype works in this case but not the others, it's not only hard to implement, but also inconsistent and puzzling.
2. If only ( is inserted, like now, it doesn't look appealing.
3. When nothing is inserted, that's quite unexpected behavior to be affected by such an unrelated option.

The problem with semicolon after ( is fixed in 10.0.2 EAPs.

What do you think?

0

Please sign in to leave a comment.