Goto/Scroll to specific header/block using quick switcher

Use case or problem

I want to quickly navigate between specific parts of a document(s) using only keyboard. Right now quick switcher allows only to switch to another document and it isn’t possible to pick which part of a document I could go.

Proposed solution

Open quick switcher:

Type # - it should list all headers (similar when you create backlinks) in current document, using up/down arrow keys highlight header from the list (or type it’s name) hit enter to scroll to it or hit ctrl + enter to open current document in another panel with header you selected in focus.

Type ^ - same thing as above but instead headers it should display blocks in current document.

Start typing something - it should show you other documents (just like it does now) use arrow keys to highlight it then hit # or ^ (or just type filename# or filename^) now it should show you a list of headers/blocks, choose one you want to go. Hitting enter should open selected document with header/block in focus in current panel, ctrl + enter should open selected document with header/block in a new panel.

Basically it’s enhancing quick switcher with some features from backlink creation.

An example, I have two documents. One is named “Lorem” and it has 100 headers named Header1 to Header100, second document is named “Ipsum” and it has headers named HeaderA to HeaderZ. I opened a Lorem document and I would like to go to Header89 to do some edits. So I open quick switcher type #Header89 and I’m instantly moved to the Header89. Now I would like to edit HeaderM header in Ipsum file so I open quick switcher and type Ipsum#HeaderM, now the file Ipsum is opened in current panel with HeaderM in focus. After editing HeaderM I want to come back to the top of the Lorem file so in quick switcher I type Lorem hit enter and I’m at the beginning of the Lorem document.

7 Likes

Current workaround

  • Use “Search current file” to navigate desired location within file. This shows matches one at the time unlike presenting overview of matches on one screen.

Related feature requests

There is a quick switcher plus plugin which allows jump to the symbol (Heading, Link, Image, Tag) which could help.

3 Likes