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
Sort bookmarks in descending order by creation date #3688
Comments
cc @rcorre - I think it'd be easy to add a |
If possible, I'd like the format in the file and the format displayed to be the same if possible. I actually re-order my bookmarks to try to reduce the tabbing I do, and if they're loaded differently from file order, that can get a bit confusing. Maybe we can insert new entries at the top of the file instead? That would leave old bookmarks in the old order though. |
I came up with this. This keeps the order of the bookmarks/quickmarks already saved to disk, reverses the displayed and saved order of marks (of that session) and makes minimal changes to the code. |
@cryzed looks simple enough to me. I don't mind much whether new marks are added to the front or back, since I usually filter them down to one by typing, but I'd be fine merging that in. I have a WIP branch for #882 at https://github.com/rcorre/qutebrowser/tree/bookmarks. I could include it in there, or you could make a PR to my branch if you like. Or just merge to the mainline and I'll adapt. |
The easiest thing would be for you to just include it in your branch, thank you! I'm very much looking forward to proper tags by the way, so thanks for that. |
This causes recently added marks to appear first in the completion. As suggested by @cryzed in qutebrowser#3688.
This causes recently added marks to appear first in the completion. As suggested by @cryzed in qutebrowser#3688.
This causes recently added marks to appear first in the completion. As suggested by @cryzed in qutebrowser#3688.
I like to keep the file in the order of addition and only change the display order, so I'm using simple diff --git qutebrowser/completion/models/urlmodel.py qutebrowser/completion/models/urlmodel.py
index ef1326b57..c722c0e63 100644
--- qutebrowser/completion/models/urlmodel.py
+++ qutebrowser/completion/models/urlmodel.py
@@ -67,7 +67,7 @@ def url(*, info):
quickmarks = [(url, name) for (name, url)
in objreg.get('quickmark-manager').marks.items()]
- bookmarks = objreg.get('bookmark-manager').marks.items()
+ bookmarks = reversed(objreg.get('bookmark-manager').marks.items())
searchengines = [(k, v) for k, v
in sorted(config.val.url.searchengines.items())
if k != 'DEFAULT'] |
I think it makes more sense to sort the
:bookmark-load
list in descending order by its creation date. Currently, when I want to open a bookmark, I entergb
and then first have to scroll down a few hundred entries. More intuitive would be to show the most recent bookmarks at the top instead.The text was updated successfully, but these errors were encountered: