aboutsummaryrefslogtreecommitdiff
path: root/vis.h
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2017-03-21 15:14:43 +0100
committerMarc André Tanner <mat@brain-dump.org>2017-03-21 15:38:27 +0100
commit8c283071dc0e51acc868015fe7ae79ab8edbdf85 (patch)
tree353626b1340d5c4a6d6576ba64368d2411b084a5 /vis.h
parent937d8a83610ac4a642d52412e94bebda3ed6b138 (diff)
downloadvis-8c283071dc0e51acc868015fe7ae79ab8edbdf85.tar.gz
vis-8c283071dc0e51acc868015fe7ae79ab8edbdf85.tar.xz
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
Diffstat (limited to 'vis.h')
-rw-r--r--vis.h2
1 files changed, 2 insertions, 0 deletions
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,