diff options
| author | Rob Pilling <robpilling@gmail.com> | 2016-04-12 22:56:29 +0100 |
|---|---|---|
| committer | Rob Pilling <robpilling@gmail.com> | 2016-04-12 22:56:29 +0100 |
| commit | 255da074c15de15d45eb1582c819d68ee480800d (patch) | |
| tree | 339ae9529e55a2a71b5c66d79fda08ff3c533c25 /main.c | |
| parent | 3939baaac101cea08c711638dfd537f4a039d0ae (diff) | |
| download | vis-255da074c15de15d45eb1582c819d68ee480800d.tar.gz vis-255da074c15de15d45eb1582c819d68ee480800d.tar.xz | |
Add "[{" and "]}" motions to jump to a block's start/end
Diffstat (limited to 'main.c')
| -rw-r--r-- | main.c | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -159,6 +159,8 @@ enum { VIS_ACTION_CURSOR_FUNCTION_END_PREV, VIS_ACTION_CURSOR_FUNCTION_START_NEXT, VIS_ACTION_CURSOR_FUNCTION_END_NEXT, + VIS_ACTION_CURSOR_BLOCK_START, + VIS_ACTION_CURSOR_BLOCK_END, VIS_ACTION_CURSOR_COLUMN, VIS_ACTION_CURSOR_LINE_FIRST, VIS_ACTION_CURSOR_LINE_LAST, @@ -465,6 +467,16 @@ static const KeyAction vis_action[] = { "Move cursor forwards to end of function", movement, { .i = VIS_MOVE_FUNCTION_END_NEXT } }, + [VIS_ACTION_CURSOR_BLOCK_START] = { + "cursor-block-start", + "Move cursor to the opening curly brace in a block", + movement, { .i = VIS_MOVE_BLOCK_START } + }, + [VIS_ACTION_CURSOR_BLOCK_END] = { + "cursor-block-end", + "Move cursor to the closing curly brace in a block", + movement, { .i = VIS_MOVE_BLOCK_END } + }, [VIS_ACTION_CURSOR_COLUMN] = { "cursor-column", "Move cursor to given column of current line", |
