Skip to content

armgit / dbx

Public Imported from GitHub
0

25 MB lightweight cross-platform database client for 100+ databases, including MySQL, PostgreSQL, SQLite, Redis, MongoDB, DuckDB, SQL Server, and Dameng. Built-in AI, MCP Server, CLI, desktop and Docker. | 轻量级跨平台数据库管理工具,支持 MySQL、PostgreSQL、SQLite、Redis、MongoDB、达梦等 100+ 数据库,提供桌面端、Docker、CLI、内置 AI 助手和 MCP。

docs(editor): explain double click string and word selection

Jarvis0f745f73d083
diff --git a/docs/content/docs/query-editor.cn.mdx b/docs/content/docs/query-editor.cn.mdx
index 069911a60a..d2051f48ab 100644
--- a/docs/content/docs/query-editor.cn.mdx
+++ b/docs/content/docs/query-editor.cn.mdx
@@ -53,6 +53,28 @@ set clipboard=unnamedplus
</Step>
</Steps>
+## 双击选中字符串内容或单词
+
+默认情况下,在 SQL 字符串内双击会选中整段内容。例如,双击 `'2013-12-20 09:30:26.603'` 中的年份,会选中整个时间字符串,而不包含两侧引号。
+
+如果只想选中双击处的单词或数字片段:
+
+1. 打开 **设置 → 编辑器**。
+2. 将 **双击字符串时选中** 改为 **只选中单词**。
+3. 点击 **应用** 或 **应用并关闭**。
+
+该模式使用编辑器的默认单词边界。例如:
+
+| 字符串内容 | 双击位置 | 选中内容 |
+| --- | --- | --- |
+| `2013-12-20 09:30:26.603` | 年份 | `2013` |
+| `2013-12-20 09:30:26.603` | 毫秒 | `603` |
+| `123-456` | 后半段数字 | `456` |
+| `123.456` | 后半段数字 | `456` |
+| `abc123` | 数字部分 | `abc123` |
+
+这不是“只选数字”模式:相邻字母和数字仍属于同一个单词。切回 **选中整段内容** 可恢复默认行为。此选项控制 SQL 编辑器中的字符串双击行为,不控制结果表格中的文本选择。
+
## 执行 SQL
| 操作 | macOS | Windows / Linux |
diff --git a/docs/content/docs/query-editor.mdx b/docs/content/docs/query-editor.mdx
index 63d64728d5..088f294d6b 100644
--- a/docs/content/docs/query-editor.mdx
+++ b/docs/content/docs/query-editor.mdx
@@ -53,6 +53,28 @@ With `set clipboard=unnamedplus`, Vim yanks and deletes write to the system clip
</Step>
</Steps>
+## Double-Click String or Word Selection
+
+By default, double-clicking inside a SQL string selects its whole value. For example, double-clicking the year in `'2013-12-20 09:30:26.603'` selects the entire timestamp without the surrounding quotes.
+
+To select only the word or numeric segment under the pointer:
+
+1. Open **Settings → Editor**.
+2. Set **Double-click inside a string** to **Select single word**.
+3. Click **Apply** or **Apply and Close**.
+
+This mode uses the editor's default word boundaries. For example:
+
+| String content | Double-click target | Selected text |
+| --- | --- | --- |
+| `2013-12-20 09:30:26.603` | Year | `2013` |
+| `2013-12-20 09:30:26.603` | Milliseconds | `603` |
+| `123-456` | Second numeric segment | `456` |
+| `123.456` | Second numeric segment | `456` |
+| `abc123` | Digits | `abc123` |
+
+This is word selection, so adjacent letters and digits remain one word. Switch back to **Select whole value** to restore the default behavior. This option controls double-clicking strings in the SQL editor; it does not control text selection in the result grid.
+
## Execute SQL
| Action | macOS | Windows / Linux |