From a8758eeec141d84717ad537c1d42cabf6f0f504a Mon Sep 17 00:00:00 2001 From: CJ van den Berg Date: Fri, 23 May 2025 11:11:00 +0200 Subject: [PATCH 1/2] feat: add flow mode keybinding to reload_file --- src/keybind/builtin/flow.json | 1 + 1 file changed, 1 insertion(+) diff --git a/src/keybind/builtin/flow.json b/src/keybind/builtin/flow.json index 4de41a2..9f1a43a 100644 --- a/src/keybind/builtin/flow.json +++ b/src/keybind/builtin/flow.json @@ -10,6 +10,7 @@ ["ctrl+w", "quit"], ["ctrl+o", "open_file"], ["ctrl+e", "open_recent"], + ["ctrl+shift+f5", "reload_file"], ["ctrl+k ctrl+t", "change_theme"], ["ctrl+shift+p", "open_command_palette"], ["ctrl+shift+q", "quit_without_saving"], From 3c233a8dbff1c8eb23b4a2cc1bb67d3672ee8412 Mon Sep 17 00:00:00 2001 From: CJ van den Berg Date: Fri, 23 May 2025 11:11:25 +0200 Subject: [PATCH 2/2] feat: add vim mode command to reload_file (:e!) --- src/tui/mode/vim.zig | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/tui/mode/vim.zig b/src/tui/mode/vim.zig index f427e80..e88cd7d 100644 --- a/src/tui/mode/vim.zig +++ b/src/tui/mode/vim.zig @@ -46,6 +46,11 @@ const cmds_ = struct { } pub const @"wq!_meta": Meta = .{ .description = "wq! (write file and quit without saving)" }; + pub fn @"e!"(_: *void, _: Ctx) Result { + try cmd("reload_file", .{}); + } + pub const @"e!_meta": Meta = .{ .description = "e! (force reload current file)" }; + pub fn move_begin_or_add_integer_argument_zero(_: *void, _: Ctx) Result { return if (@import("keybind").current_integer_argument()) |_| command.executeName("add_integer_argument_digit", command.fmt(.{0}))