Skip to content

Vi-mode cw inconsistent with actual vi #394

@OJFord

Description

@OJFord

In Vi,

"cw" and "cW" are treated like "ce" and "cE" if the cursor is on a non-blank. This is because "cw" is interpreted as change-word, and a word does not include the following white space.
-- http://vimdoc.sourceforge.net/htmldoc/motion.html#word-motions

This means that, if I type "brew search xonsh" in Vi(m), with my cursor placed at the beginning of 'search'; cw will allow me to type install<esc> to change the sentence to "brew install xonsh".

In prompt_toolkit however, the same process would result in "brew installxonsh".

It may sound trivial, but since vim-users will spend more time using vim commands in vim than anywhere else, it's hard to remember the different behaviour and may cause problems.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions