进阶 tableplus.com 2026-11-16 08:30:30 · 5 阅读

第46章 SQL 编辑器设置详解

# 偏好设置 ## 通用设置 ## SQL Editor 这些选项位于 Settings > Editor(⌘ + ,)。1 字体、行高和语法颜色在 Fonts & Themes 标签页中设置。 ### Editor 标签页 SQL Editor | Option | What it does | |---|---| | Automatically save queries while editing | 在编辑器中打开已保存的查询(收藏)时,你的修改会自动保存回去。关闭它则只在你主动保存时才生效。 | | Automatically UPPERCASE keywords | 从自动补全中选择 SQL 关键词时自动转为大写。Format query 也按此设置处理关键词大小写。 | | Automatically insert closing braces and quotes | 输入左括号或左引号时自动补全对应的右括号或右引号。 | | Complete Key | 接受自动补全建议的按键:Enter 或 Tab(默认),Enter 或 Tab。 | 关于这些功能的更多内容,请参阅 Autocomplete 和 Query Favorite & Keyword Binding。 ### 缩进 | Option | What it does | |---|---| | Indent with | 选择 Spaces 或 Tabs,以及缩进宽度(2、4、6 或 8 个空格)。对编辑器和格式化后的查询均生效。 | | Indent type | Format query 使用的排版方式:Standard、Tabular Left 或 Tabular Right。 |
Tabular 格式化固定使用 10 个空格缩进,Indent with 的设置对它无效。
### Key binding Key binding 用于设置 SQL Editor 的编辑模式:Sublime(默认)或 Vim。 ### Query params | Option | What it does | |---|---| | Enable query params | 将查询中的变量视为参数,TablePlus 会在执行查询前要求你输入它们的值。 | | Allow searching for variables in quoted strings | 也会在引号字符串内查找变量。 | | Variable format | 要识别的变量语法:Colon :name、Percent %name%、Question mark ?、Dollar braces ${name}、Dollar $name 或 Double braces {{name}}。示例中展示了所选格式的查询。 | 详情请参阅 Query Parameters。
  1. 在 Windows 和 Linux 上使用 Ctrl + ,。 ↩︎

评论 (0)