mirror of
https://github.com/t8y2/dbx.git
synced 2026-10-19 16:16:45 +00:00
docs(editor): explain double click string and word selection
This commit is contained in:
@@ -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 |
|
||||
|
||||
@@ -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 |
|
||||
|
||||
Reference in New Issue
Block a user