vis
a vi-like editor based on Plan 9's structural regular expressions
git clone https://9o.is/git/vis.git
commit ee9219c0b20e0f4b49b5fe7627f7d8e992db4e8d parent 9aa1b146d118b6a3440ef9375ea6d8b3582a3dfb Author: Marc André Tanner <mat@brain-dump.org> Date: Wed, 10 Sep 2014 21:01:41 +0200 Make movements to next / previous line available Diffstat:
| M | vis.c | | | 4 | ++++ |
1 file changed, 4 insertions(+), 0 deletions(-)
diff --git a/vis.c b/vis.c @@ -165,10 +165,12 @@ static Operator ops[] = { enum { MOVE_LINE_UP, MOVE_LINE_DOWN, + MOVE_LINE_PREV, MOVE_LINE_BEGIN, MOVE_LINE_START, MOVE_LINE_FINISH, MOVE_LINE_END, + MOVE_LINE_NEXT, MOVE_LINE, MOVE_COLUMN, MOVE_CHAR_PREV, @@ -218,10 +220,12 @@ static size_t column(const Arg *arg); static Movement moves[] = { [MOVE_LINE_UP] = { .win = window_line_up }, [MOVE_LINE_DOWN] = { .win = window_line_down }, + [MOVE_LINE_PREV] = { .txt = text_line_prev, .type = LINEWISE }, [MOVE_LINE_BEGIN] = { .txt = text_line_begin, .type = LINEWISE }, [MOVE_LINE_START] = { .txt = text_line_start, .type = LINEWISE }, [MOVE_LINE_FINISH] = { .txt = text_line_finish, .type = LINEWISE }, [MOVE_LINE_END] = { .txt = text_line_end, .type = LINEWISE }, + [MOVE_LINE_NEXT] = { .txt = text_line_next, .type = LINEWISE }, [MOVE_LINE] = { .cmd = line, .type = LINEWISE }, [MOVE_COLUMN] = { .cmd = column, .type = CHARWISE }, [MOVE_CHAR_PREV] = { .win = window_char_prev },