File Explorer panel should automatically scroll to and highlight the file when you open it

Use case or problem

Most of the time I open the files using the Quick Switcher. When I do that, the file opens in the main panel, but I still find it difficult to locate in the File Explorer panel. So if I want to open a file and then create another file in the same directory, I still have to manually dig through the folders in the File Explorer until I remember where the file is located.

Proposed solution

Use VSCode as an example. When you open a file with Cmd+P (VSCode equivalent of quick switcher), the explorer panel automatically scrolls to the opened file and highlights it.

1 Like

You can use the command “Reveal active file in navigation” (you can even assign a hotkey to that command).

2 Likes

Oh, thank you, this is really helpful!

Although I still think this should happen automatically when the file is being opened through the quick switcher.

I was about to post asking the same feature, many code editors/multi pane programs allows bidirectional linking of panels by use of a toggle button. When linking is toggled, swapping file in editor (for example by folllowing links) always selects the corresponding file in the file explorer (and if necessary expands it’s parents and scrolls to reveal the selection if it’s out of the panel’s viewports’ bounds).

It is super nice when creating a new link for example to just drag and drop the new note in the right place.

2 Likes

I agree with this. I came to the forum today to see if it could be enabled by default. I’m so used to it in VS Code that I wish Obsidian had it too.

2 Likes