From 2244a5d40c83d477839f91cb6d6a4aeb02446a97 Mon Sep 17 00:00:00 2001 From: omentic Date: Wed, 1 May 2024 23:29:52 +0000 Subject: deploy: 12eec890240a05d1e090114f7f4fdd7c1ee8ff88 --- remapping.html | 76 +++++++++++++++++++++++++++++----------------------------- 1 file changed, 38 insertions(+), 38 deletions(-) (limited to 'remapping.html') diff --git a/remapping.html b/remapping.html index e49afd36..aaacb71d 100644 --- a/remapping.html +++ b/remapping.html @@ -188,59 +188,59 @@ directory (default ~/.config/helix on Linux systems) with a structu this:

# At most one section each of 'keys.normal', 'keys.insert' and 'keys.select'
 [keys.normal]
-C-s = ":w" # Maps Ctrl-s to the typable command :w which is an alias for :write (save file)
-C-o = ":open ~/.config/helix/config.toml" # Maps Ctrl-o to opening of the helix config file
-a = "move_char_left" # Maps the 'a' key to the move_char_left command
-w = "move_line_up" # Maps the 'w' key move_line_up
-"C-S-esc" = "extend_line" # Maps Ctrl-Shift-Escape to extend_line
-g = { a = "code_action" } # Maps `ga` to show possible code actions
-"ret" = ["open_below", "normal_mode"] # Maps the enter key to open_below then re-enter normal mode
+C-s = ":w" # Maps Ctrl-s to the typable command :w which is an alias for :write (save file)
+C-o = ":open ~/.config/helix/config.toml" # Maps Ctrl-o to opening of the helix config file
+a = "move_char_left" # Maps the 'a' key to the move_char_left command
+w = "move_line_up" # Maps the 'w' key move_line_up
+"C-S-esc" = "extend_line" # Maps Ctrl-Shift-Escape to extend_line
+g = { a = "code_action" } # Maps `ga` to show possible code actions
+"ret" = ["open_below", "normal_mode"] # Maps the enter key to open_below then re-enter normal mode
 
 [keys.insert]
-"A-x" = "normal_mode"     # Maps Alt-X to enter normal mode
-j = { k = "normal_mode" } # Maps `jk` to exit insert mode
+"A-x" = "normal_mode"     # Maps Alt-X to enter normal mode
+j = { k = "normal_mode" } # Maps `jk` to exit insert mode
 

Minor modes

Minor modes are accessed by pressing a key (usually from normal mode), giving access to dedicated bindings. Bindings can be modified or added by nesting definitions.

[keys.insert.j]
-k = "normal_mode" # Maps `jk` to exit insert mode
+k = "normal_mode" # Maps `jk` to exit insert mode
 
 [keys.normal.g]
-a = "code_action" # Maps `ga` to show possible code actions
+a = "code_action" # Maps `ga` to show possible code actions
 
 # invert `j` and `k` in view mode
 [keys.normal.z]
-j = "scroll_up"
-k = "scroll_down"
+j = "scroll_up"
+k = "scroll_down"
 
 # create a new minor mode bound to `+`
-[keys.normal."+"]
-m = ":run-shell-command make"
-c = ":run-shell-command cargo build"
-t = ":run-shell-command cargo test"
+[keys.normal."+"]
+m = ":run-shell-command make"
+c = ":run-shell-command cargo build"
+t = ":run-shell-command cargo test"
 

Special keys and modifiers

Ctrl, Shift and Alt modifiers are encoded respectively with the prefixes C-, S- and A-. Special keys are encoded as follows:

- - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + +
Key nameRepresentation
Backspace"backspace"
Space"space"
Return/Enter"ret"
-"minus"
Left"left"
Right"right"
Up"up"
Down"down"
Home"home"
End"end"
Page Up"pageup"
Page Down"pagedown"
Tab"tab"
Delete"del"
Insert"ins"
Null"null"
Escape"esc"
Backspace"backspace"
Space"space"
Return/Enter"ret"
-"minus"
Left"left"
Right"right"
Up"up"
Down"down"
Home"home"
End"end"
Page Up"pageup"
Page Down"pagedown"
Tab"tab"
Delete"del"
Insert"ins"
Null"null"
Escape"esc"

Keys can be disabled by binding them to the no_op command.

@@ -249,15 +249,15 @@ t = ":run-shell-command cargo test" # Only these normal mode bindings will be used [keys.normal] -n = "normal_mode" -t = "goto_definition" +n = "normal_mode" +t = "goto_definition" # remember to add bindings to return to normal mode [keys.select] -esc = "normal_mode" +esc = "normal_mode" [keys.insert] -esc = "normal_mode" +esc = "normal_mode"

A list of commands is available in the Keymap documentation and in the source code at helix-term/src/commands.rs at the invocation of static_commands! macro and the TypableCommandList.

-- cgit v1.2.3-70-g09d2