diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2015-08-01 19:46:48 +0200 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2015-08-02 00:13:51 +0200 |
| commit | dd3a6e2d9487c970fd007989833fc68a3261183a (patch) | |
| tree | 621a03395217b0237b90afc2230b8a0b17583642 /config.def.h | |
| parent | 7c5c6581bca271f41c7ae3ac53107b89249a5fa9 (diff) | |
| download | vis-dd3a6e2d9487c970fd007989833fc68a3261183a.tar.gz vis-dd3a6e2d9487c970fd007989833fc68a3261183a.tar.xz | |
vis: add motions [[, [], ][, ]]
They behave not like in vim, but instead try to find the
start/end of C-like function definitions.
The first character stands for the direction [ for backwards,
] for forwards. The second character denotes the start [ or
end ] respectively.
Diffstat (limited to 'config.def.h')
| -rw-r--r-- | config.def.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/config.def.h b/config.def.h index 1a3a24c..910e1e7 100644 --- a/config.def.h +++ b/config.def.h @@ -123,6 +123,10 @@ static KeyBinding vis_movements[] = { { { NONE('}') }, movement, { .i = MOVE_PARAGRAPH_NEXT } }, { { NONE('(') }, movement, { .i = MOVE_SENTENCE_PREV } }, { { NONE(')') }, movement, { .i = MOVE_SENTENCE_NEXT } }, + { { NONE('['), NONE('[') }, movement, { .i = MOVE_FUNCTION_START_PREV } }, + { { NONE('['), NONE(']') }, movement, { .i = MOVE_FUNCTION_END_PREV } }, + { { NONE(']'), NONE('[') }, movement, { .i = MOVE_FUNCTION_START_NEXT } }, + { { NONE(']'), NONE(']') }, movement, { .i = MOVE_FUNCTION_END_NEXT } }, { { NONE('g'), NONE('g') }, gotoline, { .i = -1 } }, { { NONE('g'), NONE('0') }, movement, { .i = MOVE_SCREEN_LINE_BEGIN } }, { { NONE('g'), NONE('m') }, movement, { .i = MOVE_SCREEN_LINE_MIDDLE } }, |
