aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config.def.h2
-rw-r--r--main.c6
-rw-r--r--vis-operators.c3
-rw-r--r--vis.h1
4 files changed, 1 insertions, 11 deletions
diff --git a/config.def.h b/config.def.h
index 677178e..5105fd7 100644
--- a/config.def.h
+++ b/config.def.h
@@ -182,7 +182,7 @@ static const KeyBinding bindings_operators[] = {
{ "g~", ACTION(OPERATOR_CASE_SWAP) },
{ "gp", ACTION(PUT_AFTER_END) },
{ "gP", ACTION(PUT_BEFORE_END) },
- { "gu", ACTION(OPERATOR_CASE_LOWER) },
+ { "gu", ALIAS(":|tr '[:upper:]' '[:lower:]'<Enter>")},
{ "gU", ACTION(OPERATOR_CASE_UPPER) },
{ "p", ACTION(PUT_AFTER) },
{ "P", ACTION(PUT_BEFORE) },
diff --git a/main.c b/main.c
index 0c6e4d0..f894652 100644
--- a/main.c
+++ b/main.c
@@ -236,7 +236,6 @@ enum {
VIS_ACTION_OPERATOR_YANK,
VIS_ACTION_OPERATOR_SHIFT_LEFT,
VIS_ACTION_OPERATOR_SHIFT_RIGHT,
- VIS_ACTION_OPERATOR_CASE_LOWER,
VIS_ACTION_OPERATOR_CASE_UPPER,
VIS_ACTION_OPERATOR_CASE_SWAP,
VIS_ACTION_COUNT,
@@ -779,11 +778,6 @@ static const KeyAction vis_action[] = {
VIS_HELP("Shift right operator")
operator, { .i = VIS_OP_SHIFT_RIGHT }
},
- [VIS_ACTION_OPERATOR_CASE_LOWER] = {
- "vis-operator-case-lower",
- VIS_HELP("Lowercase operator")
- operator, { .i = VIS_OP_CASE_LOWER }
- },
[VIS_ACTION_OPERATOR_CASE_UPPER] = {
"vis-operator-case-upper",
VIS_HELP("Uppercase operator")
diff --git a/vis-operators.c b/vis-operators.c
index 0e8ff30..64176a6 100644
--- a/vis-operators.c
+++ b/vis-operators.c
@@ -174,8 +174,6 @@ static size_t op_case_change(Vis *vis, Text *txt, OperatorContext *c) {
*cur = islower(ch) ? toupper(ch) : tolower(ch);
else if (c->arg->i == VIS_OP_CASE_UPPER)
*cur = toupper(ch);
- else
- *cur = tolower(ch);
}
}
@@ -268,7 +266,6 @@ bool vis_operator(Vis *vis, enum VisOperator id, ...) {
case VIS_OP_MODESWITCH:
vis->action.mode = va_arg(ap, int);
break;
- case VIS_OP_CASE_LOWER:
case VIS_OP_CASE_UPPER:
case VIS_OP_CASE_SWAP:
vis->action.arg.i = id;
diff --git a/vis.h b/vis.h
index eef0056..0a5217f 100644
--- a/vis.h
+++ b/vis.h
@@ -388,7 +388,6 @@ enum VisOperator {
VIS_OP_CASE_SWAP,
VIS_OP_INVALID, /* denotes the end of the "real" operators */
/* pseudo operators: keep them at the end to save space in array definition */
- VIS_OP_CASE_LOWER,
VIS_OP_CASE_UPPER,
VIS_OP_CURSOR_EOL,
VIS_OP_PUT_AFTER_END,