abo-abo / avy

Jump to things in Emacs tree-style
1.72k stars 110 forks source link

Use words instead of key sequences #176

Closed neongreen closed 7 years ago

neongreen commented 7 years ago

For me, jumping by typing words (e.g. the or of) is much faster than reading typing arbitrary sequences of characters (e.g. lk) even if key characters are shorter. It'd be nice if there was a setting for that. (If you decide to add it, I can provide a list of words.)

neongreen commented 7 years ago

(At the same time though, typing one character is faster than typing a word.)

darrylhebbes commented 7 years ago

@neongreen it seems you may not be familiar with the features of Avy, perhaps what you need is isearch-forward instead.

neongreen commented 7 years ago

@darrylhebbes this isn't what I meant. I meant that if you have e.g. several ks in a file, you would type k an to jump to the first k, k of to jump to the second, k at, k in, and so forth. The reason I'm suggesting this is that my muscle memory is optimised for short words and not random 2-letter combinations, so replacing random combinations with short words could be beneficial. So, this is completely unrelated to the actual contents of the buffer.

neongreen commented 7 years ago

(This said, I understand that I haven't substantiated this with any kind of evidence other than “well maybe it'll work”, so I'm fine with this issue being closed.)

alphapapa commented 7 years ago

This is a very interesting idea! I think you have a very good point here. It's easier to visually recognize and then type actual words which the brain has developed patterns for than to do it for essentially random sequences of letters. It would likely be faster and less error-prone.

darrylhebbes commented 7 years ago

@neongreen yes I like the concept too... we can cook up some evidence ;-)

darrylhebbes commented 7 years ago

As a hack (using the same memory muscle word) you could just use:

(setq avy-keys '(?t ?h ?e))

for the first three letters

abo-abo commented 7 years ago

I like the idea too, that's why I haven't closed the issue. But I don't have the free time to play around with this right now. Maybe someone can contribute code for this, just like it was for De Bruin sequencing - an idea similar to this one.

fabacino commented 7 years ago

@neongreen Try (setq avy-style 'words). See #210 for more information.