Support `targets.vim` plugin
See original GitHub issueOne plugin that is very useful for my VIM flow is this one: https://github.com/wellle/targets.vim
It builds on the idea of the ci"
command - where it jumps forward to find the nearest quotation, and changes inside, for other characters, like (), {}, [], etc.
It also supports argument text objects - which are handy for deleting and changing in function arguments. So cia
would jump forward to an argument and change.
These motions and text objects are nice because they mean you can strike from a distance.
In terms of integration, it seems like it depends on whether the plugin story for this is implemented: https://github.com/VSCodeVim/Vim/issues/590
If that happens, we might want to look at making the text objects extensible to support these scenarios. Otherwise, we could potentially bake it in as a setting.
Note that ci"
is already supported in VSCodeVim (and VIM out of the box), so potentially the work at least for those jump commands might not be too bad.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:31
- Comments:12 (7 by maintainers)
I just made a PR #7025 for the quotes text object of targets.vim. Will gladly take a shot at implementing the
cin(
etc. as well, if @Austin-Scott feels it’s not likely to happen any time soon.Inspired by the recent addition of argument text objects #4653 I’m currently taking a shot at implementing the
in
(“inner next” such ascin(
),an
(“around next” such ascan(
),il
(“inner last” such ascil(
), andal
(“around last” such ascal(
) commands from this plugin.