From 8162e86bc20a581cb7e82ba51893acbdbb7c6a37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Thu, 27 Jul 2017 23:57:33 +0200 Subject: vis: remove ! operator Use visual mode and :| to filter text through external commands. The mapping was already reused for selection complement. --- main.c | 19 ------------------- 1 file changed, 19 deletions(-) (limited to 'main.c') diff --git a/main.c b/main.c index 3334ed9..a41c253 100644 --- a/main.c +++ b/main.c @@ -101,8 +101,6 @@ static const char *gotoline(Vis*, const char *keys, const Arg *arg); static const char *motiontype(Vis*, const char *keys, const Arg *arg); /* make the current action use the operator indicated by arg->i */ static const char *operator(Vis*, const char *keys, const Arg *arg); -/* use arg->s as command for the filter operator */ -static const char *operator_filter(Vis*, const char *keys, const Arg *arg); /* blocks to read a key and performs movement indicated by arg->i which * should be one of VIS_MOVE_{RIGHT,LEFT}_{TO,TILL} */ static const char *movement_key(Vis*, const char *keys, const Arg *arg); @@ -241,8 +239,6 @@ enum { VIS_ACTION_OPERATOR_CASE_LOWER, VIS_ACTION_OPERATOR_CASE_UPPER, VIS_ACTION_OPERATOR_CASE_SWAP, - VIS_ACTION_OPERATOR_FILTER, - VIS_ACTION_OPERATOR_FILTER_FMT, VIS_ACTION_COUNT, VIS_ACTION_INSERT_NEWLINE, VIS_ACTION_INSERT_TAB, @@ -797,16 +793,6 @@ static const KeyAction vis_action[] = { VIS_HELP("Swap case operator") operator, { .i = VIS_OP_CASE_SWAP } }, - [VIS_ACTION_OPERATOR_FILTER] = { - "vis-operator-filter", - VIS_HELP("Filter operator") - operator_filter, - }, - [VIS_ACTION_OPERATOR_FILTER_FMT] = { - "vis-operator-filter-format", - VIS_HELP("Formatting operator, filter range through fmt(1)") - operator_filter, { .s = "|fmt" } - }, [VIS_ACTION_COUNT] = { "vis-count", VIS_HELP("Count specifier") @@ -1957,11 +1943,6 @@ static const char *operator(Vis *vis, const char *keys, const Arg *arg) { return keys; } -static const char *operator_filter(Vis *vis, const char *keys, const Arg *arg) { - vis_operator(vis, VIS_OP_FILTER, arg->s); - return keys; -} - static const char *movement_key(Vis *vis, const char *keys, const Arg *arg) { if (!keys[0]) { vis_keymap_disable(vis); -- cgit v1.2.3