File Explorer: Navigation Hotkeys

Use case or problem

I would like to be able to browse my vault according to the current file explorer sort/search with the keyboard instead of manually selecting the next file with the mouse. This would speed up the task of finding a particular note when I have only a vague idea of where it is or what it contains.

Proposed solution

Add programmable hotkeys for navigating up and down the current file explorer list inside the active pane.

Workaround

The Quick switcher hotkey serves a similar purpose, but it shows all notes in alphabetical order without regard to their containing folder or the current file explorer search. An alternative solution would be to add configuration options to the quick switcher plugin which control how it presents its list of notes.

Related feature requests (optional)

This was previously requested in Navigate File Explorer via Hotkey but was erroneously merged into A hotkey for file explorer, which requested a hotkey to open the file explorer.

7 Likes

This request is one possible solution of more general Related feature request:

Details about opening the focused file in active pane are also mentioned in subsequent comments there.
Do you want to keep this as separate request? I would probably prefer to merge it into that one with support of over 58 votes/likes and discuss specific implementation details there.

I think that list of files (or search results) would benefit from having some “focus pointer/cursor” like the “caret” in text editor.
As mentioned deep in the other thread:

Similar would be useful for keyboard navigation in Search results requested e.g. in:

4 Likes

VIM Style Explorer navigation would be wonderful. Maybe something like this:
VSCodeExplorerNavigation

1 Like

+1
To be clear, I am +1 the feature of using up/down keys to browse the file contents – meaning to display the file contents in the reading pane with each press of the up/down key (so, no ENTER key press needed). The focus remains on the selected file in File Explorer. Like this prior FR browsing-through-notes-quickly.

1 Like

+1, comes in handy when presenting off of excalidraw figures.

It is super interesting that this feature has been requested in numerous FRs, and as far as I can tell, described clearly. Yet, somehow, it’s either misunderstood (merged with another topic about displaying the file explorer with a keyboard shortcut instead of navigating it) or erroneously closed as implemented in 0.15.0 (it is not).

Wish the devs would add it to their list to do - similar functionality has been implemented for daily notes so it’s not a totally new functionality and hopefully would not require a lot of time. It would be a major QOL improvement for those of us doing their presentations in obsidian.

You can navigate with the keyboard file explorer in 0.15+. I don’t understand what is that you are asking.
If you focus on file explorer, you can use the arrow keys to navigate.

The ability to navigate/switch files with one command, without leaving the focus of the current editor pane.

The current implementation is like this:

First you have to move your focus to the file explorer. You can use a hotkey for this. Then you can navigate which files are selected in the file explorer. But then you have to hit enter to load the file into the editor pane. This then automatically moves the focus back to the editor.

So say you wanted to to browse quickly between 3 files, from file A, to B to C to D, scanning for something you’re searching for, or reading a sequence of notes. You have to:

  1. Cmd-alt-f (in my hotkeys anyway)
  2. Down arrow
  3. Enter
  4. Cmd-alt-f
  5. Down arrow
  6. Enter
  7. Cmd-alt-f
  8. Down arrow
  9. Enter

What this proposed feature request is asking for, is something like this.

  1. Keep your focus on your current note
  2. Hold Ctrl-Shift (or whatever hotkey is chosen.)
  3. Down, Down, Down

Your eyes and focus never have to leave your notes. The next note is immediately loaded into your current editor pane.

2 Likes

I understand what you want. I am not sure that this is what OP wants and if what OP wants was already done. It’s not spelled out as clearly as you did.

To cover your workflow, I believe there should be a way to trigger the page preview popup with the keyboard-only. Either pressing ctrl, or space, or nothing on a selected file.
This should be handled by the page preview plugin. I am gonna open a FR for this (https://forum.obsidian.md/t/trigger-note-preview-with-keyboard-only/43365).

I believe that quick explorer plugin does something similar.

1 Like

I agree, it’s unclear whether that is the OP’s exact request. But “inside the active pane” makes it seem like it to me.

Quick Explorer does the same as the current implementation. It opens a selection of files that you still have to focus on and navigate. Yes it gives a popup preview, but that isn’t what this is about. This is about instantly switching “next” and “previous” from inside an editor pane.

(But someone contradict me if I’m misunderstanding. I feel fairly certain I’m not. Scrivener has a similar feature, where you can move up and down the binder with just a single hotkey. There is no focus or context change.)

I think it’s better you open a new FR or plugin ideas, so that it is clear what is being asked, and we will move this discussion under it.

I stand corrected. Quick Explorer plugin does expose this very command. I hadn’t kept up with its development:

Quick Explorer: Go to next file in folder
Quick Explorer: Go to previous file in folder

cc @heumed does that solve your need?

2 Likes

Thanks @rigmarole and @WhiteNoise.

I was not aware of Quick Explorer. The commands that you mention are exactly what I need, even if the plugin feels a bit of an overkill if one is only interested in keyboard navigation as described.

Thanks again!

H

This IS, indeed, the workflow I am aiming at… navigating the file tree via cursor keys updates the content viewing pane with that file’s content (without having to press Enter between each cursor press).
Like nvalt does.