juliusHuelsmann / st

Repatch repository of developed 'Vim Browse' and 'Alpha Focus Highlight' patches for simple terminal (st).
https://st.suckless.org/patches/alpha_focus_highlight/
MIT License
28 stars 11 forks source link

VIM: Motion Combination: i{w, {, ...} (e.g. 'Viw', 'yi{') #10

Closed juliusHuelsmann closed 4 years ago

juliusHuelsmann commented 4 years ago

Provide implementation of the 'i' motion infix, such that yiw and viw or others work.

in general:

[operation]i[Letter] <=> b[motion]w i                      if letter is motion
                         ?[Letter]\n[operation]/[Letter]\n else

Conceptual Decision: It is possible to issue a key combination when a key is pressed. For this scenario, when i is pressed, a part of the key combination is unknown, and the combination has to be triggered when the next letter is pressed. I guess the only way to solve this is to introduce a new state in the normal mode structure.