malele173 downloadsRemember cursor position per note + VS Code-style global back/forward cursor navigation history.
Fork of dy-sh/remember-cursor-position by Dmitry Savosh, with significant enhancements.
An Obsidian plugin that remembers cursor and scroll positions for each note, and adds VS Code-style global cursor navigation history with Alt + ← and Alt + →.
Alt + ← / Alt + → to jump between cursor positions across different notes, like VS Code or a web browserAlt + ← takes you back to where you were in the previous tab![[...), non-markdown files, and path traversal![[... etc.) from the database| Action | Shortcut | Command Name |
|---|---|---|
| Go back | Alt + ← |
Cursor navigator: Go back |
| Go forward | Alt + → |
Cursor navigator: Go forward |
cursor)Ctrl+P)On every file open, the plugin restores the last saved cursor and scroll position. A background timer detects cursor/scroll changes and persists them to disk.
The plugin maintains a global past / future stack:
past stackAlt + ←): Pops from past, pushes current position to future, jumps to the targetAlt + →): Pops from future, pushes current position to past, jumps to the targetWhen the active leaf (tab) changes:
active-leaf-change eventAlt + ← can take you back to where you were before clicking the tabThis works for both manual tab clicks and link-driven tab opens.
| Setting | Description |
|---|---|
| Max history entries | Maximum number of global navigation positions to keep (default: 50). |
| Min line change to record | Cursor must move at least this many lines before the old position is recorded (default: 3). |
| Min scroll change to record | Scroll-only movement beyond this distance is also recorded (default: 80px). |
| Data file path | JSON file used to store cursor and history data. |
| Delay after opening a note | Delay before restoring position after a note is opened (default: 100ms). |
| Save interval | How often in-memory position data is written to disk (default: 5000ms). |
From Community Plugins:
Manual:
main.js and manifest.json<your vault>/.obsidian/plugins/cursor-navigator/Based on the original Remember cursor position plugin by Dmitry Savosh, licensed under MIT.
MIT
一个 Obsidian 插件,自动记住每个笔记的光标和滚动位置,并提供类似 VS Code 的全局光标导航历史(Alt + ← / Alt + → 前进后退)。
Alt + ← / Alt + → 跨笔记跳转光标位置,类似 VS Code 或浏览器Alt + ← 可以回到上一个标签页的精确位置![[...)、非 Markdown 文件、路径遍历![[... 等)| 操作 | 快捷键 | 命令名 |
|---|---|---|
| 后退 | Alt + ← |
Cursor navigator: Go back |
| 前进 | Alt + → |
Cursor navigator: Go forward |
cursor 自行改键Ctrl+P)触发每次打开文件时,插件自动恢复上次保存的光标和滚动位置。后台定时器检测光标/滚动变化并持久化到磁盘。
插件维护一个全局的 past / future 栈:
past 栈Alt + ←):从 past 弹出,将当前位置压入 future,跳转到目标Alt + →):从 future 弹出,将当前位置压入 past,跳转到目标当活跃叶子(标签页)发生变化时:
active-leaf-change 事件检测切换Alt + ← 可以带你回到点击标签页之前的位置适用于手动点击标签页和通过链接打开新标签页两种场景。
| 设置项 | 说明 |
|---|---|
| 最大历史条数 | 全局导航历史最多保留多少条(默认 50) |
| 最小行数变化 | 光标至少移动这么多行才记录历史(默认 3) |
| 最小滚动变化 | 仅滚动时超过此距离才记录(默认 80px) |
| 数据文件路径 | 用于存储光标和历史数据的 JSON 文件 |
| 打开笔记后延迟 | 打开笔记后恢复位置的延迟时间(默认 100ms) |
| 保存间隔 | 内存中的位置数据多久写入一次磁盘(默认 5000ms) |
从社区插件市场:
手动安装:
main.js 和 manifest.json<你的 vault>/.obsidian/plugins/cursor-navigator/基于 Dmitry Savosh 的原始插件 Remember cursor position,在 MIT 许可证 下分发。
MIT