Skip to content

Vim editor cw acts like dw + insert #152

Closed

Description

@zhengqunkoo

What happened

In Rune cw acts like dw and drops to insert mode. However, in Vim outside of Rune the two behaviours are different: dw deletes the word and consumes the space after, while cw deletes until the end of the word like de and doesn't consume the space after, then drops to insert mode.

What you expected

Like in Vim, cw should delete until end of word only, then go to insert mode

Steps to reproduce

Try it out in the text editor.

This is probably a good first issue.

Area

Editor and text handling

Rune version

v1.2.1-138-gc5aaac32

OS and architecture

Ubuntu 24.04

Shell

No response

Logs, crash report, or screenshots

Relevant configuration

Checks

  • I searched existing issues and this is not a duplicate.
  • I can reproduce this on the latest released version.

Activity

  1. added
    bug
    on Sep 28, 2026
  2. JoeJoeflyn commented on Sep 28, 2026

    @JoeJoeflyn
    Contributor

    working on this

  3. santhiprakash commented on Oct 1, 2026

    @santhiprakash
    Contributor

    Opened #173 for this. cw/cW now select through the word end (Vim's ce-clamped-to-current-word semantics) instead of routing through the dw start-word motion, so the separator before the next word is kept. A word end under the cursor counts as the first end, and on blanks the plain w motion still applies. Verified against Vim 9.1 for word start/middle/end, counts (2cw, c2w, 2c2w), and cW; updated the count tests that had encoded the dw-style expectation.

  4. JoeJoeflyn commented on Oct 1, 2026

    @JoeJoeflyn
    Contributor

    thanks for pr @santhiprakash

  5. added a commit that references this issue on Oct 1, 2026
    53a9d36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    buggood first issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions