From dfdf863c468f26b072b95510a7e743942504837e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyryl=20P=C5=82otnicki?= Date: Mon, 19 Dec 2022 09:29:34 +0000 Subject: [PATCH] more vim-like bindings in helix --- nixos/home-manager/programs/helix.nix | 30 +++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/nixos/home-manager/programs/helix.nix b/nixos/home-manager/programs/helix.nix index 8b77ad98..df5e9f25 100644 --- a/nixos/home-manager/programs/helix.nix +++ b/nixos/home-manager/programs/helix.nix @@ -13,9 +13,39 @@ in { enable = true; package = inputs.helix.packages."${system}".helix; settings = { + editor = { + auto-pairs = false; + lsp.display-messages = true; + line-number = "relative"; + }; keys.normal = { C-p = "file_picker"; C-b = "buffer_picker"; + "{" = ["goto_prev_paragraph" "collapse_selection"]; + "}" = ["goto_next_paragraph" "collapse_selection"]; + "0" = "goto_line_start"; + "$" = "goto_line_end"; + "^" = "goto_first_nonwhitespace"; + G = "goto_file_end"; + V = ["select_mode" "extend_to_line_bounds"]; + }; + select = { + "{" = ["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"; + D = ["extend_to_line_bounds" "delete_selection" "normal_mode"]; + C = ["goto_line_start" "extend_to_line_bounds" "change_selection"]; + "%" = "match_brackets"; + V = ["extend_to_line_bounds"]; + + i = "select_textobject_inner"; + a = "select_textobject_around"; + + k = ["extend_line_up" "extend_to_line_bounds"]; + j = ["extend_line_down" "extend_to_line_bounds"]; }; }; languages = [