from vim's help: cw cW Special case: When the cursor is in a word, "cw" and "cW" do not include the white space after a word, they only change up to the end of the word. This is because Vim interprets "cw" as change-word, and a word does not include the following white space. --- vis.c | 7 +++++++ 1 file changed, 7 insertions(+)
diff --git a/vis.c b/vis.c index 11cf1af..d18948a 100644 --- a/vis.c +++ b/vis.c @@ -556,6 +556,13 @@ static void op_delete(OperatorContext *c) { } static void op_change(OperatorContext *c) { + if(action.movement->txt == text_word_start_next) { + action.movement->txt = text_word_end_next; + action.movement->type |= INCLUSIVE; + } else if(action.movement->txt == text_longword_start_next) { + action.movement->txt = text_longword_end_next; + action.movement->type |= INCLUSIVE; + } op_delete(c); switchmode(&(const Arg){ .i = VIS_MODE_INSERT }); } -- 2.3.5