abo-abo / avy

Jump to things in Emacs tree-style
1.7k stars 108 forks source link

Contribution Guidance Request: avy-goto-char-timer populate lead key face automatically #354

Open nathanvercaemert opened 1 year ago

nathanvercaemert commented 1 year ago

Hey abo-abo. Thanks for a great package (I particularly love the detailed customization available). Can you tell me how complicated a feature I want would be for me to implement? I'm a pro software developer, but the avy package has intimidated me out of trying to understand how I would do what I want. I use avy-goto-char-time with the timeout set so high that I never timeout (just my workflow). I also use your snipped that sets the avy-keys to a-z. I'm wondering how hard it would be to make the lead key faces pop up as soon as there are 26 or less matches (or when I press RET like normal if there are more than 26 matches). I would still have to press RET and then the corresponding lead key after the sub-26-match-auto-pop-up, but I want to try this functionality to see if it lessens the cognitive load and sharpens that super-fast edge that makes Emacs so fun.

How the code deals with additionally typed characters before RET will depend on the implementation difficulty. I think, ideally, the matching lead key faces wouldn't change with additional characters typed (if that makes sense). Matching words would simply drop off if I typed more characters that made them no longer match.

My goal is simply this: as soon as I've typed enough characters to get the number of single-key-matches down below 26, go ahead and show me what key I need to press. From here I still need to hit RET before I hit the lead keys, but I have a split second extra to know which lead key to hit. Does this make sense?

Again, I'm just asking for your opinion of how difficult this would be to implement. I'm really very happy with things the way they are; I will only try this if there is hope for it not being too difficult.