From dec8bc0015c9fc0e6f4283557cb088718348ec80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Sat, 1 Aug 2015 19:50:56 +0200 Subject: vis: add text objects `af` and `if` They try to match C-like function definitions. The inner variant only contains the function body. --- vis.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'vis.c') diff --git a/vis.c b/vis.c index aae95f8..ba2e94d 100644 --- a/vis.c +++ b/vis.c @@ -257,6 +257,8 @@ enum { TEXT_OBJ_INNER_BACKTICK, TEXT_OBJ_OUTER_ENTIRE, TEXT_OBJ_INNER_ENTIRE, + TEXT_OBJ_OUTER_FUNCTION, + TEXT_OBJ_INNER_FUNCTION, }; static TextObject textobjs[] = { @@ -282,6 +284,8 @@ static TextObject textobjs[] = { [TEXT_OBJ_INNER_BACKTICK] = { text_object_backtick, INNER }, [TEXT_OBJ_OUTER_ENTIRE] = { text_object_entire, }, [TEXT_OBJ_INNER_ENTIRE] = { text_object_entire_inner, }, + [TEXT_OBJ_OUTER_FUNCTION] = { text_object_function, }, + [TEXT_OBJ_INNER_FUNCTION] = { text_object_function_inner, }, }; /** functions to be called from keybindings */ -- cgit v1.2.3