From 46eb88aaa46ebd0f6c605274b0a5e05c567a01e7 Mon Sep 17 00:00:00 2001 From: CJ van den Berg Date: Tue, 9 Apr 2024 23:03:45 +0200 Subject: [PATCH] feat: add open recent mode key binding to vim modes --- src/tui/mode/input/vim/insert.zig | 1 + src/tui/mode/input/vim/normal.zig | 1 + src/tui/mode/input/vim/visual.zig | 1 + 3 files changed, 3 insertions(+) diff --git a/src/tui/mode/input/vim/insert.zig b/src/tui/mode/input/vim/insert.zig index e793548..a17a6e4 100644 --- a/src/tui/mode/input/vim/insert.zig +++ b/src/tui/mode/input/vim/insert.zig @@ -80,6 +80,7 @@ fn mapPress(self: *Self, keypress: u32, egc: u32, modifiers: u32) tp.result { } return switch (modifiers) { mod.CTRL => switch (keynormal) { + 'E' => self.cmd("enter_overlay_mode", command.fmt(.{"open_recent"})), 'U' => self.cmd("move_scroll_page_up", .{}), 'D' => self.cmd("move_scroll_page_down", .{}), 'J' => self.cmd("toggle_logview", .{}), diff --git a/src/tui/mode/input/vim/normal.zig b/src/tui/mode/input/vim/normal.zig index c9669ac..20ede62 100644 --- a/src/tui/mode/input/vim/normal.zig +++ b/src/tui/mode/input/vim/normal.zig @@ -81,6 +81,7 @@ fn mapPress(self: *Self, keypress: u32, egc: u32, modifiers: u32) tp.result { } return switch (modifiers) { mod.CTRL => switch (keynormal) { + 'E' => self.cmd("enter_overlay_mode", command.fmt(.{"open_recent"})), 'U' => self.cmd("move_scroll_page_up", .{}), 'D' => self.cmd("move_scroll_page_down", .{}), 'R' => self.cmd("redo", .{}), diff --git a/src/tui/mode/input/vim/visual.zig b/src/tui/mode/input/vim/visual.zig index 7b60d9d..5ed202d 100644 --- a/src/tui/mode/input/vim/visual.zig +++ b/src/tui/mode/input/vim/visual.zig @@ -81,6 +81,7 @@ fn mapPress(self: *Self, keypress: u32, egc: u32, modifiers: u32) tp.result { } return switch (modifiers) { mod.CTRL => switch (keynormal) { + 'E' => self.cmd("enter_overlay_mode", command.fmt(.{"open_recent"})), 'U' => self.cmd("move_scroll_page_up", .{}), 'D' => self.cmd("move_scroll_page_down", .{}), 'R' => self.cmd("redo", .{}),