mikeddy446 downloadsCopy selected files or folders as editable @mentions with Alt+C, with append mode, history, and vault URL conversion.

点击这里观看高清 MP4 演示视频。 / Click here to watch the full MP4 demo.
Copy Selected Name 是一个 Obsidian 桌面端插件,用于在文件列表中选中文件或文件夹后,通过 Alt+C(macOS 为 Option+C)快速生成适合 AI 对话和笔记上下文引用的文件名格式,例如:
@01_抖音拆解.md
它特别适合这些场景:
Alt+X(macOS 为 Option+X)直接复制选中文件或文件夹的真实磁盘路径到系统剪贴板;双按 Alt+X 会把这次的路径追加到上一次复制的路径后面。@文件名.md 格式和 obsidian://open?... Obsidian URL 格式之间来回转换。Alt+C / Option+C 使用插件自己的内部剪贴板,不会默认覆盖系统剪贴板。Alt+X / Option+X 是真实系统复制,可以直接粘贴到记事本、浏览器、外部文件或其他应用。
微信:abc7752abc
备注:问题反馈、建议、合作
Code -> Download ZIP。copy-selected-name
<你的 Obsidian 库>/.obsidian/plugins/copy-selected-name
以 Windows 为例:
D:\Obsidian\.obsidian\plugins\copy-selected-name
main.js
manifest.json
styles.css
设置 -> 第三方插件 / Community plugins。Copy Selected Name。进入你的 Obsidian 插件目录:
cd "<你的 Obsidian 库>/.obsidian/plugins"
克隆仓库,并把本地文件夹命名为插件 ID:
git clone https://github.com/mikeddy/obsidian-copy-selected-name.git copy-selected-name
然后回到 Obsidian,启用 Copy Selected Name。
01_抖音拆解.md。Alt+C(macOS 为 Option+C)。@01_抖音拆解.md
格式规则:
@.md选中多个文件后按 Alt+C(macOS 为 Option+C),会一次性复制所有选中文件名:
@A文件.md
@B文件.md
@C文件.md
选中文件或文件夹后按 Alt+X(macOS 为 Option+X),会把真实磁盘路径直接写入系统剪贴板:
/Users/you/Obsidian/项目/A文件.md
多选时会一行一个路径。这个功能不使用插件内部剪贴板,可以直接粘贴到浏览器、记事本、终端或外部文件中。
和 Alt+C 一样,Alt+X 也支持双按追加:在连按判断间隔内双按 Alt+X(macOS 为 Option+X),会把这次选中的磁盘路径追加到上一次复制的路径后面,而不是覆盖。例如:
Alt+X,系统剪贴板是 A 的路径。Alt+X。/Users/you/Obsidian/项目/A文件.md
/Users/you/Obsidian/项目/B文件.md
追加时会自动去重,同一个路径不会出现两行。单按 Alt+X 仍然是覆盖,会重新开始攒路径。
Alt+C(macOS 为 Option+C):覆盖插件内部剪贴板。Alt+C(macOS 为 Option+C):进入追加逻辑,把新文件名追加到原内容后面。Alt+C(macOS 为 Option+C):打开“覆盖 / 追加 / 取消”弹窗。例如:
Alt+C(macOS 为 Option+C)。Alt+C(macOS 为 Option+C)。@A文件.md
@B文件.md
在 Obsidian 中进入 设置 -> 第三方插件 -> Copy Selected Name,可以修改:
Alt+C,macOS 为 Option+C。Alt+X,macOS 为 Option+X。插件命令也会出现在 Obsidian 的 设置 -> 快捷键 中。你可以在那里绑定原生命令快捷键;单击、双击、三击的动作仍以插件设置页为准。
如果 Claudian 插件界面已经打开,并且光标正处在 Claudian 输入框中:
Alt+C(macOS 为 Option+C)会把文件名引用直接插入光标所在位置。如果光标不在 Claudian 输入框中:
每次按 Alt+C(macOS 为 Option+C),右上角都会弹出剪贴板面板。
它支持:
@文件名.md 格式)D:\库\笔记.md,再次点击转回普通格式)面板默认 3 秒后自动消失。鼠标悬停或正在编辑时不会消失,移开后重新开始 3 秒倒计时。
在 Obsidian 普通文本编辑区域按 Ctrl+V:
在插件自己的剪贴板面板中按 Ctrl+V:
打开“覆盖 / 追加 / 取消”弹窗后,可以进入历史记录。
历史记录支持:
Copy Selected Name is an Obsidian desktop plugin for quickly turning selected files or folders into AI-friendly mention text with Alt+C on Windows/Linux or Option+C on macOS, such as:
@01_Example.md
It is designed for Obsidian-based AI workflows where you often need to reference notes, collect multiple files as context, insert file mentions into Claudian, or convert selected notes into Obsidian URLs.
WeChat: abc7752abc
For feedback, suggestions, and collaboration.
Code -> Download ZIP.copy-selected-name
<your vault>/.obsidian/plugins/copy-selected-name
main.js
manifest.json
styles.css
Settings -> Community plugins.Copy Selected Name.cd "<your vault>/.obsidian/plugins"
git clone https://github.com/mikeddy/obsidian-copy-selected-name.git copy-selected-name
Then enable Copy Selected Name in Obsidian.
Alt+C / Option+C: overwrite the plugin clipboard with selected file or folder mentions.Alt+C / Option+C within 1 second: append new mentions to the current plugin clipboard.Alt+C / Option+C within 1 second: open the overwrite / append / cancel modal.The plugin clipboard is separate from the system clipboard. The system clipboard is only written by the 复制 Obsidian URL and 复制磁盘路径 buttons.
Open Settings -> Community plugins -> Copy Selected Name to customize:
The plugin command also appears in Obsidian's native Settings -> Hotkeys list. Native hotkey bindings trigger the same command, while press-frequency behavior follows the plugin settings tab.
This plugin is plain CommonJS JavaScript and does not require a build step.
npm run check
npm run check runs:
node --check main.js