Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Clion code formatting to align variables

Tags:

c++

c

clion

Is it possible to change the options in Clion so that the variables are aligned like so:

enter image description here

This should be applied in structs and methods.

like image 636
dimitris93 Avatar asked Jan 06 '23 14:01

dimitris93


1 Answers

Yes.

Settings -> Editor -> Code Style -> C/C++ -> Wrapping and Braces -> Variable groups -> Align in columns

You can of course also use a custom formatting tool that does it as well.

like image 162
Zulan Avatar answered Jan 16 '23 17:01

Zulan