Skip to content

refactor: share operator word motion handling and add delete/change find/till operators#135

Merged
leohenon merged 4 commits into
ocvfrom
refactor/vim-operator-motion
May 17, 2026
Merged

refactor: share operator word motion handling and add delete/change find/till operators#135
leohenon merged 4 commits into
ocvfrom
refactor/vim-operator-motion

Conversation

@leohenon
Copy link
Copy Markdown
Owner

@leohenon leohenon commented May 17, 2026

Part of #5.

Refactors the existing word operator motions to go through shared operator/motion handling.

The goal is to make motions produce a span/register result first, then let the operator apply it as delete, change, or yank. This keeps the current behavior the same while making it easier to add more operator motions without duplicating the same delete/change/yank logic.

This also adds new motions: df/dF/dt/dT/cf/cF/ct/cT

@leohenon leohenon changed the title refactor: share operator word motion handling refactor: share operator word motion handling and add change&delete find operators May 17, 2026
@leohenon leohenon changed the title refactor: share operator word motion handling and add change&delete find operators refactor: share operator word motion handling May 17, 2026
@leohenon leohenon force-pushed the refactor/vim-operator-motion branch from a0880d9 to e615d43 Compare May 17, 2026 15:26
@leohenon leohenon marked this pull request as ready for review May 17, 2026 15:27
@leohenon leohenon force-pushed the refactor/vim-operator-motion branch from e615d43 to 941dc3f Compare May 17, 2026 15:33
@leohenon leohenon changed the title refactor: share operator word motion handling refactor: share operator word motion handling and add delete/change find/till operators May 17, 2026
@leohenon leohenon force-pushed the refactor/vim-operator-motion branch from 941dc3f to a0880d9 Compare May 17, 2026 15:37
leohenon and others added 3 commits May 17, 2026 23:38
* feat: add delete find operators

* test: cover delete find edge cases

* fix: ignore current char for backward find delete

* refactor: share find target lookup

* refactor: share find operator setup

* refactor: share find operator helpers

* docs: document new motions

* fix: show full operator find pending indicator

* fix: exclude cursor char from backward find delete

* feat: add change find operators (#138)

* feat: add change find operators

* docs: document change find motions

* refactor: share operator find dispatch

---------

Co-authored-by: Brett Kulp <103147007+BrettKulp@users.noreply.github.com>
@leohenon leohenon force-pushed the refactor/vim-operator-motion branch from a0880d9 to ea90c15 Compare May 17, 2026 15:41
@leohenon leohenon merged commit 7f51e06 into ocv May 17, 2026
1 check passed
@leohenon leohenon deleted the refactor/vim-operator-motion branch May 17, 2026 15:56
leohenon added a commit that referenced this pull request May 17, 2026
…ind/till operators (#135)

* refactor: share operator word motion handling

* refactor: rename operator result types

* feat: add delete find operators (#137)

* feat: add delete find operators

* test: cover delete find edge cases

* fix: ignore current char for backward find delete

* refactor: share find target lookup

* refactor: share find operator setup

* refactor: share find operator helpers

* docs: document new motions

* fix: show full operator find pending indicator

* fix: exclude cursor char from backward find delete

* feat: add change find operators (#138)

* feat: add change find operators

* docs: document change find motions

* refactor: share operator find dispatch

* fix: normalize find target keys (#139)

---------

Co-authored-by: leohenon <77656081+lhenon999@users.noreply.github.com>
Co-authored-by: Brett Kulp <103147007+BrettKulp@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant