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

[Feature Request] Improve jump to line when multiple words in the query #54

Closed
Jackiexiao opened this issue May 17, 2022 · 10 comments
Closed
Labels
enhancement New feature or request

Comments

@Jackiexiao
Copy link

it jump to file with last view position instead of matching line, which is quite inconvenient.

@scambier
Copy link
Owner

It works for me, could you record an example please? The cursor should be set at the start of the matching line.

@Jackiexiao
Copy link
Author

sorry, I have ignore some details

I search git checkout, and jump to git relative match line (so I report this issue), but if I quote "git checkout", it jump to git checkout match line

image

but maybe search result could improve (that is, without "quote", and it should show git checkout relative line first)

btw, thank you for developing this great plugin!! is there any way I can buy you a coffee / sponsor ?

@scambier
Copy link
Owner

but maybe search result could improve (that is, without "quote", and it should show git checkout relative line first)

Not a bad idea. The in-file search & matches need to be refactored anyway, so I'll keep this issue open 👍

is there any way I can buy you a coffee / sponsor ?

Thanks, but i don't have any donation link (yet?) :D

@Jackiexiao
Copy link
Author

great, thx!

@Jackiexiao
Copy link
Author

a similar issue is that, if I have a file named foo-code, if I search foocode, I won't able to find foo-code.mdfile, I have to search foo code instead. but in default switcher, you can just search foocode

@Jackiexiao
Copy link
Author

fully match keyword should be list first, for example, debug.md should be first of candidate instead of cpp-debug
image

@scambier
Copy link
Owner

Omnisearch is not Quick Switcher, nor does it try to emulate its behavior; the results are sorted by their score. The note's filename is not the only variable taken into account.

I see the note cpp-debug.md has the word "debug" in a first-level header, which is probably why it ranks higher than gdb-debug.md or debug.md.

@Jackiexiao
Copy link
Author

ok, but in my case, I use omnisearch to replace quick switcher, since omnisearch is very handy lol

@scambier
Copy link
Owner

I get that, and I do the same, that's why I developed Omnisearch :) But the point is that those 2 plugins work differently, so it's expected that their results are not in the same order. Otherwise, what would be the point? ^^

@scambier scambier added the enhancement New feature or request label Jun 27, 2022
@scambier scambier changed the title [BUG] search result doesn't jump directly to the match line [Feature Request] Improve jump to line when multiple words in the query Jun 27, 2022
@scambier scambier added this to the 1.7 milestone Oct 15, 2022
@scambier
Copy link
Owner

This should be more or less done with the release 1.7.4

I'm keeping this open as a reminder because I'd like to try more possible improvements

@scambier scambier removed this from the 1.7 milestone Oct 30, 2022
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

No branches or pull requests

2 participants