diff --git a/src/tui/mode/input/flow.zig b/src/tui/mode/input/flow.zig index 00defba..6d7ee1b 100644 --- a/src/tui/mode/input/flow.zig +++ b/src/tui/mode/input/flow.zig @@ -159,6 +159,7 @@ fn mapPress(self: *Self, keypress: u32, egc: u32, modifiers: u32) tp.result { else => {}, }, mod.ALT | mod.SHIFT => switch (keynormal) { + 'P' => self.cmd("open_command_palette", .{}), 'D' => self.cmd("dupe_up", .{}), // 'B' => self.cmd("select_word_left", .{}), // 'F' => self.cmd("select_word_right", .{}), @@ -363,7 +364,7 @@ const hints = tui.KeybindHints.initComptime(.{ .{ "move_up", "up" }, .{ "move_word_left", "C-left, A-b" }, .{ "move_word_right", "C-right, A-f" }, - .{ "open_command_palette", "C-S-p" }, + .{ "open_command_palette", "C-S-p, S-A-p" }, .{ "open_recent", "C-e" }, .{ "paste", "A-v" }, .{ "pop_cursor", "C-u" }, diff --git a/src/tui/mode/input/home.zig b/src/tui/mode/input/home.zig index 2ccdf00..d654b2c 100644 --- a/src/tui/mode/input/home.zig +++ b/src/tui/mode/input/home.zig @@ -75,6 +75,10 @@ fn mapPress(self: *Self, keypress: u32, modifiers: u32) tp.result { '/' => self.cmd("open_help", .{}), else => {}, }, + mod.ALT | mod.SHIFT => switch (keynormal) { + 'P' => self.cmd("open_command_palette", .{}), + else => {}, + }, mod.ALT => switch (keynormal) { 'L' => self.cmd("toggle_logview", .{}), 'I' => self.cmd("toggle_inputview", .{}), @@ -130,7 +134,7 @@ const hints = tui.KeybindHints.initComptime(.{ .{ "enter_find_in_files_mode", "C-S-f" }, .{ "enter_open_file_mode", "o, C-o" }, .{ "open_recent", "e, C-e" }, - .{ "open_command_palette", "p, C-S-p" }, + .{ "open_command_palette", "p, C-S-p, S-A-p" }, .{ "home_menu_activate", "enter" }, .{ "home_menu_down", "down" }, .{ "home_menu_up", "up" }, diff --git a/src/tui/mode/input/vim/insert.zig b/src/tui/mode/input/vim/insert.zig index c6969e1..e9f2c8e 100644 --- a/src/tui/mode/input/vim/insert.zig +++ b/src/tui/mode/input/vim/insert.zig @@ -161,6 +161,7 @@ fn mapPress(self: *Self, keypress: u32, egc: u32, modifiers: u32) tp.result { else => {}, }, mod.ALT | mod.SHIFT => switch (keynormal) { + 'P' => self.cmd("open_command_palette", .{}), 'D' => self.cmd("dupe_up", .{}), 'F' => self.cmd("filter", command.fmt(.{ "zig", "fmt", "--stdin" })), 'S' => self.cmd("filter", command.fmt(.{ "sort", "-u" })), diff --git a/src/tui/mode/input/vim/normal.zig b/src/tui/mode/input/vim/normal.zig index 4c8f371..2deeee9 100644 --- a/src/tui/mode/input/vim/normal.zig +++ b/src/tui/mode/input/vim/normal.zig @@ -166,6 +166,7 @@ fn mapPress(self: *Self, keypress: u32, egc: u32, modifiers: u32) tp.result { else => {}, }, mod.ALT | mod.SHIFT => switch (keynormal) { + 'P' => self.cmd("open_command_palette", .{}), 'D' => self.cmd("dupe_up", .{}), 'F' => self.cmd("filter", command.fmt(.{ "zig", "fmt", "--stdin" })), 'S' => self.cmd("filter", command.fmt(.{ "sort", "-u" })), @@ -552,7 +553,7 @@ const hints = tui.KeybindHints.initComptime(.{ .{ "move_word_left", "C-left, A-b, b" }, .{ "move_word_right", "C-right, A-f, e" }, .{ "move_word_right_vim", "w" }, - .{ "open_command_palette", "C-S-p, :, S-;" }, + .{ "open_command_palette", "C-S-p, :, S-;, S-A-p" }, .{ "open_recent", "C-e" }, .{ "paste", "A-v, p" }, .{ "pop_cursor", "C-u" }, diff --git a/src/tui/mode/input/vim/visual.zig b/src/tui/mode/input/vim/visual.zig index 8cf707a..2886218 100644 --- a/src/tui/mode/input/vim/visual.zig +++ b/src/tui/mode/input/vim/visual.zig @@ -166,6 +166,7 @@ fn mapPress(self: *Self, keypress: u32, egc: u32, modifiers: u32) tp.result { else => {}, }, mod.ALT | mod.SHIFT => switch (keynormal) { + 'P' => self.cmd("open_command_palette", .{}), 'D' => self.cmd("dupe_up", .{}), 'F' => self.cmd("filter", command.fmt(.{ "zig", "fmt", "--stdin" })), 'S' => self.cmd("filter", command.fmt(.{ "sort", "-u" })), @@ -512,7 +513,7 @@ const hints = tui.KeybindHints.initComptime(.{ .{ "move_word_left", "C-left, A-b, b" }, .{ "move_word_right", "C-right, A-f, e" }, .{ "move_word_right_vim", "w" }, - .{ "open_command_palette", "C-S-p, :, S-;" }, + .{ "open_command_palette", "C-S-p, :, S-;, S-A-p" }, .{ "open_recent", "C-e" }, .{ "paste", "A-v, p" }, .{ "pop_cursor", "C-u" }, diff --git a/src/tui/mode/overlay/command_palette.zig b/src/tui/mode/overlay/command_palette.zig index 76810cd..c2139a8 100644 --- a/src/tui/mode/overlay/command_palette.zig +++ b/src/tui/mode/overlay/command_palette.zig @@ -207,7 +207,12 @@ fn mapPress(self: *Self, keypress: u32, egc: u32, modifiers: u32) tp.result { 'I' => self.cmd_async("toggle_inputview"), else => {}, }, + mod.ALT | mod.SHIFT => switch (keynormal) { + 'P' => self.cmd("command_palette_menu_down", .{}), + else => {}, + }, mod.ALT => switch (keynormal) { + 'P' => self.cmd("command_palette_menu_up", .{}), 'L' => self.cmd("toggle_logview", .{}), 'I' => self.cmd("toggle_inputview", .{}), else => {},