README file from
GithubUnique Tab (单笔记单标签页)
适用于 Obsidian 的防重复标签页插件。确保工作区内每个笔记或文件仅打开一个标签页,防止工作区混乱,并提供无缝的跳转体验。
插件还在测试当中,如果有 bug 或错误,加群讨论。 QQ 交流群: 1094620986
English Version Below
功能特点
- 单标签页限制:确保每个笔记、Canvas(白板)或其他文件在整个工作区中仅占用一个标签页,避免重复打开相同的文件。
- 智能重定向:无论您是通过文件树、快速切换(Quick Switcher)、全局搜索,还是通过双链点击打开笔记,若该文件已打开,插件会自动聚焦到已有标签页,无需手动寻找。
- 视觉无缝过渡:优化了标签页拦截逻辑,瞬间自动关闭新产生的空白多余标签页,减少页面切换时的视觉闪烁与白屏抖动。
- 全文件类型支持:不仅支持标准 Markdown 笔记,还完美兼容 Canvas、数据库以及其他第三方插件生成的自定义视图文件。
安装方法
社区插件安装(推荐)
待插件上架后,可在 Obsidian 内直接安装:
- 打开 Obsidian 设置 > 社区插件。
- 点击 浏览 并搜索
Unique Tab。 - 点击 安装,随后启用。
手动安装
- 从 Releases 页面下载最新版发布包(
main.js,manifest.json,styles.css)。 - 在您的库中创建插件目录:
<库路径>/.obsidian/plugins/unique-tab/。 - 将下载的文件放入该目录中。
- 打开 Obsidian 设置 > 社区插件,开启该插件。
使用说明
- 启用插件后即可自动生效,无需进行繁琐的额外配置。
- 当您尝试以任何方式(点击链接、搜索结果或文件树)打开一个已经在其他标签页中激活的笔记时,插件会自动将您的视线和焦点切换到原本已存在的那个标签页上,并温和地关闭新生成的空白页面。
English
A lightweight Obsidian plugin that prevents opening duplicate tabs for the same note, keeping your workspace clean and tidy.
Features
- Single Tab Constraint: Ensures that each note, Canvas, or other files can only occupy one open tab in your active workspace, preventing clutter.
- Smart Redirection: Whether opening a note from the file explorer, Quick Switcher, global search, or internal links, the plugin automatically shifts focus to the already-open tab.
- Visual Glitch Reduction: Optimized tab interception logic that instantly closes newly spawned empty placeholder tabs, minimizing visual flickering or brief white screen flashes.
- Universal File Support: Works smoothly with standard Markdown notes, Canvas, database files, and other custom view types generated by third-party plugins.
Installation
Community Plugins (Recommended)
Once this plugin is approved, you can install it directly from Obsidian:
- Open Obsidian Settings > Community plugins.
- Click Browse and search for
Unique Tab. - Click Install, then Enable.
Manual Installation
- Download the latest release (
main.js,manifest.json,styles.css) from the Releases page. - Create a folder named
unique-tabunder your vault's plugin directory:<vault>/.obsidian/plugins/unique-tab/. - Copy the downloaded files into that folder.
- Go to Obsidian Settings > Community plugins and enable the plugin.
Usage
- Once enabled, the plugin works automatically in the background without requiring any manual setup.
- When you attempt to open an already-opened note (via search, explorer, or links), the plugin will instantly navigate your view to the existing tab and quietly dispose of the newly created duplicate.