Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Implement basic separator targets from targets.vim #9127

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

rwblickhan
Copy link

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:

  • I or A behavior to select inside-without-whitespace or around-including-trailing
    • These are complicated by visual mode — I and A immediately fire ActionGoToInsertVisualLineModeCommand when in visual / visual line / visual block mode. That said, i and a seem more broadly useful — for instance, mini.ai actually only implements those two!
  • 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 anyway targets.vim doesn't support that either as far as I can tell). I welcome someone else to refactor 😉

Which issue(s) this PR fixes

Implements a bit more of #601.

Special notes for your reviewer:

@max-sixty
Copy link
Contributor

Would love to see this merged — particularly helpful for removing bar() in foo.bar().baz()...

@rwblickhan rwblickhan force-pushed the rwblickhan-implement-separators branch from 7f81194 to 42c90f3 Compare September 27, 2024 20:57
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants