Extra bracket for both functions and statements

When adding line inside existing bracket, AppCode always add an unnecessary bracket.

This is unprecedented behaviour before AppCode 2016.1.


For example:

Adding another line inside bracket always result in;


I'm using Vim Emulator. Disabling Vim Emulator gives me the same result anyway.



Unfortunately, I can't replicate the problem.

Could you please report an issue in the tracker and attach your code style settings (exported via File -> Export Settings). Do you see the problem on all projects of yours or on a specific one?


Now I find that this problem is in the very specific .c file.

The other .c files in the same project are OK.

Can exported setting help solving this problem?


In this case, I believe, no. It would be much better if you share the problematic file with us (appcode-support at jetbrains.com) if that's possible. Otherwise, you may try to narrow down the problem to a shortened code snippet. Also it would be useful to check if there are no parser errors in that specific file.


I've found the cause of the problem is a function whose arguments are changeable by define condition.

No parser error present but any bracket auto-completion is devastated.

Below is a pseudo snippet code;

#ifdef _USE_CONTEXT_
int somefunc(int num, Context *ctx) {
int somefunc(int num) {
int ret;
... do something
#ifdef _USE_CONTEXT_
... do something to ctx
return ret;

I've tried to reproduce the issue, but it correctly works in my environment. Could you please create the issue in the tracker and attach a screencast there?


I've filed an issue.


You can find an example project of mine.


OC-13666 has been marked duplicated.

It's parent issue is https://youtrack.jetbrains.com/issue/CPP-2879 and has been open since Nov/2011 and stays open still.

It seems it will never be fixed in the future.


Please sign in to leave a comment.