From 8c283071dc0e51acc868015fe7ae79ab8edbdf85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Tue, 21 Mar 2017 15:14:43 +0100 Subject: vis: make `cw` and `cW` more vim compatible If the starting position is: * on a space or tab use the `w` motion * on the last letter of a word use `l` or `e` depending on whether a count was given. This also applies for single letter words. * otherwise use the `e` motion As in vim `cw` and `dw` behave differently, whether that is desirable remains to be seen. Might fix #521 --- vis.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'vis.h') diff --git a/vis.h b/vis.h index 6c6e0fe..da1677c 100644 --- a/vis.h +++ b/vis.h @@ -268,10 +268,12 @@ enum VisMotion { VIS_MOVE_CHAR_NEXT, VIS_MOVE_LINE_CHAR_PREV, VIS_MOVE_LINE_CHAR_NEXT, + VIS_MOVE_WORD_NEXT, VIS_MOVE_WORD_START_NEXT, VIS_MOVE_WORD_END_PREV, VIS_MOVE_WORD_END_NEXT, VIS_MOVE_WORD_START_PREV, + VIS_MOVE_LONGWORD_NEXT, VIS_MOVE_LONGWORD_START_PREV, VIS_MOVE_LONGWORD_START_NEXT, VIS_MOVE_LONGWORD_END_PREV, -- cgit v1.2.3