m4xshen / hardtime.nvim

Establish good command workflow and quit bad habit
MIT License
1.35k stars 27 forks source link

Idea: Add AI (even tho i hate it) to figure out better shortcuts #47

Closed nxwbxdy closed 1 year ago

nxwbxdy commented 1 year ago

My idea is to have an ai lear all the vim motions and suggest you what you could have done better. Because it is impossible to write a config for every optimal key combination i think an ai could help suggesting those. It sees your current motion inputs and if you type for example diw i it could suggest you to use ciw instead. I don't know if this is a good idea. I think it's hard to implement and it might not even work in the end as intended. What do you think?

m4xshen commented 1 year ago

It would be cool to have a feature like this. However I personally think it is very difficult to implement.

Training a modal that can suggest better Vim commands is hard. Even though the AI is able to suggest better commands, it is impossible to give the suggestion in real time because computation takes few seconds.

So for this plugin, I think the best way to achieve this is using regex matching. It is fast enough and can cover many situation.