Skip to content
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

feat(refile): improve ux by matching files more fuzzily #815

Merged

Conversation

BreitbandModem
Copy link
Contributor

Hi, I really like this project!

I'm using the org-roam plugin, and it will prefix every file with the current timestamp to make sure it's unique (e.g. 20241013095846-helloworld.org).
Refiling to such files is really inconvenient as I need to circle through all filenames with the TAB key.
Searching for it is really cumbersome as I'd have to type in the exact timestamp of this orgfile.

My suggestion is to remove the anchor (^) from the file pattern matching, and allow the search string to be anywhere in the filename.
This way I can just type hello or even world to quickly select the refile target.

@seflue
Copy link
Contributor

seflue commented Oct 18, 2024

Hm, tests with nightly are failing. But I like to see this improved.
Update: Failing nightly tests are not your fault, seems to be a problem on master. @kristijanhusak Do you know, what is wrong with the nightly tests?

May I also recommend telescope-orgmode.nvim to you? It also implements refiling to files and headlines and embraces the full fuzziness of Telescope.

@kristijanhusak
Copy link
Member

@seflue tree-sitter was updated on master and it broke some of the functionality. I created an issue to track that #813. If other versions are passing we are ok.

Copy link
Contributor

@seflue seflue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you can make the matching case insensitive (see suggestions) I would very appreciate to see this merged, because it improves the usability a lot.

lua/orgmode/capture/init.lua Outdated Show resolved Hide resolved
@BreitbandModem BreitbandModem force-pushed the feat/improve-refile-ux branch 2 times, most recently from 691b1e7 to 79024f4 Compare October 19, 2024 10:40
Copy link
Member

@kristijanhusak kristijanhusak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, but we don't need vim.pesc so you can remove that part.

lua/orgmode/capture/init.lua Outdated Show resolved Hide resolved
@kristijanhusak kristijanhusak merged commit 625f060 into nvim-orgmode:master Oct 21, 2024
6 of 7 checks passed
@kristijanhusak
Copy link
Member

Thanks!

@BreitbandModem BreitbandModem deleted the feat/improve-refile-ux branch October 21, 2024 06:59
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

Successfully merging this pull request may close these issues.

3 participants