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

Allow partial matches instead of exact filename matches #19

Open
crazymedguy opened this issue Feb 20, 2022 · 7 comments · Fixed by #30
Open

Allow partial matches instead of exact filename matches #19

crazymedguy opened this issue Feb 20, 2022 · 7 comments · Fixed by #30
Labels
enhancement New feature or request

Comments

@crazymedguy
Copy link

Hi, just wondering if there will be plans for 'partial matches' as opposed to direct filename matches because it would be far more useful. For example, a similar obsidian plugin https://github.com/tadashi-aikawa/obsidian-various-complements-plugin does partial matches and shows a pulldown menu with several suggestions which 'partially' match instead of having the exact name. It would be nice if there could be an option to enable this! Thank you

@hadynz
Copy link
Owner

hadynz commented Feb 20, 2022

Funny you ask for this. This plug-in started off doing only partial matching, and recently it got modified to do exact matching instead.

Do you mind sharing some examples of partial matching that would be useful for you? It would help me to know some real examples.

@GitMurf
Copy link

GitMurf commented Feb 20, 2022

My thoughts would be partial matching in 2 main ways:

Lets use the example of GitHub Fork

  1. things like plurals and adding "ed" / "ing" etc.

    • So you would find matches for GitHub Forks, GitHub Forked, GitHub Forking
  2. matching fewer words.

    • If you type GitHub in your note, it would suggest GitHub Fork as an option
    • If you type fork in your note, it would suggest GitHub Fork as an option

What I would NOT want (and probably why you changed initially from partial matches) is it I typed git in my note I would NOT want it to suggest GitHub Fork. It needs to at least match a single word in the page name and/or the main primitive of the word (plurals like item 1 above). Hopefully that makes sense.

A good example for me is for people. If I have a page for John Doe when I am typing I don't want to type out the full name so usually I will just say: I talked to John today about the thing ... so I would like John to suggest John Doe as well as any of my other john pages.

Those are my main use cases.

@hadynz
Copy link
Owner

hadynz commented Feb 20, 2022

Can you share a couple more examples of what you'd expect when:

  • There are stop words (i.e. the, and, on, etc)

  • You have three or more words for a given note title

@hadynz hadynz added the enhancement New feature or request label Feb 20, 2022
@hadynz hadynz linked a pull request Feb 26, 2022 that will close this issue
@hadynz
Copy link
Owner

hadynz commented Feb 26, 2022

@GitMurf Both your requirements are now implemented in 1.5.0. I'd greatly appreciate it if you can give it a spin and let me know if it works as you would've expected.

@crazymedguy
Copy link
Author

Seems awesome! Just got something I wanted to check... Is it possible to link as an alias?

For example, while typing "keyword" which will highlight as a match on sidekick, it shows up a link [[this is a link to the keyword match]]. I'd like it to change to [[this is a link to the keyword match|keyword]] instead of [[this is a link to the keyword match]]

@hadynz
Copy link
Owner

hadynz commented Feb 27, 2022

For example, while typing "keyword" which will highlight as a match on sidekick, it shows up a link [[this is a link to the keyword match]]. I'd like it to change to [[this is a link to the keyword match|keyword]] instead of [[this is a link to the keyword match]]

@crazymedguy That's a really good suggestion and should be the default behaviour of the plugin. If you don't mind, can you open a separate issue with this suggestion. Would be good to have it separate to this thread which I want to close given that it's been resolved.

@GitMurf
Copy link

GitMurf commented Mar 15, 2022

Both your requirements are now implemented in 1.5.0. I'd greatly appreciate it if you can give it a spin and let me know if it works as you would've expected.

@hadynz sorry for the slow response... yes this is precisely what I was thinking! I would close this Issue but doesn't look like I have the ability to so go ahead and close it :) Thanks for all the hard work!

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

Successfully merging a pull request may close this issue.

3 participants