aboutsummaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2016-04-19 21:55:24 +0200
committerMarc André Tanner <mat@brain-dump.org>2016-04-19 21:55:24 +0200
commitac54002623ea92e22423ec256e9d78e471eb2781 (patch)
tree00a5c980cd7a93b1aca9ca181835639bedbcbf67 /main.c
parentf484c0dfb5a029c580a5e98268ea049942c66949 (diff)
downloadvis-ac54002623ea92e22423ec256e9d78e471eb2781.tar.gz
vis-ac54002623ea92e22423ec256e9d78e471eb2781.tar.xz
vis: add actions for prev/next character motions within the same line
For now they are not mapped to any key by default, but can be enabled with: :map! normal l <cursor-line-char-next> :map! normal h <cursor-line-char-prev>
Diffstat (limited to 'main.c')
-rw-r--r--main.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/main.c b/main.c
index f95d98f..8fc6191 100644
--- a/main.c
+++ b/main.c
@@ -130,6 +130,8 @@ enum {
VIS_ACTION_EDITOR_SUSPEND,
VIS_ACTION_CURSOR_CHAR_PREV,
VIS_ACTION_CURSOR_CHAR_NEXT,
+ VIS_ACTION_CURSOR_LINE_CHAR_PREV,
+ VIS_ACTION_CURSOR_LINE_CHAR_NEXT,
VIS_ACTION_CURSOR_WORD_START_PREV,
VIS_ACTION_CURSOR_WORD_START_NEXT,
VIS_ACTION_CURSOR_WORD_END_PREV,
@@ -324,6 +326,16 @@ static const KeyAction vis_action[] = {
"Move cursor right, to the next character",
movement, { .i = VIS_MOVE_CHAR_NEXT }
},
+ [VIS_ACTION_CURSOR_LINE_CHAR_PREV] = {
+ "cursor-line-char-prev",
+ "Move cursor left, to the previous character on the same line",
+ movement, { .i = VIS_MOVE_LINE_CHAR_PREV }
+ },
+ [VIS_ACTION_CURSOR_LINE_CHAR_NEXT] = {
+ "cursor-line-char-next",
+ "Move cursor right, to the next character on the same line",
+ movement, { .i = VIS_MOVE_LINE_CHAR_NEXT }
+ },
[VIS_ACTION_CURSOR_WORD_START_PREV] = {
"cursor-word-start-prev",
"Move cursor words backwards",