From 8afdb30de348db9211ff906df5efe7a3e3d6724b Mon Sep 17 00:00:00 2001 From: Daniel Poulin Date: Sun, 11 Sep 2022 08:54:59 -0400 Subject: [PATCH] Move default comment toggle binding to pound This is a common rebind in both the helix and kakoune community. Some reasons this is desirable: * Pound is a common symbol for commenting in many languages * Pound is not bound to anything else, and it is not obvious what else it would be bound to * `C-c` should really be reserved for cancelling subshells from `:sh`, `|` and friends Most sensible alternatives are taken: * `/` is search * `*` adds selection to search register * `-` is not common, and though not currently taken, may make sense as the opposite of `_`, for another PR to implement. * `c` change selection * `A-c` change selection w/o yank * `C` copy selection down * `A-C` copy selection up --- helix-term/src/keymap/default.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/helix-term/src/keymap/default.rs b/helix-term/src/keymap/default.rs index f07d4028c..40c7cb8f1 100644 --- a/helix-term/src/keymap/default.rs +++ b/helix-term/src/keymap/default.rs @@ -192,8 +192,7 @@ pub fn default() -> HashMap { }, }, - // move under c - "C-c" => toggle_comments, + "#" => toggle_comments, // z family for save/restore/combine from/to sels from register