From e939ddc25927a1b0f03f3a878acfc1ffe167ff3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Fri, 3 Jul 2015 18:10:05 +0200 Subject: Add movements to next/previous character within same line These movements always keep the cursor on the same line and do not move over newlines. --- vis.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'vis.c') diff --git a/vis.c b/vis.c index 6f1fb27..e0ba9e6 100644 --- a/vis.c +++ b/vis.c @@ -105,6 +105,8 @@ enum { MOVE_COLUMN, MOVE_CHAR_PREV, MOVE_CHAR_NEXT, + MOVE_LINE_CHAR_PREV, + MOVE_LINE_CHAR_NEXT, MOVE_WORD_START_NEXT, MOVE_WORD_END_PREV, MOVE_WORD_END_NEXT, @@ -186,6 +188,8 @@ static Movement moves[] = { [MOVE_COLUMN] = { .txt = column, .type = CHARWISE|IDEMPOTENT}, [MOVE_CHAR_PREV] = { .txt = text_char_prev }, [MOVE_CHAR_NEXT] = { .txt = text_char_next }, + [MOVE_LINE_CHAR_PREV] = { .txt = text_line_char_prev, .type = CHARWISE }, + [MOVE_LINE_CHAR_NEXT] = { .txt = text_line_char_next, .type = CHARWISE }, [MOVE_WORD_START_PREV] = { .txt = text_word_start_prev, .type = CHARWISE }, [MOVE_WORD_START_NEXT] = { .txt = text_word_start_next, .type = CHARWISE }, [MOVE_WORD_END_PREV] = { .txt = text_word_end_prev, .type = CHARWISE|INCLUSIVE }, -- cgit v1.2.3