Use case or problem
Imagine working on a long note where you often have to jump between two places in the note. Anybody who writes content longer than a few pages long often has situations like this. You end up scrolling back and forth, which takes a lot of time (up to 5-15 seconds every time) and disrupts the creative process.
Proposed solution
The inspiration for this move comes from the League of Legends game, and in particular from the ultimate ability of one of the champions - Ekko. Take a look at this YouTube clip, which will do a great job of illustrating the concept.
Explanation:
- notice the ghost following the character
- when the player presses “R”, Ekko will teleport to the ghost following him
- the player teleported back to base (everyone can do that - it’s like Cmd+⬇️ to jump to the bottom of the content)
- he did something quickly in the base (healed up)
- and immediately pressed “R” to teleport back to where he was before
The solution I am proposing is something that I implemented myself in Visual Studio Code. First, a demonstration:
How I did it in VS Code with two shortcuts:
{
"key": "ctrl+space",
"command": "editor.action.setSelectionAnchor",
"when": "editorTextFocus && !selectionAnchorSet"
},
{
"command": "runCommands",
"key": "ctrl+space",
"args": {
"commands": [
"editor.action.goToSelectionAnchor",
"center-editor-window.center",
"editor.action.cancelSelectionAnchor"
]
},
"when": "(editorTextFocus || findWidgetVisible) && selectionAnchorSet"
},
Basically:
- when the anchor is not set and I press the shortcut - set the anchor
- when the anchor is set and I press the shortcut - jump to anchor and center window on cursor
Examples:
- just jump back
- copy some content, jump back and paste
Current workaround (optional)
Workaround 1:
Open the note in the second Obsidian window and jump back and forth between windows so that you don’t need to scroll so much.
Workaround 2:
Having the document outline opened in the side can allow you to click the relevant section first and then scroll.
Related feature requests (optional)
-