21

From reformatting, I want:

int* n;
int& m;
int const* o;

instead, I get:

int *n;
int &m;
int const *o;

How to make CLion do what I want?

hamster on wheels
  • 2,771
  • 17
  • 50

1 Answers1

35

Prevent Auto Format from align Pointer to variable points to https://www.jetbrains.com/help/clion/2016.3/code-style.html

After searching the many options... in Settings

Editor -> Code Style -> C/C++ -> Spaces ->

From:
    before '*' in declarations
    before '&' in declarations

to:
    after '*' in declarations.
    after '&' in declarations.
hamster on wheels
  • 2,771
  • 17
  • 50