From 28062791da47063e40d6cffbb885fe8cf83601af Mon Sep 17 00:00:00 2001 From: cscherr Date: Wed, 4 Jun 2025 12:02:37 +0200 Subject: [PATCH] more vim like stuff --- config.toml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/config.toml b/config.toml index c16ad91..505dd89 100644 --- a/config.toml +++ b/config.toml @@ -39,9 +39,39 @@ C-g = [ ":redraw", ":reload-all" ] +G = "@ge" +H = "goto_line_start" +L = "goto_line_end" +A-j = "@" +A-k = "@" + +# Stolen stuff for being more vim like +# Undoing the 'd' + motion commands restores the selection which is annoying +u = ["undo", "collapse_selection"] [keys.insert] C-h = "move_char_left" C-j = "move_line_down" C-k = "move_line_up" C-l = "move_char_right" + +[keys.select] +# Muscle memory +"{" = ["extend_to_line_bounds", "goto_prev_paragraph"] +"}" = ["extend_to_line_bounds", "goto_next_paragraph"] +0 = "goto_line_start" +"$" = "goto_line_end" +"^" = "goto_first_nonwhitespace" +G = "goto_file_end" +C = ["goto_line_start", "extend_to_line_bounds", "change_selection"] +"%" = "match_brackets" +u = ["switch_to_lowercase", "collapse_selection", "normal_mode"] +U = ["switch_to_uppercase", "collapse_selection", "normal_mode"] + +# Clipboards over registers ye ye +d = ["yank_main_selection_to_clipboard", "delete_selection"] +x = ["yank_main_selection_to_clipboard", "delete_selection"] +y = ["yank_main_selection_to_clipboard", "normal_mode", "flip_selections", "collapse_selection"] +Y = ["extend_to_line_bounds", "yank_main_selection_to_clipboard", "goto_line_start", "collapse_selection", "normal_mode"] +p = "replace_selections_with_clipboard" # No life without this +P = "paste_clipboard_before"