Autoformat adds line break after semicolon
Answered
I want more than one statement in one line, I can't find the option to stop autoformat from adding a newline after any semicolon.
for example:
string s; cin >> s;
int idx, x; cin >> idx; idx--;
is always changed to
string s;
cin >> s;
int idx, x;
cin >> idx;
idx--;
when I reformat, but I don't want that to happen.
Please sign in to leave a comment.
I am having this same issue and would love a solution to it. I can't find any answers online.
This really makes me annoying. How can I disable this feature
Hi all!
Currently the only way to do it is to disable formatting for these code fragments - https://www.jetbrains.com/help/clion/reformat-and-rearrange-code.html#exclude_part_of_code.
Feel free to comment or upvote https://youtrack.jetbrains.com/issue/CPP-15091. See https://intellij-support.jetbrains.com/hc/en-us/articles/207241135-How-to-follow-YouTrack-issues-and-receive-notifications if you are not familiar with YouTrack.