vis: mark output of pipe command as saved
[vis.git] / vis-text-objects.c
blob76c7f1f690e4f170fce1339d48adf34fc4db370e
1 #include "vis-core.h"
2 #include "text-objects.h"
3 #include "util.h"
5 void vis_textobject(Vis *vis, enum VisTextObject id) {
6 if (id < LENGTH(vis_textobjects)) {
7 vis->action.textobj = &vis_textobjects[id];
8 action_do(vis, &vis->action);
12 TextObject vis_textobjects[] = {
13 [VIS_TEXTOBJECT_INNER_WORD] = { text_object_word },
14 [VIS_TEXTOBJECT_OUTER_WORD] = { text_object_word_outer },
15 [VIS_TEXTOBJECT_INNER_LONGWORD] = { text_object_longword },
16 [VIS_TEXTOBJECT_OUTER_LONGWORD] = { text_object_longword_outer },
17 [VIS_TEXTOBJECT_SENTENCE] = { text_object_sentence },
18 [VIS_TEXTOBJECT_PARAGRAPH] = { text_object_paragraph },
19 [VIS_TEXTOBJECT_OUTER_SQUARE_BRACKET] = { text_object_square_bracket, OUTER },
20 [VIS_TEXTOBJECT_INNER_SQUARE_BRACKET] = { text_object_square_bracket, INNER },
21 [VIS_TEXTOBJECT_OUTER_CURLY_BRACKET] = { text_object_curly_bracket, OUTER },
22 [VIS_TEXTOBJECT_INNER_CURLY_BRACKET] = { text_object_curly_bracket, INNER },
23 [VIS_TEXTOBJECT_OUTER_ANGLE_BRACKET] = { text_object_angle_bracket, OUTER },
24 [VIS_TEXTOBJECT_INNER_ANGLE_BRACKET] = { text_object_angle_bracket, INNER },
25 [VIS_TEXTOBJECT_OUTER_PARANTHESE] = { text_object_paranthese, OUTER },
26 [VIS_TEXTOBJECT_INNER_PARANTHESE] = { text_object_paranthese, INNER },
27 [VIS_TEXTOBJECT_OUTER_QUOTE] = { text_object_quote, OUTER },
28 [VIS_TEXTOBJECT_INNER_QUOTE] = { text_object_quote, INNER },
29 [VIS_TEXTOBJECT_OUTER_SINGLE_QUOTE] = { text_object_single_quote, OUTER },
30 [VIS_TEXTOBJECT_INNER_SINGLE_QUOTE] = { text_object_single_quote, INNER },
31 [VIS_TEXTOBJECT_OUTER_BACKTICK] = { text_object_backtick, OUTER },
32 [VIS_TEXTOBJECT_INNER_BACKTICK] = { text_object_backtick, INNER },
33 [VIS_TEXTOBJECT_OUTER_ENTIRE] = { text_object_entire, },
34 [VIS_TEXTOBJECT_INNER_ENTIRE] = { text_object_entire_inner, },
35 [VIS_TEXTOBJECT_OUTER_FUNCTION] = { text_object_function, },
36 [VIS_TEXTOBJECT_INNER_FUNCTION] = { text_object_function_inner, },
37 [VIS_TEXTOBJECT_OUTER_LINE] = { text_object_line, },
38 [VIS_TEXTOBJECT_INNER_LINE] = { text_object_line_inner, },