You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ingvord edited this page Apr 12, 2017
·
7 revisions
Using code styles provided in the repository
If you are a happy user of CLion you can just open the existing project cloned from this repo. Settings must be applied automatically. To double check this go to Settings (File->Settings OR ctrl+alt+s) and navigate to Editor/Code Style:
and make sure that highlighted values are correct i.e. Scheme = Project and Line separator = Unix
Next navigate to Editor/File and code templates:
and make sure its similar to what you see on the picture above.
To contribute a code style just change these settings and make a Pull Request. Here is a reference on how to use templates in CLion products: configuring code style
Setting up Live template in CLion
One can define live templates to speed up coding in CLion (as well as any IntelliJ based product). Here is a small guide on how to add Copyright live template:
Bring up Settings dialog (ctrl+alt+s) and navigate to Editor/Live templates:
In the right panel do the following:
Expand C/C++ and a new template (alt+insert)
Define Abbreviation and Description, in our example above it is copy and copyright