-
-
Notifications
You must be signed in to change notification settings - Fork 359
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
Problem with non-ascii motion keys #16
Comments
I've noticed the problem with non-ASCII keys as well. I created an experimental fix at 3df6a76, but it doesn't work 100% and possibly won't work with the newest versions. It's on my todo-list, but it's a bit complicated to make n-byte characters work correctly. |
If I can vote for an issue, I'd rather prefer you to work on issue #17 |
I fixed multibyte handling for the buffer text, but I didn't consider at all for using non-ascii characters as a EasyMotion_keys... It's probably way to hard to implement because it already support multibyte characters on buffer text and I don't think it's worth to fix (and I don't have non-ascii keyboard). Anyway, I fixed multibyte handling, so please update and see how it works again? Thanks |
@haya14busa To reproduce it, you can use I took at quick look at the code.
|
Thanks @blueyed I can reproduce it. However it's maybe hard to fix, so I'll try to fix it later.
It looks good to me, so If you are ok, whould you mind open a pull request? |
I'm having a small problem here too. I have an Italian layout, so I wanted to be able to use the following keys: "èòàùì". Easymotion correctly works, but each of these letters is replaced by "Ã" in the text, so that I can't really disambiguate between them. |
Thank you for the report :) Now, EasyMotion support non-ascii, multibyte key in https://github.com/Lokaltog/vim-easymotion/tree/handle/multibytetargetkey like this.
@Svalorzen, @blueyed Would you mind trying this branch and seeing how it works? NOTE: I cannot say it works well completely, there are some case which target coordinates go wrong... |
I fixed it. Maybe it works well completely to merge into master, but to make it sure, I want you to try this branch and see how it works because I don't use non-ascii layout keyboard. It seems it show non-ascii char well and maybe you can type it. |
I've tested this for a bit and it seems to be working perfectly, at least for what characters I have! |
@Svalorzen Thank you for testing 👍 It seems it works well completely for me including handling '&', so I merged it into master. In addition, I want to add some example of Would you mind telling me how the Italian (or others) layout is correspond with qwerty keyboard layout? QWERTY layout example
|
@haya14busa No problem! The italian layout is a simple qwerty layout, the difference mostly lays in the keys on the right side (after p, l and m). A picture is most probably clearer: Where the So the default EasyMotion keys are perfectly fine, I was just trying to expand the possibilities with the other keys that are easily reachable in this layout =) |
I got it! Thanks for the info @Svalorzen :) |
While experimenting with the most efficient keys mapping for my own keyboard layout :-D , I've found that some utf-8/non-ascii keys (just a guess) are badly handled; and also the & character.
With the following configuration.
let g:EasyMotion_keys = '&é"''(-è_çà)=azertyuiop$qsdfghjklmù*<wxcvbn,;:!'
The & char is correctly taken into account but not displayed (the original character is highlighted instead).
And I think the algorithm is disturbed by 2-byte characters. When words are separated by a single whitespace, either the red highlight is missing or the motion key is offset by one character.
Not annoying at all, but if it could be corrected, that'd be nice!
Thanks
The text was updated successfully, but these errors were encountered: