Just wanted to add my +1 to this. The new brace completion is really irritating. I like the behaviour that Netbeans has (this might be the same as you explained, I'm not sure.
If I type this:
void Something::SomeMethod(|
The closing bracket should appear after the caret. But, if I then type a closing bracket, the closing brackets shouldn't double up, but instead my closing bracket should overwrite the auto-completed one.
If I then type a brace:
void Something::SomeMethod() {|
Nothing happens until I press enter THEN it does this:
void Something::SomeMethod() {
|
}
This is obviously my coding style, but if you prefer your braces lined up the same thing should happen. The second brace should only appear when Enter is pressed. Leaving the caret indented.
I think this is a very interesting feature, but I also think it should be heavily customizable for multiple reasons. Different coding styles, different habits...
For example, I'm actually not bothered by this brace autocompletion system, but the new line alignment (from the latest nightly) just doesn't fit my coding habits. If I want to type this :
mMovement = Vector(
0.0f, 0.0f, 0.0f
);
... I write the first line, press enter :
... and I have to remove all the spaces.
I'm also not pleased by the way bracket completion works. If the caret is placed before a ')' and you try to write another, it always "replaces" the one that is already here. This is annoying in this kind of situation :
someFunction(someOtherFunction(|));
If you accidentally press [Del.] (happens to me all the time, really...) and want to type the ')' back, you either have to type it twice, or move the caret after the last ')' then type it once (it's a two key process anyway, and it gets even worse when there are many brackets).
Same goes for quotation marks :
Press [Del.] or [Backspace] then type a quotation mark, you'll end up with this :
I don't know what could be done to solve this, maybe track for unclosed brackets / q. marks ?
Anyway thanks for the work you're putting on this, C::B really is my favorite IDE :)
...
For example, I'm actually not bothered by this brace autocompletion system, but the new line alignment (from the latest nightly) just doesn't fit my coding habits. If I want to type this :
mMovement = Vector(
0.0f, 0.0f, 0.0f
);
...
This comes from the brace indentation patch I've submitted. And if you really want it, I can make a patch that allows the user to disable it.
The idea of the patch is to allow you to write:
my_func(param1, param2, param3,
param4, param5, param6);
Best regards.