diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2017-04-04 09:22:26 +0200 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2017-04-04 09:31:49 +0200 |
| commit | ca0b1fe1a590aa640fb20fcdfde3aeed3a0eac03 (patch) | |
| tree | 3ed66754cf50cc2c38a93179f61e397f67778bb1 /main.c | |
| parent | dd730eb1feb46e9688350b0ff401694653f90554 (diff) | |
| download | vis-ca0b1fe1a590aa640fb20fcdfde3aeed3a0eac03.tar.gz vis-ca0b1fe1a590aa640fb20fcdfde3aeed3a0eac03.tar.xz | |
vis: add motions to move by codepoints
Some people might prefer this for <Backspace> behavior. Except for that
and debugging purposes using `ga` and `g8` it is not yet that useful.
Diffstat (limited to 'main.c')
| -rw-r--r-- | main.c | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -134,6 +134,8 @@ enum { VIS_ACTION_CURSOR_CHAR_NEXT, VIS_ACTION_CURSOR_LINE_CHAR_PREV, VIS_ACTION_CURSOR_LINE_CHAR_NEXT, + VIS_ACTION_CURSOR_CODEPOINT_PREV, + VIS_ACTION_CURSOR_CODEPOINT_NEXT, VIS_ACTION_CURSOR_WORD_START_PREV, VIS_ACTION_CURSOR_WORD_START_NEXT, VIS_ACTION_CURSOR_WORD_END_PREV, @@ -332,6 +334,16 @@ static const KeyAction vis_action[] = { VIS_HELP("Move cursor right, to the next character on the same line") movement, { .i = VIS_MOVE_LINE_CHAR_NEXT } }, + [VIS_ACTION_CURSOR_CODEPOINT_PREV] = { + "vis-motion-codepoint-prev", + VIS_HELP("Move to the previous Unicode codepoint") + movement, { .i = VIS_MOVE_CODEPOINT_PREV } + }, + [VIS_ACTION_CURSOR_CODEPOINT_NEXT] = { + "vis-motion-codepoint-next", + VIS_HELP("Move to the next Unicode codepoint") + movement, { .i = VIS_MOVE_CODEPOINT_NEXT } + }, [VIS_ACTION_CURSOR_WORD_START_PREV] = { "vis-motion-word-start-prev", VIS_HELP("Move cursor words backwards") |
