# 预定义的代码样式

> For the complete documentation index, see [llms.txt](https://www.jetbrains.com/zh-cn/help/clion/llms.txt).

对于 C/C++ 和 JavaScript，可以从预定义样式中复制代码样式设置。 请注意，预定义样式仅影响某些基本设置，其余设置保持不变。

Procedure:

1. 转到  `设置 | 编辑器 | 代码风格`  并选择语言（C/C++ 或 JavaScript）。

2. 点击右上角的   设置从   链接。

3. 选择要从中复制设置的代码样式：

![使用预定义指南中的代码样式设置](https://resources.jetbrains.com/help/img/idea/2026.3/cl_codestyles_qsg.png)

C/C++:

* [Google](https://google.github.io/styleguide/cppguide.html)

* [LLVM](http://llvm.org/docs/CodingStandards.html)

* [LLDB](http://lldb.llvm.org/lldb-coding-conventions.html)

* [Qt](https://wiki.qt.io/Qt_Coding_Style)

* [GNU](https://en.wikipedia.org/wiki/GNU_coding_standards)

* [Microsoft](https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference)

* [Stroustrup](https://www.stroustrup.com/bs_faq2.html#layout-style)

以下样式仅适用于大括号的放置：

* [Allman 大括号](https://en.wikipedia.org/wiki/Indent_style#Allman_style)

* [Whitesmiths 大括号](https://en.wikipedia.org/wiki/Indent_style#Whitesmiths_style)

* [K&amp;R 大括号](https://en.wikipedia.org/wiki/Indent_style#K.26R_style)

JavaScript:

* [JavaScript 标准样式](https://standardjs.com/)

* [Google JavaScript 样式指南](https://google.github.io/styleguide/jsguide.html)

