obsidian-omnisearch icon indicating copy to clipboard operation
obsidian-omnisearch copied to clipboard

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

Open Jackiexiao opened this issue 2 years ago • 9 comments

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

Jackiexiao avatar May 17 '22 11:05 Jackiexiao

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

scambier avatar May 17 '22 11:05 scambier

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 ?

Jackiexiao avatar May 17 '22 11:05 Jackiexiao

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

scambier avatar May 17 '22 11:05 scambier

great, thx!

Jackiexiao avatar May 17 '22 11:05 Jackiexiao

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 avatar May 19 '22 03:05 Jackiexiao

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

Jackiexiao avatar May 19 '22 07:05 Jackiexiao

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.

scambier avatar May 19 '22 07:05 scambier

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

Jackiexiao avatar May 19 '22 07:05 Jackiexiao

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 avatar May 19 '22 07:05 scambier

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 avatar Oct 24 '22 18:10 scambier