Skip to content

[Feature request] File navigation improvements/ideas #103

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
LeonardoRick opened this issue Oct 31, 2024 · 11 comments
Open

[Feature request] File navigation improvements/ideas #103

LeonardoRick opened this issue Oct 31, 2024 · 11 comments

Comments

@LeonardoRick
Copy link

LeonardoRick commented Oct 31, 2024

Two ideas to file navigation:

  1. Possibility but would be nice to have an option to open the folders so when we execute "Go to next file in folder" we are able to always see the file that is selected, even if it's now a file that is inside a folder that was previously closed.

  2. If point 1 is not possible (or even if it is) Add the possibility to bypass closed folders when navigating through files. Sometimes we want to navigate between files on two folders that have a big one in the middle and would be nice to be able to bypass it with "Go to next/previous file in folder". That would be for sure my default setup.

Thanks for the amazing plugin!!

EDIT: I've also noticed that the navigation works even for files outside the folder so maybe would be nice to rename it to just "Go to next/previous file". Or is there any reason by this should be used consistently only to navigate through folders.

@LeonardoRick LeonardoRick changed the title [Feature request] Open folders on sidebar when navigating through it [Feature request] File navigation improvements/ideas Oct 31, 2024
@pjeby
Copy link
Owner

pjeby commented Nov 1, 2024

I'm not sure I understand what you're asking for. It sounds like you're talking about open/closed folders in the file explorer, but QE doesn't hardly do anything with the file explorer, and the go next/previous commands don't interact with it all.

@LeonardoRick
Copy link
Author

LeonardoRick commented Nov 1, 2024

I have this structure here at the files explorer

image

When I activate the shortcut it focuses the previous note

image

I'm not saying it's manipulating directly the file explorer but it's entering the Programming/ folder and focusing the above file, the last one inside the folder. If the shortcut could identify which folders are closed, it could potentially jump them and focus on the next file that is actually visible, which would make it much more intuitive for people that have big folders with nested items. Does that makes it more clear or is it really not possible?

@pjeby
Copy link
Owner

pjeby commented Nov 2, 2024

If you want to do that, why not just navigate the explorer with your arrow keys?

@strangerinusall
Copy link

I am not the OP, but I think what he is saying is that when you're using hotkey for "Go to next file in folder" or "Go to previous file in folder", it shows focus on the files as expected, until it reaches a closed folder, at which point it starts iterating over files in a folder, however since the folder remains closed, it's lacking visual feedback on where you're actually located and when you will get out of the folder.

It would be nice if it woud auto-expand any folder in the explorer which you navigate to. Or at if there was a hotkey to expand/fold current folder in the explorer without leaving the main note page.

@pjeby
Copy link
Owner

pjeby commented Nov 8, 2024

@strangerinusall The hotkey would be whatever you configure for the built-in "Reveal current file in navigation" command. There is also an "Automatically reveal active file" plugin that runs that command automatically for every file change.

@strangerinusall
Copy link

Didn't know about "Automatically reveal active file" - that's pretty much what I was looking for! Thank you.

Once more thing. Say I am not using the above plugin and I am in the note editing view and moving up or down notes using "Go to next file in folder" or "Go to previous file in folder" commands. Now I enter a folded folder and trigger the "Reveal current file in navigation" command via hotkey. This highlights the page in the left side bar, but from now on if I click either "Go to next file in folder" or "Go to previous file in folder" hotkeys, it shuffles through note pages on the left side? So essentially file explorer on the left becomes note viewer. I don't even know if it's related to the Quick Explorer, but it's quite unintuitive and not clear what's hapenning. All I wanted it expand the folder and continue navigating using your nagivation hotkeys.

Does this ring any bells?

@pjeby
Copy link
Owner

pjeby commented Nov 8, 2024

I use Pane Relief's Focus Lock feature to keep the file explorer from getting focus. But probably QE's file nav commands should handle the case where one is not doing that.

@strangerinusall
Copy link

Good to know! I just installed Pane Relief, so will experiment with that. I see that using Focus Lock means I can't use hotkey to search all files. I pressume you use a different way of searching?

@pjeby
Copy link
Owner

pjeby commented Nov 9, 2024

It looks like between Obsidian 1.7.1 and 1.7.5 they changed how the search command works -- on all earlier Obsidians the global search hotkey focused the search box even with focus lock on. I'll have to investigate and see if there's a fix or workaround I can do. (You can still focus by clicking the box, though.)

@pjeby
Copy link
Owner

pjeby commented Nov 9, 2024

I've released Pane Relief 0.5.6 with a fix for Focus Lock + Search

@strangerinusall
Copy link

strangerinusall commented Nov 9, 2024

I've released Pane Relief 0.5.6 with a fix for Focus Lock + Search

Super amazing, works perfectly! Thank you <3

Edit: without Focus Lock you can go from search into results via down arrow, but now with it enabled it not work, and not even after tabbing. So Search All -> Arrow Down to select result does not work. Unless there is a different shortcut.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants