-
Notifications
You must be signed in to change notification settings - Fork 90
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
Ignore accents #173
Comments
I think this is what If you really like this kind of thing, easymotion probably has a feature for it already, I think. The goal of sneak is less "do what I mean" (DWIM) and more narrow. Thanks too :) |
I've tried easymotion, but I don't like it as much. :/
Here I mapped Here I'd hope "ó", "õ" and "ô" to be highlighted too. I think what we would need is something like this: http://vi.stackexchange.com/a/7394 Searching for I don't use This would even be useful for english speakers I think… there are many loan words from french, for instance, and what would you do if you wanted to go to the word |
Hmm, equivalence class looks useful. It shouldn't be much code to support this so I'll keep it open. |
Great, thanks! 🎉 |
I can try to implement this if you want, but I don't know much about Vimscript, so I'd need some help. Now I just looked into your let self.search = escape(a:input, '"\') with let self.search = substitute(a:input, '\a', '[[=\0=]]', 'g') But it doesn't work, I don't know why. Doing that never get any matches anymore. |
Sorry, it might be awhile before I can help with this. |
No problem, I'll keep trying and I'll post here if I get anywhere, and you can look into it whenever you have the time. Thanks again. :) |
Aha! I think I got it. The problem was the escaping, and then I tried to escape just the characters in the original code, Besides escaping those characters, now I tried adding a backslash before the whole equivalence class too: let escapedstring = escape(a:input, '"\')
let self.search = substitute(escapedstring, '\a', '\\[[=\0=]]', 'g') And it works! Here's I also tried some other random characters, slashes, quotes, braces, it seems like it's all working as it should. I didn't make a PR already because I don't know if this has any unintended consequences or if there's something else we'd have to change too, I got to this via wild guesses and I'm not familiar with the rest of the code at all. But if you think it's alright I can make a PR too. For now I'll keep using it like this and if anything weird shows up I'll let you know. |
Nice! Try it for a few days and let me know. This is simple enough that it's worth adding. |
Ok, I used this a lot over the last month and it seems to be working great. :) |
@danielbmarques PR would be welcome. |
In case someone is reading this now and interested: the extra backslash at the beginning of |
I don't know how hard it would be to do this, but it would be really really great if Sneak could consider characters with or without accents as the same.
Just now I wanted to go to the word "ética", for instance, and I instinctively tried Sneak with
et
, but it doesn't work. This happens to me all the time.PS: I love Sneak, thanks for making it!
The text was updated successfully, but these errors were encountered: