From 789af1ec9fb522a4f3ef70f19f001729a6a0dd25 Mon Sep 17 00:00:00 2001 From: Matthew Cheely Date: Mon, 17 Oct 2022 20:15:27 -0400 Subject: [PATCH] Add some basic docs --- book/src/remapping.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/book/src/remapping.md b/book/src/remapping.md index e3efdf16f..a0c8acada 100644 --- a/book/src/remapping.md +++ b/book/src/remapping.md @@ -19,6 +19,13 @@ w = "move_line_up" # Maps the 'w' key move_line_up 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 +# You can create labeled sub-menus and provide friendly labels for typeable commands +[keys.normal.space.f] # Registering multiple mappings under a single entry creates a sub-menu (accesed by 'space', 'f' in this case) +label = "File" # The menu is called file and within it: +f = "file_picker" # 'f' opens the file picker +s = { label = "Save", command = ":write" } # 's' saves the current file +c = { label = "Edit Config", command = ":open ~/.config/helix/config.toml" } # 'c' opens the helix config file + [keys.insert] "A-x" = "normal_mode" # Maps Alt-X to enter normal mode j = { k = "normal_mode" } # Maps `jk` to exit insert mode