Add option to automatically "Reveal file in navigation" when you open a note

Use case or problem

When I open a note, it’s not always clear if I’m in the right place in my vault because: 1) the note might be in one of several subfolders, 2) I might have opened the wrong note out of several similarly-named notes.

Proposed solution

Add a boolean settings option to automatically scroll to the in-focus note on the file navigation (e.g. by automatically executing “Reveal file in navigation” whenever the in-focus note changes either because you opened a new note or you changed pane).

This would complement the contextual information that the local graph view for a note already gives.

Current workaround (optional)

  • Click on the tri-dot menu of a given note.
  • Select “Reveal in file navigation”.

Problem with the current workaround: it’s not automatic.

13 Likes

Would love to have this feature.
@juan Currently to make this quicker you can set up a shortcut to trigger this action.

2 Likes

The feature Single key hotkeys (context sensitive) makes this (not only this) even quicker.

2 Likes

Another solution for described use case / problem:

1 Like

Thank you. I saw the hotkey, but I keep forgetting to press it…

Thanks @malecjan, I wasn’t aware of it and it would definitely help.

Hey all, I really missed this from VS Code, so I wrote a small plugin with the hopes that it eventually gets baked into Obsidian and the plugin is no longer needed.

It’s available in the “Third-party plugins” tab in Obsidian.

9 Likes

That´s awesome @shichongrui, thanks!

Working great for me so far, nice! Thank you :slight_smile:

I actually had to disable this plugin because when the file explorer is hidden (I’m in focus mode editing a note, which is most of the time) and I then switch to a different pane or note, the plugin makes the file explorer visible which is very distracting.

It would be great if this plugin wouldn’t leave the file explorer’s visibility in whatever state it is.

1 Like

It works for me now without having file explorer to popup up when I open an other note.

If the explorer panel is hidden, it stay hidden.

Thanks a lot @shichongrui for your plugin :heart:

Came here looking for exactly this. Was not disappointed. Awesome work!