Unnamed repository; edit this file 'description' to name the repository.
.markdown-body { font-size: 14px; line-height: 1.6; overflow: hidden; color: #CCCAC2; } .markdown-body>*:first-child { margin-top: 0 !important; } .markdown-body>*:last-child { margin-bottom: 0 !important; } .markdown-body a.absent { color: #FF6666; } .markdown-body a.anchor { display: block; padding-left: 30px; margin-left: -30px; cursor: pointer; position: absolute; top: 0; left: 0; bottom: 0; } .markdown-body h1, .markdown-body h2, .markdown-body h3, .markdown-body h4, .markdown-body h5, .markdown-body h6 { margin: 20px 0 10px; padding: 0; font-weight: bold; -webkit-font-smoothing: antialiased; cursor: text; position: relative; color: #CCCAC2; } .markdown-body h1 .mini-icon-link, .markdown-body h2 .mini-icon-link, .markdown-body h3 .mini-icon-link, .markdown-body h4 .mini-icon-link, .markdown-body h5 .mini-icon-link, .markdown-body h6 .mini-icon-link { display: none; color: #CCCAC2; } .markdown-body h1:hover a.anchor, .markdown-body h2:hover a.anchor, .markdown-body h3:hover a.anchor, .markdown-body h4:hover a.anchor, .markdown-body h5:hover a.anchor, .markdown-body h6:hover a.anchor { text-decoration: none; line-height: 1; padding-left: 0; margin-left: -22px; top: 15%; } .markdown-body h1:hover a.anchor .mini-icon-link, .markdown-body h2:hover a.anchor .mini-icon-link, .markdown-body h3:hover a.anchor .mini-icon-link, .markdown-body h4:hover a.anchor .mini-icon-link, .markdown-body h5:hover a.anchor .mini-icon-link, .markdown-body h6:hover a.anchor .mini-icon-link { display: inline-block; } div#cgit .markdown-body h1 a.toclink, div#cgit .markdown-body h2 a.toclink, div#cgit .markdown-body h3 a.toclink, div#cgit .markdown-body h4 a.toclink, div#cgit .markdown-body h5 a.toclink, div#cgit .markdown-body h6 a.toclink { color: #CCCAC2; } .markdown-body h1 tt, .markdown-body h1 code, .markdown-body h2 tt, .markdown-body h2 code, .markdown-body h3 tt, .markdown-body h3 code, .markdown-body h4 tt, .markdown-body h4 code, .markdown-body h5 tt, .markdown-body h5 code, .markdown-body h6 tt, .markdown-body h6 code { font-size: inherit; } .markdown-body h1 { font-size: 28px; color: #CCCAC2; } .markdown-body h2 { font-size: 24px; border-bottom: 1px solid #8A9199; color: #CCCAC2; } .markdown-body h3 { font-size: 18px; color: #CCCAC2; } .markdown-body h4 { font-size: 16px; color: #CCCAC2; } .markdown-body h5 { font-size: 14px; color: #CCCAC2; } .markdown-body h6 { color: #CCCAC2; font-size: 14px; } .markdown-body p, .markdown-body blockquote, .markdown-body ul, .markdown-body ol, .markdown-body dl, .markdown-body table, .markdown-body pre { margin: 15px 0; } .markdown-body hr { border: 2px solid #8A9199; } .markdown-body>h2:first-child, .markdown-body>h1:first-child, .markdown-body>h1:first-child+h2, .markdown-body>h3:first-child, .markdown-body>h4:first-child, .markdown-body>h5:first-child, .markdown-body>h6:first-child { margin-top: 0; padding-top: 0; } .markdown-body a:first-child h1, .markdown-body a:first-child h2, .markdown-body a:first-child h3, .markdown-body a:first-child h4, .markdown-body a:first-child h5, .markdown-body a:first-child h6 { margin-top: 0; padding-top: 0; } .markdown-body h1+p, .markdown-body h2+p, .markdown-body h3+p, .markdown-body h4+p, .markdown-body h5+p, .markdown-body h6+p { margin-top: 0; } .markdown-body li p.first { display: inline-block; } .markdown-body ul, .markdown-body ol { padding-left: 30px; } .markdown-body ul.no-list, .markdown-body ol.no-list { list-style-type: none; padding: 0; } .markdown-body ul li>:first-child, .markdown-body ul li ul:first-of-type, .markdown-body ul li ol:first-of-type, .markdown-body ol li>:first-child, .markdown-body ol li ul:first-of-type, .markdown-body ol li ol:first-of-type { margin-top: 0px; } .markdown-body ul li p:last-of-type, .markdown-body ol li p:last-of-type { margin-bottom: 0; } .markdown-body ul ul, .markdown-body ul ol, .markdown-body ol ol, .markdown-body ol ul { margin-bottom: 0; } .markdown-body dl { padding: 0; } .markdown-body dl dt { font-size: 14px; font-weight: bold; font-style: italic; padding: 0; margin: 15px 0 5px; } .markdown-body dl dt:first-child { padding: 0; } .markdown-body dl dt>:first-child { margin-top: 0px; } .markdown-body dl dt>:last-child { margin-bottom: 0px; } .markdown-body dl dd { margin: 0 0 15px; padding: 0 15px; } .markdown-body dl dd>:first-child { margin-top: 0px; } .markdown-body dl dd>:last-child { margin-bottom: 0px; } .markdown-body blockquote { border-left: 4px solid #FFAD66; padding: 0 15px; color: #B8CFE6; } .markdown-body blockquote>:first-child { margin-top: 0px; } .markdown-body blockquote>:last-child { margin-bottom: 0px; } .markdown-body table th { font-weight: bold; } .markdown-body table th, .markdown-body table td { border: 1px solid #8A9199; padding: 6px 13px; } .markdown-body table tr { border-top: 1px solid #8A9199; background-color: #242936; } .markdown-body table tr:nth-child(2n) { background-color: #1A1F29; } .markdown-body img { max-width: 100%; -moz-box-sizing: border-box; box-sizing: border-box; } .markdown-body span.frame { display: block; overflow: hidden; } .markdown-body span.frame>span { border: 1px solid #8A9199; display: block; float: left; overflow: hidden; margin: 13px 0 0; padding: 7px; width: auto; } .markdown-body span.frame span img { display: block; float: left; } .markdown-body span.frame span span { clear: both; color: #CCCAC2; display: block; padding: 5px 0 0; } .markdown-body span.align-center { display: block; overflow: hidden; clear: both; } .markdown-body span.align-center>span { display: block; overflow: hidden; margin: 13px auto 0; text-align: center; } .markdown-body span.align-center span img { margin: 0 auto; text-align: center; } .markdown-body span.align-right { display: block; overflow: hidden; clear: both; } .markdown-body span.align-right>span { display: block; overflow: hidden; margin: 13px 0 0; text-align: right; } .markdown-body span.align-right span img { margin: 0; text-align: right; } .markdown-body span.float-left { display: block; margin-right: 13px; overflow: hidden; float: left; } .markdown-body span.float-left span { margin: 13px 0 0; } .markdown-body span.float-right { display: block; margin-left: 13px; overflow: hidden; float: right; } .markdown-body span.float-right>span { display: block; overflow: hidden; margin: 13px auto 0; text-align: right; } .markdown-body code, .markdown-body tt { margin: 0 2px; padding: 0px 5px; border: 1px solid #8A9199; background-color: #282E3B; border-radius: 3px; color: #CCCAC2; } .markdown-body code { white-space: nowrap; } .markdown-body pre>code { margin: 0; padding: 0; white-space: pre; border: none; background: transparent; } .markdown-body .highlight pre, .markdown-body pre { background-color: #282E3B; border: 1px solid #8A9199; font-size: 13px; line-height: 19px; overflow: auto; padding: 6px 10px; border-radius: 3px; } .markdown-body pre code, .markdown-body pre tt { margin: 0; padding: 0; background-color: transparent; border: none; } pre { line-height: 125%; } td.linenos .normal { color: #8a919966; background-color: transparent; padding-left: 5px; padding-right: 5px; } span.linenos { color: #8a919966; background-color: transparent; padding-left: 5px; padding-right: 5px; } td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } .highlight .hll { background-color: #363C48 } .highlight .c { color: #6E7C8E } /* Comment */ .highlight .err { color: #FF6666 } /* Error */ .highlight .g { color: #CCCAC2 } /* Generic */ .highlight .k { color: #FFAD66 } /* Keyword */ .highlight .o { color: #F29E74 } /* Operator */ .highlight .ch { color: #6E7C8E } /* Comment.Hashbang */ .highlight .cm { color: #6E7C8E; font-style: italic } /* Comment.Multiline */ .highlight .cp { color: #FFAD66 } /* Comment.Preproc */ .highlight .cpf { color: #D5FF80 } /* Comment.PreprocFile */ .highlight .c1 { color: #6E7C8E; font-style: italic } /* Comment.Single */ .highlight .cs { color: #6E7C8E } /* Comment.Special */ .highlight .gd { color: #F27983 } /* Generic.Deleted */ .highlight .ge { color: #FFD173; font-style: italic } /* Generic.Emph */ .highlight .gr { color: #FF6666 } /* Generic.Error */ .highlight .gh { color: #FFD173; font-weight: bold } /* Generic.Heading */ .highlight .gi { color: #87D96C } /* Generic.Inserted */ .highlight .go { color: #D5FF80 } /* Generic.Output */ .highlight .gp { color: #F29E74 } /* Generic.Prompt */ .highlight .gs { color: #FFD173; font-weight: bold } /* Generic.Strong */ .highlight .gu { color: #CCCAC2 } /* Generic.Subheading */ .highlight .gt { color: #FF6666 } /* Generic.Traceback */ .highlight .kc { color: #DFBFFF } /* Keyword.Constant */ .highlight .kd { color: #FFCC66 } /* Keyword.Declaration */ .highlight .kn { color: #FFAD66 } /* Keyword.Namespace */ .highlight .kp { color: #FFAD66 } /* Keyword.Pseudo */ .highlight .kr { color: #FFAD66 } /* Keyword.Reserved */ .highlight .kt { color: #73D0FF } /* Keyword.Type */ .highlight .m { color: #DFBFFF } /* Literal.Number */ .highlight .s { color: #D5FF80 } /* Literal.String */ .highlight .na { color: #FFD173 } /* Name.Attribute */ .highlight .nb { color: #F28779 } /* Name.Builtin */ .highlight .nc { color: #5CCFE6 } /* Name.Class */ .highlight .no { color: #DFBFFF } /* Name.Constant */ .highlight .nd { color: #FFDFB3 } /* Name.Decorator */ .highlight .nf { color: #FFD173 } /* Name.Function */ .highlight .nt { color: #5CCFE6 } /* Name.Tag */ .highlight .ow { color: #F29E74 } /* Operator.Word */ .highlight .w { color: #CCCAC2 } /* Text.Whitespace */ .highlight .mb { color: #DFBFFF } /* Literal.Number.Bin */ .highlight .mf { color: #DFBFFF } /* Literal.Number.Float */ .highlight .mh { color: #DFBFFF } /* Literal.Number.Hex */ .highlight .mi { color: #DFBFFF } /* Literal.Number.Integer */ .highlight .mo { color: #DFBFFF } /* Literal.Number.Oct */ .highlight .sa { color: #D5FF80 } /* Literal.String.Affix */ .highlight .sb { color: #F29E74 } /* Literal.String.Backtick */ .highlight .sc { color: #D5FF80 } /* Literal.String.Char */ .highlight .dl { color: #D5FF80 } /* Literal.String.Delimiter */ .highlight .sd { color: #95E6CB; font-style: italic } /* Literal.String.Doc */ .highlight .s2 { color: #D5FF80 } /* Literal.String.Double */ .highlight .se { color: #D5FF80 } /* Literal.String.Escape */ .highlight .sh { color: #D5FF80 } /* Literal.String.Heredoc */ .highlight .si { color: #D5FF80 } /* Literal.String.Interpol */ .highlight .sx { color: #D5FF80 } /* Literal.String.Other */ .highlight .sr { color: #95E6CB } /* Literal.String.Regex */ .highlight .s1 { color: #D5FF80 } /* Literal.String.Single */ .highlight .ss { color: #D5FF80 } /* Literal.String.Symbol */ .highlight .bp { color: #F28779 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #FFD173 } /* Name.Function.Magic */ .highlight .vi { color: #FFCC66 } /* Name.Variable.Instance */ .highlight .vm { color: #5CCFE6; font-style: italic } /* Name.Variable.Magic */ .highlight .il { color: #DFBFFF } /* Literal.Number.Integer.Long */

Migrating from Vim

Helix's editing model is strongly inspired from vim and kakoune, and a notable difference from vim (and the most striking similarity to kakoune) is that Helix follows the selection → action model. This means that the whatever you are going to act on (a word, a paragraph, a line, etc) is selected first and the action itself (delete, change, yank, etc) comes second. A cursor is simply a single width selection.

See also Kakoune's Migrating from Vim.

TODO: Mention texobjects, surround, registers

generated by cgit (git 2.49.0) at 2026-07-09 05:05:24 +0700
problem? patch? question? complaint? email bend dot n on outlook
ros::keymap; use super::{Keymap, Mode}; use helix_core::hashmap; pub fn default() -> HashMap<Mode, Keymap> { let normal = keymap!({ "Normal mode" "h" | "left" => move_char_left, "j" | "down" => move_line_down, "k" | "up" => move_line_up, "l" | "right" => move_char_right, "t" => find_till_char, "f" => find_next_char, "T" => till_prev_char, "F" => find_prev_char, "r" => replace, "R" => replace_with_yanked, "A-." => repeat_last_motion, "~" => switch_case, "`" => switch_to_lowercase, "A-`" => switch_to_uppercase, "home" => goto_line_start, "end" => goto_line_end, "w" => move_next_word_start, "b" => move_prev_word_start, "e" => move_next_word_end, "W" => move_next_long_word_start, "B" => move_prev_long_word_start, "E" => move_next_long_word_end, "v" => select_mode, "G" => goto_line, "g" => { "Goto" "g" => goto_file_start, "e" => goto_last_line, "f" => goto_file, "h" => goto_line_start, "l" => goto_line_end, "s" => goto_first_nonwhitespace, "d" => goto_definition, "y" => goto_type_definition, "r" => goto_reference, "i" => goto_implementation, "t" => goto_window_top, "c" => goto_window_center, "b" => goto_window_bottom, "a" => goto_last_accessed_file, "m" => goto_last_modified_file, "n" => goto_next_buffer, "p" => goto_previous_buffer, "." => goto_last_modification, }, ":" => command_mode, "i" => insert_mode, "I" => prepend_to_line, "a" => append_mode, "A" => append_to_line, "o" => open_below, "O" => open_above, "d" => delete_selection, "A-d" => delete_selection_noyank, "c" => change_selection, "A-c" => change_selection_noyank, "C" => copy_selection_on_next_line, "A-C" => copy_selection_on_prev_line, "s" => select_regex, "A-s" => split_selection_on_newline, "S" => split_selection, ";" => collapse_selection, "A-;" => flip_selections, "A-o" | "A-up" => expand_selection, "A-i" | "A-down" => shrink_selection, "A-p" | "A-left" => select_prev_sibling, "A-n" | "A-right" => select_next_sibling, "%" => select_all, "x" => extend_line, "X" => extend_to_line_bounds, "A-x" => shrink_to_line_bounds, "m" => { "Match" "m" => match_brackets, "s" => surround_add, "r" => surround_replace, "d" => surround_delete, "a" => select_textobject_around, "i" => select_textobject_inner, }, "[" => { "Left bracket" "d" => goto_prev_diag, "D" => goto_first_diag, "f" => goto_prev_function, "c" => goto_prev_class, "a" => goto_prev_parameter, "o" => goto_prev_comment, "t" => goto_prev_test, "p" => goto_prev_paragraph, "space" => add_newline_above, }, "]" => { "Right bracket" "d" => goto_next_diag, "D" => goto_last_diag, "f" => goto_next_function, "c" => goto_next_class, "a" => goto_next_parameter, "o" => goto_next_comment, "t" => goto_next_test, "p" => goto_next_paragraph, "space" => add_newline_below, }, "/" => search, "?" => rsearch, "n" => search_next, "N" => search_prev, "*" => search_selection, "u" => undo, "U" => redo, "A-u" => earlier, "A-U" => later, "y" => yank, // yank_all "p" => paste_after, // paste_all "P" => paste_before, "Q" => record_macro, "q" => replay_macro, ">" => indent, "<" => unindent, "=" => format_selections, "J" => join_selections, "K" => keep_selections, "A-K" => remove_selections, "," => keep_primary_selection, "A-," => remove_primary_selection, // "q" => record_macro, // "Q" => replay_macro, "&" => align_selections, "_" => trim_selections, "(" => rotate_selections_backward, ")" => rotate_selections_forward, "A-(" => rotate_selection_contents_backward, "A-)" => rotate_selection_contents_forward, "A-:" => ensure_selections_forward, "esc" => normal_mode, "C-b" | "pageup" => page_up, "C-f" | "pagedown" => page_down, "C-u" => half_page_up, "C-d" => half_page_down, "C-w" => { "Window" "C-w" | "w" => rotate_view, "C-s" | "s" => hsplit, "C-v" | "v" => vsplit, "C-t" | "t" => transpose_view, "f" => goto_file_hsplit, "F" => goto_file_vsplit, "C-q" | "q" => wclose, "C-o" | "o" => wonly, "C-h" | "h" | "left" => jump_view_left, "C-j" | "j" | "down" => jump_view_down, "C-k" | "k" | "up" => jump_view_up, "C-l" | "l" | "right" => jump_view_right, "L" => swap_view_right, "K" => swap_view_up, "H" => swap_view_left, "J" => swap_view_down, "n" => { "New split scratch buffer" "C-s" | "s" => hsplit_new, "C-v" | "v" => vsplit_new, }, }, // move under <space>c "C-c" => toggle_comments, // z family for save/restore/combine from/to sels from register "tab" => jump_forward, // tab == <C-i> "C-o" => jump_backward, "C-s" => save_selection, "space" => { "Space" "f" => file_picker, "F" => file_picker_in_current_directory, "b" => buffer_picker, "j" => jumplist_picker, "s" => symbol_picker, "S" => workspace_symbol_picker, "g" => diagnostics_picker, "G" => workspace_diagnostics_picker, "a" => code_action, "'" => last_picker, "d" => { "Debug (experimental)" sticky=true "l" => dap_launch, "b" => dap_toggle_breakpoint, "c" => dap_continue, "h" => dap_pause, "i" => dap_step_in, "o" => dap_step_out, "n" => dap_next, "v" => dap_variables, "t" => dap_terminate, "C-c" => dap_edit_condition, "C-l" => dap_edit_log, "s" => { "Switch" "t" => dap_switch_thread, "f" => dap_switch_stack_frame, // sl, sb }, "e" => dap_enable_exceptions, "E" => dap_disable_exceptions, }, "w" => { "Window" "C-w" | "w" => rotate_view, "C-s" | "s" => hsplit, "C-v" | "v" => vsplit, "C-t" | "t" => transpose_view, "f" => goto_file_hsplit, "F" => goto_file_vsplit, "C-q" | "q" => wclose, "C-o" | "o" => wonly, "C-h" | "h" | "left" => jump_view_left, "C-j" | "j" | "down" => jump_view_down, "C-k" | "k" | "up" => jump_view_up, "C-l" | "l" | "right" => jump_view_right, "H" => swap_view_left, "J" => swap_view_down, "K" => swap_view_up, "L" => swap_view_right, "n" => { "New split scratch buffer" "C-s" | "s" => hsplit_new, "C-v" | "v" => vsplit_new, }, }, "y" => yank_joined_to_clipboard, "Y" => yank_main_selection_to_clipboard, "p" => paste_clipboard_after, "P" => paste_clipboard_before, "R" => replace_selections_with_clipboard, "/" => global_search, "k" => hover, "r" => rename_symbol, "h" => select_references_to_symbol_under_cursor, "?" => command_palette, }, "z" => { "View" "z" | "c" => align_view_center, "t" => align_view_top, "b" => align_view_bottom, "m" => align_view_middle, "k" | "up" => scroll_up, "j" | "down" => scroll_down, "C-b" | "pageup" => page_up, "C-f" | "pagedown" => page_down, "C-u" | "backspace" => half_page_up, "C-d" | "space" => half_page_down, "/" => search, "?" => rsearch, "n" => search_next, "N" => search_prev, }, "Z" => { "View" sticky=true "z" | "c" => align_view_center, "t" => align_view_top, "b" => align_view_bottom, "m" => align_view_middle, "k" | "up" => scroll_up, "j" | "down" => scroll_down, "C-b" | "pageup" => page_up, "C-f" | "pagedown" => page_down, "C-u" | "backspace" => half_page_up, "C-d" | "space" => half_page_down, "/" => search, "?" => rsearch, "n" => search_next, "N" => search_prev, }, "\"" => select_register, "|" => shell_pipe, "A-|" => shell_pipe_to, "!" => shell_insert_output, "A-!" => shell_append_output, "$" => shell_keep_pipe, "C-z" => suspend, "C-a" => increment, "C-x" => decrement, }); let mut select = normal.clone(); select.merge_nodes(keymap!({ "Select mode" "h" | "left" => extend_char_left, "j" | "down" => extend_line_down, "k" | "up" => extend_line_up, "l" | "right" => extend_char_right, "w" => extend_next_word_start, "b" => extend_prev_word_start, "e" => extend_next_word_end, "W" => extend_next_long_word_start, "B" => extend_prev_long_word_start, "E" => extend_next_long_word_end, "n" => extend_search_next, "N" => extend_search_prev, "t" => extend_till_char, "f" => extend_next_char, "T" => extend_till_prev_char, "F" => extend_prev_char, "home" => extend_to_line_start, "end" => extend_to_line_end, "esc" => exit_select_mode, "v" => normal_mode, })); let insert = keymap!({ "Insert mode" "esc" => normal_mode, "backspace" => delete_char_backward, "C-h" => delete_char_backward, "del" => delete_char_forward, "C-d" => delete_char_forward, "ret" => insert_newline, "C-j" => insert_newline, "tab" => insert_tab, "C-w" => delete_word_backward, "A-backspace" => delete_word_backward, "A-d" => delete_word_forward, "A-del" => delete_word_forward, "C-s" => commit_undo_checkpoint, "left" => move_char_left, "C-b" => move_char_left, "down" => move_line_down, "up" => move_line_up, "right" => move_char_right, "C-f" => move_char_right, "A-b" => move_prev_word_end, "C-left" => move_prev_word_end, "A-f" => move_next_word_start, "C-right" => move_next_word_start, "A-<" => goto_file_start, "A->" => goto_file_end, "pageup" => page_up, "pagedown" => page_down, "home" => goto_line_start, "C-a" => goto_line_start, "end" => goto_line_end_newline, "C-e" => goto_line_end_newline, "C-k" => kill_to_line_end, "C-u" => kill_to_line_start, "C-x" => completion, "C-r" => insert_register, }); hashmap!( Mode::Normal => Keymap::new(normal), Mode::Select => Keymap::new(select), Mode::Insert => Keymap::new(insert), ) }