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?
CLion can format your code according to the configured code style settings. You can also apply your code style formatting to the specified files from the command line. The command-line formatter launches an instance of CLion in the background and applies the formatting. It will not work if another instance of CLion is already running.
In this field type the indent of preprocessor directives. Select this checkbox to keep the indent of preprocessor directives equal to that of surrounding code lines. Use this tab to specify where you want spaces in your code. To have CLion automatically insert a space at a location, select the checkbox next to this location in the list.
To have CLion automatically insert a space at a location, select the checkbox next to this location in the list. The results are displayed in the preview pane. In this tab, customize the code style options, which CLion will apply on reformatting the source code.
Default: in this case CLion uses the Wrap on typing option that is specified in the global settings. Yes: in this case CLion uses the value specified in the Right Margin field.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With