From dd3a6e2d9487c970fd007989833fc68a3261183a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Sat, 1 Aug 2015 19:46:48 +0200 Subject: 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. --- config.def.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'config.def.h') 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 } }, -- cgit v1.2.3