-
Notifications
You must be signed in to change notification settings - Fork 500
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
Enable the ability to sort the which key #652
Comments
Sounds good to me. Does anyone want to give it a try? |
@taylo2allen I completed the rust basics and I have just started using Yazi. I would like to help. I want to understand few points for this issue:
CC: @sxyazi |
Thank you very much for the help! @abhaysp95 I'll wait for OP's reply and provide more detailed suggestions on how to implement it :) |
@taylo2allen Okay. So this has nothing to do with sorting options present under [manager]. Got it.
@sxyazi I'm going through the source code, I'll try to implement it in the free time I get between my work. This is a nice project and looks like a fun way to get good with Rust. |
Thank you for taking a look @sxyazi @abhaysp95 I believe this would be possible to implement this feature with the sort function found in yazi-core/src/folder/sorter.rs instead of feeding two files into the sort fn you can pass two items in the list of possible keybindings before the text can be displayed on the screen. |
Thanks.
No, it's a file-specific sorting, not applicable to keys, as keys don't have file-specific attributes like modification time, creation time, extension, etc., and they are also hard to share. Therefore, the simplest way is to directly invoke We can add the sorting logic after yazi/yazi-core/src/which/commands/show.rs Lines 48 to 53 in b6f572e
It's the only place that needs to change, with:
|
@taylo2allen I have created the PR #662 . You can try to confirm the behaviour if it fits you CC: @sxyazi |
I'm going to lock this issue because it has been closed for 30 days. ⏳ This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Is your feature request related to a problem? Please describe
No response
Will you be willing to contribute this feature?
Describe the solution you'd like
In the yazi.toml add [which] that has the methods sort_by & sort_sensitive that allows you to sort the which menu.
Describe alternatives you've considered
One way for me to sort the which menu is to physically go to my keymap.toml and sort my keybinding definitions.
Additional context
No response
The text was updated successfully, but these errors were encountered: