Vim
Vim copied to clipboard
Implement basic separator targets from `targets.vim`
trafficstars
What this PR does / why we need it:
This adds basic separator text objects from targets.vim. In particular, it supports the basic i/a behavior for all separators supported by targets.vim. This PR notably does not implement:
IorAbehavior to select inside-without-whitespace or around-including-trailing- These are complicated by visual mode —
IandAimmediately fireActionGoToInsertVisualLineModeCommandwhen in visual / visual line / visual block mode. That said,iandaseem more broadly useful — for instance,mini.aiactually only implements those two!
- These are complicated by visual mode —
- Next/last separators
- Expanding selections
- Arguably all of these should be subclasses of
ExpandingSelection, but that feels out-of-scope for this basic PR (and anywaytargets.vimdoesn't support that either as far as I can tell). I welcome someone else to refactor 😉
- Arguably all of these should be subclasses of
Which issue(s) this PR fixes
Implements a bit more of #601.
Special notes for your reviewer:
Would love to see this merged — particularly helpful for removing bar() in foo.bar().baz()...