# 封装

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

> **TL;DR**
> `文件 | 设置 | 编辑器 | 代码样式 | SQL | <sql_dialect> | 换行`  适用于 Windows 和 Linux
>
>
>
> `%instance% | 设置 | 编辑器 | 代码样式 | SQL | <sql_dialect> | 换行`  适用于 macOS
>
>
>
> `Ctrl+Alt+S` (Windows), `⌘ Comma` (macOS), `⌘ Comma` (IntelliJ IDEA Classic (macOS)), `⌘ Comma` (macOS System Shortcuts), `Ctrl+Alt+S` (XWin), `Ctrl+Alt+S` (GNOME), `Ctrl+Alt+S` (KDE), `Ctrl+Alt+S` (Emacs), `Ctrl+Alt+S` (Sublime Text), `⌘ Comma` (Sublime Text (macOS)), `Ctrl+Alt+S` (Visual Studio), `⌘ Comma` (Visual Studio (macOS)), `Ctrl+Alt+S` (NetBeans), `Ctrl+Alt+S` (Eclipse), `⌘ Comma` (Eclipse (macOS)) !["设置"图标](https://resources.jetbrains.com.cn/help/img/idea/2026.3/app.expui.general.settings.svg)
>
>
>
> 作为   <sql_dialect>  ，请在 [代码样式。 SQL](settings-code-style-sql.html) 页面上选择 SQL 方言。

配置在重新格式化代码时保留哪些格式。

使用此页面配置 SQL 文件的格式选项。 当您更改这些设置时，   预览   面板将显示这将如何影响您的代码。

|  条目  |  描述  |
| --- | --- |
|  换行  |  在重新格式化代码时，请保留换行符。  |
|  首列注释  |     不要将注释与第一列名称对齐。        * 开启 ![ 第一列的注释：打开](https://resources.jetbrains.com.cn/help/img/idea/2026.3/sql_formatter_comment_at_first_column_on.png)    * 关闭 ![首列注释：禁用](https://resources.jetbrains.com.cn/help/img/idea/2026.3/sql_formatter_comment_at_first_column_off.png)    |

## See also

### 过程

[代码样式方案](configuring-code-style.html)

