mrjackphil / obsidian-jump-to-link

Quick jump between links using hotkeys
134 stars 17 forks source link

Cannot use lightspeed mode with non-latin text #61

Open nuanjanP opened 10 months ago

nuanjanP commented 10 months ago

Hi. I type quite a lot in a language with completely non-Latin script (Thai, to be exact) and it seems lightspeed mode doesn't work with non-latin text.

Moreover, it seems to not work with non-ASCII text either, but in that case there's kind of a way to use lightspeed anyway, because even non-English words with non-ASCII characters tend to have at least 2 ASCII characters, which is enough to lightspeed search and jump to the middle of the word. (For example, paste the following 3 words into editor mode then try lightspeed mode with search key cr: écris écrit écrivent)

As an ad hoc workaround, I added a (very ugly) regex expression for the jump everywhere mode, but it'd be great if lightspeed works with non-Latin characters.

Fred-Vatin commented 2 days ago

Actually, it doesn’t work with any language using Latin-1 Supplement chars like accentuated letters used in almost any other languages than English. In French, we use a lot of à, é, è, ê, ç and lightspeed won’t recognize them.

Edit: Meanwhile, I used this regex \b\w{2,}\b|\n|\w*[éàèêç]\w* that work for jump anywhere but doesn’t solve the lightspeed that works in VSCode with metajump.