Various Complements 插件设置中文说明
2323 字
12 分钟
Various Complements 插件设置中文说明
Various Complements 插件设置中文说明
插件版本: v11.3.0 功能: 像 IDE 一样提供智能自动补全功能
📋 设置概览
打开 Obsidian → 设置 → Community plugins → Various Complements 进行配置
1. 🔧 主设置 (Main)
核心补全策略
| 设置项 | 英文名 | 默认值 | 说明 |
|---|---|---|---|
| 分词策略 | Strategy | default | 如何拆分单词进行补全。可选:default(默认)、chinese(中文)、arabic 等 |
| 匹配策略 | Match Strategy | prefix | 可选:prefix(前缀匹配,快) 或 partial(部分匹配,慢10倍+) |
| 模糊匹配 | Fuzzy Match | ✅ 开启 | 允许拼写错误时也能匹配,如 “appl” 匹配 “apple” |
| 最小模糊匹配分数 | Min Fuzzy Match Score | 0.5 | 模糊匹配的最低相似度阈值 (0-1),越高越严格 |
| 忽略 Emoji 匹配 | Matching without Emoji | ✅ 开启 | 匹配时忽略单词中的 Emoji 表情 |
| 将重音视为字母 | Treat accent diacritics as alphabetic | ❌ 关闭 | 如开启,cafe 可匹配 café |
| 下划线视为单词一部分 | Treat underscore as part of word | ❌ 关闭 | 如开启,my_var 视为一个单词而非两个 |
补全触发行为
| 设置项 | 英文名 | 默认值 | 说明 |
|---|---|---|---|
| 最大建议数量 | Max number of suggestions | 5 | 补全弹窗显示的最大候选词数量 |
| 短语最大单词数 | Max number of words as phrase | 3 | 补全时考虑的最大短语长度(单词数) |
| 触发最小字符数 | Min number of characters triggered | 0 | 输入多少字符后触发补全 (0=立即) |
| 短语触发最小单词数 | Min number of words triggered phrase | 1 | 触发短语补全需要的最少单词数 |
| 自动补全 | Complement automatically | ✅ 开启 | 输入时自动弹出补全建议 |
| 延迟毫秒数 | Delay milliseconds | 0 | 触发补全前的等待时间(毫秒),可避免过于频繁的触发 |
| IME 开启时禁用建议 | Disable suggestions during IME on | ❌ 关闭 | 使用中文/日文输入法时禁用补全 |
| 数学公式块禁用 | Disable suggestions in Math block | ❌ 关闭 | 在 $$...$$ 数学公式内禁用补全 |
| 代码块禁用 | Disable suggestions in Code block | ❌ 关闭 | 在 ``` 代码块内禁用补全 |
| 补全后插入空格 | Insert space after completion | ❌ 关闭 | 选择补全词后自动添加空格 |
| 禁用补全的首字符 | First characters disable suggestions | : /^ | 以这些字符开头的行禁用补全 |
| 禁用触发的正则模式 | Patterns to suppress trigger | ^~~~.*, ^ ```.* | 匹配这些正则的行禁用触发 |
| 自动聚焦直到循环 | No auto focus until cycle | ❌ 关闭 | 如开启,第一个候选词不会自动高亮 |
2. 🎨 外观设置 (Appearance)
| 设置项 | 英文名 | 默认值 | 说明 |
|---|---|---|---|
| 显示匹配策略 | Show match strategy | ❌ 关闭 | 在建议中显示匹配类型(前缀/部分/模糊) |
| 自动显示补全 | Show complement automatically | ❌ 关闭 | 是否自动显示补全列表 |
| 显示索引状态 | Show indexing status | ❌ 关闭 | 显示单词索引的加载状态 |
| 建议中的描述 | Description on suggestion | Short | 可选:None(无)、Short(简短)、Full(完整) |
3. ⌨️ 快捷键自定义 (Key Customization)
| 操作 | 英文名 | 默认键 | 说明 |
|---|---|---|---|
| 选择 | select | Enter | 选择当前高亮的补全词 |
| 选择并自定义别名 | select with custom alias | (空) | 选择时弹出对话框让你输入别名 |
| 选择并添加到别名 | select with custom alias and add to aliases | (空) | 选择并永久添加别名 |
| 选择查询别名 | select with query alias | (空) | 使用查询结果作为别名 |
| 向上 | up | ↑ | 在补全列表中向上移动 |
| 向下 | down | ↓ | 在补全列表中向下移动 |
| 选择第 1-9 个 | select 1st ~ 9th | (空) | 直接选择第 N 个候选词 |
| 打开 | open | (空) | 打开补全面板 |
| 补全 | completion | (空) | 手动触发补全 |
| 插入为文本 | insert as text | (空) | 将选中的链接作为纯文本插入 |
| 传播 Esc | Propagate Esc | ❌ 关闭 | 按 Esc 时是否传播到父元素 |
4. 📄 当前文件补全 (Current File Complement)
从当前正在编辑的文件中提取单词进行补全
| 设置项 | 英文名 | 默认值 | 说明 |
|---|---|---|---|
| 启用当前文件补全 | Enable current file complement | ✅ 开启 | 从当前文件中提取单词进行补全 |
| 最小字符数 | Current file min number of characters | 0 | 触发当前文件补全的最小字符数 |
| 仅补全英文 | Only complement English on current file | ❌ 关闭 | 只补全英文单词,忽略中文等 |
| 排除单词模式 | Exclude current file word patterns | (空) | 正则表达式,匹配的单词不参与补全 |
5. 📚 当前仓库补全 (Current Vault Complement)
从整个 Obsidian 仓库的所有文件中提取单词进行补全
| 设置项 | 英文名 | 默认值 | 说明 |
|---|---|---|---|
| 启用仓库补全 | Enable current vault complement | ❌ 关闭 | ⚠️ 默认关闭,开启后会扫描整个仓库 |
| 最小字符数 | Current vault min number of characters | 0 | 触发仓库补全的最小字符数 |
| 包含路径前缀 | Include current vault path prefix patterns | (空) | 只包含指定路径开头的文件 |
| 排除路径前缀 | Exclude current vault path prefix patterns | (空) | 排除指定路径开头的文件 |
| 排除路径 Glob 模式 | Exclude current vault path glob patterns | (空) | 使用 Glob 模式排除文件 |
| 仅当前目录 | Only files under current directory | ❌ 关闭 | 只从当前文件所在目录补全 |
| 排除单词模式 | Exclude current vault word patterns | (空) | 正则表达式,匹配的单词不参与补全 |
6. 📖 自定义词典补全 (Custom Dictionary Complement)
使用自定义词典文件进行补全(支持远程 URL)
| 设置项 | 英文名 | 默认值 | 说明 |
|---|---|---|---|
| 启用自定义词典 | Enable custom dictionary complement | ❌ 关闭 | ⚠️ 默认关闭 |
| 词典路径 | Custom dictionary paths | Google 10000 英文词典 URL | 支持本地路径或远程 URL,多个用逗号分隔 |
| 列分隔符 | Column delimiter | Tab | 词典文件中列之间的分隔符 |
| 单词正则模式 | Custom dictionary word regex pattern | (空) | 从词典中提取单词的正则表达式 |
| 隐藏建议的分隔符 | Delimiter to hide suggestion | (空) | 指定后该分隔符后的内容不会显示在建议中 |
| 显示/插入分隔符 | Delimiter to divide display/insertion | (空) | 分隔显示文本和实际插入文本 |
| 补全后光标位置符号 | Caret location symbol after complement | (空) | 标记补全后光标应放置的位置 |
| 显示文本后缀 | Displayed text suffix | => ... | 建议列表中显示文本的后缀 |
7. 🔗 内部链接补全 (Internal Link Complement)
补全 Obsidian 内部链接
[[...]]
| 设置项 | 英文名 | 默认值 | 说明 |
|---|---|---|---|
| 启用内部链接补全 | Enable internal link complement | ✅ 开启 | 补全 Obsidian 内部链接 |
| 使用别名建议 | Suggest internal link with alias | ❌ 关闭 | 在建议中显示链接别名 |
| 保持首字母大小写 | Preserve first letter case | ❌ 关闭 | 插入链接时保持原文件名首字母大小写 |
| 排除路径前缀 | Exclude internal link path prefix patterns | (空) | 排除指定路径开头的文件链接 |
| 排除路径 Glob 模式 | Exclude internal link path glob patterns | (空) | 使用 Glob 模式排除文件链接 |
| 排除自身链接 | Exclude self internal link | ❌ 关闭 | 不建议当前文件自身的链接 |
| 排除已有链接 | Exclude existing in active file | ❌ 关闭 | 排除当前文件中已存在的链接 |
| 排除未解析链接 | Exclude unresolved internal links | ❌ 关闭 | 排除指向不存在文件的链接 |
| 保存时更新链接 | Update internal links on save | ✅ 开启 | 保存文件时自动更新内部链接索引 |
| 插入别名转换 | Insert alias transformed from displayed | ❌ 关闭 | 将显示的链接名转换为别名插入 |
| Front Matter 排除键 | Front matter key for exclusion | (空) | 指定 Front Matter 键来排除文件 |
| 排除的标签 | Tags for exclusion internal link | (空) | 排除带有指定标签的文件链接 |
8. 📝 Front Matter 补全 (Front Matter Complement)
补全 YAML Front Matter 中的键值
| 设置项 | 英文名 | 默认值 | 说明 |
|---|---|---|---|
| 启用 Front Matter 补全 | Enable front matter complement | ❌ 关闭 | 补全 Front Matter 中的键和值 |
| 匹配策略 | Front matter complement match strategy | inherit | inherit=继承主设置,或单独指定 prefix/partial |
| 补全后插入逗号 | Insert comma after front matter completion | ❌ 关闭 | 选择 Front Matter 值后自动添加逗号 |
9. 🧠 智能建议优先级 (Intelligent Suggestion Prioritization)
根据使用历史智能排序建议
| 设置项 | 英文名 | 默认值 | 说明 |
|---|---|---|---|
| 启用智能优先级 | Enabled | ✅ 开启 | 根据使用频率智能排序建议 |
| 历史文件路径 | History file path | (空) | 留空则使用默认路径 .obsidian/plugins/various-complements/histories.json |
| 美化历史文件 | Pretty print history file | ❌ 关闭 | 将历史文件格式化为易读的 JSON |
| 保留历史天数 | Max days to keep history | 30 | 超过指定天数的历史记录自动删除 |
| 保留历史数量 | Max number of history to keep | 0 | 保留的历史记录条数 (0=不限制) |
10. 📱 移动端设置 (Mobile)
| 设置项 | 英文名 | 默认值 | 说明 |
|---|---|---|---|
| 移动端禁用 | Disable on mobile | ❌ 关闭 | 在移动设备上完全禁用此插件 |
11. 🐛 调试设置 (Debug)
| 设置项 | 英文名 | 默认值 | 说明 |
|---|---|---|---|
| 显示性能日志 | Show log about performance in console | ❌ 关闭 | 在开发者控制台显示性能调试信息 |
💡 推荐配置
通用配置(适合大多数人)
{ "strategy": "default", "matchStrategy": "prefix", "fuzzyMatch": true, "maxNumberOfSuggestions": 6, "complementAutomatically": true, "enableCurrentFileComplement": true, "enableInternalLinkComplement": true, "enableCurrentVaultComplement": false, "descriptionOnSuggestion": "Short"}中文用户专用
{ "strategy": "chinese", "cedictPath": "./cedict_ts.u8", "disableSuggestionsDuringImeOn": true, "enableCurrentFileComplement": true}🔗 参考链接
📌 快速上手
- 保持默认设置 即可使用,插件开箱即用
- 按
Enter选择补全词 - 按
↑↓在建议中导航 - 按
Esc关闭补全弹窗 - 如需更好的中文支持,将 Strategy 改为
chinese并下载 cedict 词典
支持与分享
如果这篇文章对你有帮助,欢迎分享给更多人或赞助支持!
Various Complements 插件设置中文说明
https://firefly.cuteleaf.cn/posts/obsidian使用笔记/various-complements设置说明/