Floating Heading (悬浮标题)
适用于 Obsidian 的视线随动悬浮标题插件。在您滚动阅读长笔记时,提供一个可拖拽、可缩放且支持一键定位的悬浮窗口,实时显示您当前所处的标题范围。
插件还在测试当中,如果有 bug 或错误,加群讨论。 QQ 交流群: 1094620986
功能特点
- 实时标题追踪:随着页面滚动,智能计算并显示当前视口所属的指定标题层级(支持自定义 H1 到 H6 级别)。
- 极简图标模式:当滚动到文档开头、未到达指定标题上方时,悬浮窗自动缩起为精美的正圆形层级图标(例如 H2 图标按钮),极大减少视觉干扰。
- 自由交互与锁定:支持在屏幕任意位置自由拖拽,拖动边缘或角落可缩放窗口字号与最大宽度限制。支持通过右键菜单快速一键锁定位置,防止日常编辑时误触。
- 一键回弹定位:鼠标轻点悬浮窗口,编辑器的视线将立刻顺畅地自动滚动并定位到该标题的起始位置,方便随时跳转。
- 智能避让与过滤:自动在白板 (Canvas)、看板 (Kanban)、数据库 (Database/DB Folder) 以及非 Markdown 文件中隐藏,确保不干扰您的其他专业工作区。
安装方法
社区插件安装(推荐)
待插件上架后,可在 Obsidian 内直接安装:
- 打开 Obsidian 设置 > 社区插件。
- 点击 浏览 并搜索 Floating Heading。
- 点击 安装,随后启用。
手动安装
- 从 Releases 页面下载最新版发布包(main.js, manifest.json, styles.css)。
- 在您的库中创建插件目录:<库路径>/.obsidian/plugins/floating-heading/。
- 将下载的文件放入该目录中。
- 打开 Obsidian 设置 > 社区插件,开启该插件。
使用说明
- 开启插件后,屏幕上即可显示悬浮标题窗口。
- 在非锁定状态下,按住窗口主体可自由调整其在屏幕上的位置;拖拽其边缘或角落(右下角)的手柄可以自由缩放字体大小或设定最大宽度。
- 在悬浮窗上点击 右键 可以快速开启位置锁定(锁定后将不可被拖拽或调整大小),或者快速切换需要追踪的标题层级(H1 - H6)。
- 通过命令面板可以一键切换悬浮窗的全局显隐。
English
An interactive, responsive floating window plugin for Obsidian that tracks and displays your current heading level as you scroll, allowing you to easily view, move, and jump back with a single click.
Features
- Real-time Tracking: Intelligently calculates and displays the active heading of your configured level (H1 to H6) as you scroll through long notes.
- Minimalist Icon Mode: When no heading of the target level is active (e.g., at the very top of a note), the window smoothly collapses into a neat, circular Lucide icon badge, saving valuable screen estate.
- Draggable, Resizable & Lockable: Freely drag the window anywhere on your screen. Adjust the text size or limit the maximum width by dragging the handles. Lock it via the right-click menu to prevent accidental moves.
- Instant Jump Back: Click the floating window to instantly scroll the editor back to the start of the current heading.
- Smart Filtering: Automatically hides itself inside Canvas, Kanban, Databases, or non-Markdown files to keep your visual workspace tidy and uncluttered.
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 Floating Heading.
- Click Install, then Enable.
Manual Installation
- Download the latest release (main.js, manifest.json, styles.css) from the Releases page.
- Create a folder named floating-heading under your vault's plugin directory: /.obsidian/plugins/floating-heading/.
- Copy the downloaded files into that folder.
- Go to Obsidian Settings > Community plugins and enable the plugin.
Usage
- Once enabled, the floating heading tracker will appear on your screen.
- When unlocked, drag the window body to reposition it, and drag the bottom/right/corner handles to scale its font size or adjust the maximum width constraint.
- Right-click on the window to lock/unlock its position or switch your targeted heading tracker level (H1 to H6) dynamically.
- Use the Command Palette to toggle the visibility of the floating window at any time.