vai
vai copied to clipboard
Dynamic objects for verbs
vim commands are implemented in a modular way, most (all?) "commands" do not simply "delete" but can be used to construct "sentences" like "delete line" or "delete word", "delete until next char 'x'". It is intuitiv to think of "verbs" and "nouns".
You can read about text objects here or in the official help
vai currently thas no concept of "nouns" or "verbs" or even "commands". It does have "states" like the "YankState" that basically would have the posibillity to "emulate" that kind of behaviour.
I suggest to implement a similar approach as vim: commands
like "delete" and ranges
that can be further divided into motions
and text objects
and possible more (it looks like "visual selection" can be used as "objects" too?).
This could also fix #217 by not remembering input/delete but "commands".
needs advanced parsing and infrastructure. Probably too much at this stage, but the parser should be powerful enough to grant this level of power, at least if plugins want to take advantage of it.
I put it into backlog. unfeasible with current resources, but a vision for the future.
Would you accept pull requests that go into that direction?
Absolutely.