Auto-scroll to a file after finding a file

Things I have tried

  • Searched for an option in settings
  • Searched for ‘scroll’ in plugins list (community)

What I’m trying to do

After searching for a file with Ctrl-O and finding a given file, my left-hand menu stays at whatever it was scrolled to before. Is there an option in Obsidian by default or via plugin to autoscroll to the file in File Browser as it’s done e.g. in VS Code?

Hi @gczarnocki

There is a plugin called “Automatically Reveal Active File”. The plugin will change the file highlight in the file explorer to whatever file you are editing.

  1. Search for the file you want
  2. Click on that file to open it in the right side
  3. Click the file explorer icon next to the search icon and the left side will be expand to and highlighted to that file you just selected.

As a bonus it will also switch the highlight if you have multiple files open and switch between them.

obsidian://show-plugin?id=obsidian-reveal-active-file

Has something changed? I’m using Obsidian v 0.15 on Win10. This plugin “Auto Reveal Active File” (v 1.02) highlights the open node but it’s nowhere near the visible part of the File Editor. I have to find it by scrolling, which defeats the purpose of the plugin. There’s another plugin called “Reveal Active File Button”, which does the same thing (in theory) but it requires the user to click a button. The help says that sometimes you have click it twice for the open node to show in the visible area of the File Editor. Which is true: if I click it twice, it scrolls to the visible node. Seems both plugins should invoke the “reveal” function twice by default, so that both plugins work properly. BTW, it would be better if the open node was centered vertically in the File Editor, instead of just showing up at the very bottom (or the very top).

Hi @element

I have the same issue with the plugin that you are describing.

I don’t see an open issue for what you describe in the plugins github issues list but it might be related to the problem others, including me, are having where that plugin does not restore focus properly after the obsidian 15 update

Active pane loses focus when opening a file in Obsidian 0.15.3 · Issue #11 · shichongrui/obsidian-reveal-active-file (github.com)

I opened an issue on Github (with the description above), just in case, as I’m not sure if this is the same as the other issue.