Obsidian allows linking to a header or block on the same page. A common situation is having a TOC at the top of the page, linking to headers, or using links to blocks to jump between sections on the same page.
For a lot of situations it might actually be an anti-pattern to organize thoughts in long pages instead of having smaller chunks. But there are certainly use cases where one wants to repeatedly jump to certain sections on the same page, maybe going back and forth between the section and the TOC, or jump from one section to a “deeper” one on the same page, then go back an continue reading. In both cases I retain the “higher” context, either the TOC or the section from where I dive deeper and back up again.
Problem: In Obsidian Alt-Left (on Windows) navigates back to the previous page, not back to the cursor position on the same page from where the jump originated (e.g. a link in the TOC, or the link which points to a block id on the same page).
Proposed solution
With a web browser, navigating backwards takes me either to the previous page (as Obsidian does) or repositions the cursor on the same page, for jumps to anchors on the same page. It would be great if Obsidian showed the same kind of behaviour.
Current workaround (optional)
I use a plugin which remembers the cursor position, but it doesn’t help in this case. After navigating back with Alt-Left and navigating forward with Alt-Right, I am back at the intra-link target (e.g. the header I jumped to from the TOC).
I was just about to file this as a bug, not a feature request. Rationale: this is the expected behavior from the forward/back navigation pattern on every major web browser.
Aside: There are myriad valid use cases for notes which extend “past the fold”, nothing anti-pattern about it. Even users being otherwise strict regarding note atomicity often have inbox/automation/clipping workflows that capture long form inputs to the otherwise atomic system.
I’ll argue that failing to maintain cursor position is essentially a failure to correctly save/restore the user history state, which is really what forward/back navigation is doing – not simply page-level navigation.
+1. I use header and block anchors extensively, even manually naming most of my inline block anchors. Not being able to quickly jump back to where I clicked the link is borderline infuriating.
Seems like there is already a community plugin: “Navigate Cursor History”
It tracks the cursor history and provides a shortcut for jumping back and forth.
Thanks. This is almost what I was looking for. It’s good for jumping around on a singe page – already a plus – but it doesn’t work well when flipping between pages. It seems to be looking for literal cursor positions, so if you skip through pages without going into a mode where you can place a cursor, the trail is lost.
Seems like chunks of it should be merged to the native obsidian page forward/back functions. So the combination will change “views” if what you see on the screen changes, whether or not there is a cursor. And if there is a previous cursor without changing the page, then it should move the cursor to the previous position on that page.
A vote up here. It seems tons of software share the common shortcut for Alt-Left to go to the previous location, which I, personally, used a lot. Hope it can be implemented.
Was about to post a FR for this too! I’ll put it here instead.
After following link to to header/block within same note, allow to jump back to link
Currently following a link to another place in the same note is a one-way ticket. This discourages navigation within the same note via links because you know you’ll get stranded and will have to manually find your way back to your previous scrolling position in the file.
Proposed solutions:
The “Navigate back” button (“←”) should lead back to the intra-link, not previously opened file
Place a (temporary) button to go back to link at the end of the header/block, just like with footnotes!
+1 +1 for sure Would make my workflow so much easier, and be more similar to the workflow I’m used to with IDEs (clicking on a function, reading the definition, then hitting “Go to previous cursor position” to get back to where I was)