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

avy-goto-subword-0 isn't very accurate #4

Closed
tsdh opened this issue May 7, 2015 · 2 comments
Closed

avy-goto-subword-0 isn't very accurate #4

tsdh opened this issue May 7, 2015 · 2 comments

Comments

@tsdh
Copy link
Contributor

tsdh commented May 7, 2015

Even with my fix from the second commit in #3, avy-goto-subword-0 isn't too accurate. With a word like ThisIsATest, it considers This, Is, and ATest as subwords. But of course ATest are actually two subwords.

I think a proper fix would be to re-use subword-forward-regexp defined in emacs' subword.el. (That also requires case-fold-seach to be nil, so my second commit from #3 is correct anyway.)

@abo-abo
Copy link
Owner

abo-abo commented May 7, 2015

re-use subword-forward-regexp

I could remove the function completely and then just use subword in avy-goto-word-0 if subword-mode is on. What do you think?

@tsdh
Copy link
Contributor Author

tsdh commented May 7, 2015

Not sure. If subword-mode is active, then the user has obviously a preference for subword navigation. OTOH, subword gives many more candidates in e.g. Java buffers and other langs using CamelCaseStyle, and usually you want to jump to the beginning of a method, class, field, or variable in at least 90% of all cases. So I think I prefer the current behavior.

By the way: I noticed that with avy-goto-subword-0, the paths are printed before the leading char of the subword. With avy-goto-word-0 (and I think with all other avy-jump commands) they are printed after the leading char. Ah, you've actually explained that in #5, i.e., subword uses avy--overlay-pre, the others avy--overlay-post. :-)

@abo-abo abo-abo closed this as completed in 487d5ea May 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants