summaryrefslogtreecommitdiff
path: root/src/normal.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/normal.cc')
-rw-r--r--src/normal.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/normal.cc b/src/normal.cc
index e4b7e76f..98ff8ae4 100644
--- a/src/normal.cc
+++ b/src/normal.cc
@@ -971,6 +971,12 @@ void start_or_end_macro_recording(Context& context, int)
}, "record macro", "enter macro name ");
}
+void end_macro_recording(Context& context, int)
+{
+ if (context.input_handler().is_recording())
+ context.input_handler().stop_recording();
+}
+
void replay_macro(Context& context, int count)
{
on_next_key_with_autoinfo(context, [count](Key key, Context& context) mutable {
@@ -1359,6 +1365,8 @@ KeyMap keymap =
{ 'q', { "replay recorded macro", replay_macro } },
{ 'Q', { "start or end macro recording", start_or_end_macro_recording } },
+ { Key::Escape, { "end macro recording", end_macro_recording } },
+
{ '`', { "convert to lower case in selections", for_each_char<to_lower> } },
{ '~', { "convert to upper case in selections", for_each_char<to_upper> } },
{ alt('`'), { "swap case in selections", for_each_char<swap_case> } },