diff --git a/src/keybind/builtin/emacs.json b/src/keybind/builtin/emacs.json index aa203af..083273b 100644 --- a/src/keybind/builtin/emacs.json +++ b/src/keybind/builtin/emacs.json @@ -5,6 +5,7 @@ ["ctrl+shift+-", "undo"], ["ctrl+a", "move_begin"], ["ctrl+k", ["select_end"], ["cut"]], + ["ctrl+w", "cut"], ["alt+shift+,", "move_buffer_begin"], ["alt+shift+.", "move_buffer_end"], ["ctrl+e", "move_end"], @@ -15,8 +16,10 @@ ["ctrl+n", "move_down"], ["ctrl+v", "move_page_down"], ["alt+v", "move_page_up"], + ["ctrl+d", "delete_forward"], + ["alt+d", ["select_word_right"], ["cut"]], ["ctrl+y", "system_paste"], - ["ctrl+x>ctrl+f", "open_file"], + ["ctrl+x>ctrl+f", "open_recent"], ["ctrl+x>k", "close_file"], ["ctrl+x>ctrl+c", "quit"], ["ctrl+x>ctrl+s", "save_file"], @@ -25,6 +28,11 @@ ["alt+x", "open_command_palette"] ] }, + "overlay/palette": { + "press": [ + ["ctrl+a", "palette_menu_top"] + ] + }, "mini/file_browser": { "press": [ ["alt+backspace", "mini_mode_delete_to_previous_path_segment"] @@ -34,7 +42,7 @@ "on_match_failure": "ignore", "press": [ ["ctrl+h>ctrl+a", "open_help"], - ["ctrl+x>ctrl+f", "open_file"], + ["ctrl+x>ctrl+f", "open_recent"], ["alt+x", "open_command_palette"], ["ctrl+x>ctrl+c", "quit"] ] diff --git a/src/tui/mode/overlay/open_recent.zig b/src/tui/mode/overlay/open_recent.zig index d929829..0c4c5b7 100644 --- a/src/tui/mode/overlay/open_recent.zig +++ b/src/tui/mode/overlay/open_recent.zig @@ -271,6 +271,11 @@ const cmds = struct { const Ctx = command.Context; const Result = command.Result; + pub fn palette_menu_top(self: *Self, _: Ctx) Result { + self.menu.select_first(); + } + pub const palette_menu_top_meta = .{}; + pub fn palette_menu_down(self: *Self, _: Ctx) Result { self.menu.select_down(); }