helix
default keybinds — selection-first modal editing
selection-first: actions act on the current selection, which is also the cursor. press Esc to return to normal mode from anywhere. (LSP) requires a language server, (TS) requires a tree-sitter grammar.
movement (normal mode)
| key | description | command |
|---|---|---|
| h,Left | Move left | move_char_left |
| j,Down | Move down | move_visual_line_down |
| k,Up | Move up | move_visual_line_up |
| l,Right | Move right | move_char_right |
| w | Next word start | move_next_word_start |
| b | Previous word start | move_prev_word_start |
| e | Next word end | move_next_word_end |
| W | Next WORD start | move_next_long_word_start |
| B | Previous WORD start | move_prev_long_word_start |
| E | Next WORD end | move_next_long_word_end |
| f | Find next char (whole doc, not just line) | find_next_char |
| t | Find till next char | find_till_char |
| F | Find previous char | find_prev_char |
| T | Find till previous char | till_prev_char |
| G | Go to line number | goto_line |
| Alt-. | Repeat last motion (f, t, m, [ or ]) | repeat_last_motion |
| Home | Start of line | goto_line_start |
| End | End of line | goto_line_end |
| Ctrl-b,PgUp | Page up | page_up |
| Ctrl-f,PgDn | Page down | page_down |
| Ctrl-u | Cursor + half page up | page_cursor_half_up |
| Ctrl-d | Cursor + half page down | page_cursor_half_down |
| Ctrl-i | Jump forward (jumplist) | jump_forward |
| Ctrl-o | Jump backward (jumplist) | jump_backward |
| Ctrl-s | Save selection to jumplist | save_selection |
changes
| key | description | command |
|---|---|---|
| r | Replace with a character | replace |
| R | Replace with yanked text | replace_with_yanked |
| ~ | Switch case of selection | switch_case |
| ` | Lowercase selection | switch_to_lowercase |
| Alt-` | Uppercase selection | switch_to_uppercase |
| i | Insert before selection | insert_mode |
| a | Insert after selection (append) | append_mode |
| I | Insert at line start | insert_at_line_start |
| A | Insert at line end | insert_at_line_end |
| o | Open line below | open_below |
| O | Open line above | open_above |
| . | Repeat last insert | N/A |
| u | Undo | undo |
| U | Redo | redo |
| Alt-u | Earlier in history | earlier |
| Alt-U | Later in history | later |
| y | Yank selection | yank |
| p | Paste after | paste_after |
| P | Paste before | paste_before |
| " | Select register to yank/paste | select_register |
| > | Indent | indent |
| < | Unindent | unindent |
| = | Format selection (LSP) | format_selections |
| d | Delete selection | delete_selection |
| Alt-d | Delete without yanking | delete_selection_noyank |
| c | Change selection (delete + insert) | change_selection |
| Alt-c | Change without yanking | change_selection_noyank |
| Ctrl-a | Increment number under cursor | increment |
| Ctrl-x | Decrement number under cursor | decrement |
| Q | Start/stop macro recording | record_macro |
| q | Replay recorded macro | replay_macro |
shell
| key | description | command |
|---|---|---|
| | | Pipe each selection through shell, replace with output | shell_pipe |
| Alt-| | Pipe through shell, ignore output | shell_pipe_to |
| ! | Insert shell output before each selection | shell_insert_output |
| Alt-! | Append shell output after each selection | shell_append_output |
| $ | Pipe to shell, keep selections where exit code 0 | shell_keep_pipe |
selection manipulation
| key | description | command |
|---|---|---|
| s | Select all regex matches inside selections | select_regex |
| S | Split selection on regex matches | split_selection |
| Alt-s | Split selection on newlines | split_selection_on_newline |
| Alt-- | Merge selections | merge_selections |
| & | Align selection in columns | align_selections |
| _ | Trim whitespace from selection | trim_selections |
| ; | Collapse selection to single cursor | collapse_selection |
| Alt-; | Flip cursor and anchor | flip_selections |
| , | Keep only primary selection | keep_primary_selection |
| Alt-, | Remove primary selection | remove_primary_selection |
| C | Copy selection to next line (cursor below) | copy_selection_on_next_line |
| Alt-C | Copy selection to prev line (cursor above) | copy_selection_on_prev_line |
| ( | Rotate main selection backward | rotate_selections_backward |
| ) | Rotate main selection forward | rotate_selections_forward |
| % | Select entire file | select_all |
| x | Select current line (extend down if repeated) | extend_line_below |
| X | Extend selection to line bounds | extend_to_line_bounds |
| J | Join lines inside selection | join_selections |
| Ctrl-c | Toggle comment | toggle_comments |
| Alt-o,Alt-Up | Expand to parent syntax node (TS) | expand_selection |
| Alt-i,Alt-Down | Shrink syntax node (TS) | shrink_selection |
| Alt-p,Alt-Left | Previous sibling node (TS) | select_prev_sibling |
| Alt-n,Alt-Right | Next sibling node (TS) | select_next_sibling |
search
operates on the / register by default; use " to pick another.
| key | description | command |
|---|---|---|
| / | Search for regex pattern | search |
| ? | Search for previous pattern | rsearch |
| n | Next search match | search_next |
| N | Previous search match | search_prev |
| * | Use selection as pattern (word-boundary aware) | search_selection_detect_word_boundaries |
| Alt-* | Use selection as pattern | search_selection |
minor modes
| key | description | command |
|---|---|---|
| v | Enter select (extend) mode | select_mode |
| g | Enter goto mode | N/A |
| m | Enter match mode | N/A |
| : | Enter command mode | command_mode |
| z | Enter view mode | N/A |
| Z | Enter sticky view mode | N/A |
| Ctrl-w | Enter window mode | N/A |
| Space | Enter space mode | N/A |
view mode (z)
scroll/view adjustments without moving the selection. Z is the sticky variant (Esc to exit).
| key | description | command |
|---|---|---|
| z,c | Vertically center the line | align_view_center |
| t | Align line to top of screen | align_view_top |
| b | Align line to bottom of screen | align_view_bottom |
| m | Align line to middle (horizontal) | align_view_middle |
| j,down | Scroll view downwards | scroll_down |
| k,up | Scroll view upwards | scroll_up |
| Ctrl-f | Page down | page_down |
| Ctrl-b | Page up | page_up |
goto mode (g)
| key | description | command |
|---|---|---|
| g | Go to line number, else start of file | goto_file_start |
| e | End of file | goto_last_line |
| f | Go to files in selections | goto_file |
| h | Start of line | goto_line_start |
| l | End of line | goto_line_end |
| s | First non-whitespace char of line | goto_first_nonwhitespace |
| t | Top of the screen | goto_window_top |
| c | Middle of the screen | goto_window_center |
| b | Bottom of the screen | goto_window_bottom |
| d | Go to definition (LSP) | goto_definition |
| y | Go to type definition (LSP) | goto_type_definition |
| r | Go to references (LSP) | goto_reference |
| i | Go to implementation (LSP) | goto_implementation |
| a | Last accessed (alternate) file | goto_last_accessed_file |
| m | Last modified (alternate) file | goto_last_modified_file |
| n | Next buffer | goto_next_buffer |
| p | Previous buffer | goto_previous_buffer |
| . | Last modification in current file | goto_last_modification |
| w | Label every word; jump to label | goto_word |
match mode (m)
surround and textobject operations take an argument (e.g. m s ().
| key | description | command |
|---|---|---|
| m | Go to matching bracket (TS) | match_brackets |
| s <ch> | Surround current selection with <ch> | surround_add |
| r <a> <b> | Replace surround <a> with <b> | surround_replace |
| d <ch> | Delete surround <ch> | surround_delete |
| a <obj> | Select around textobject | select_textobject_around |
| i <obj> | Select inside textobject | select_textobject_inner |
window mode (Ctrl-w)
| key | description | command |
|---|---|---|
| w,Ctrl-w | Switch to next window | rotate_view |
| v,Ctrl-v | Vertical right split | vsplit |
| s,Ctrl-s | Horizontal bottom split | hsplit |
| h,Ctrl-h,Left | Move to left split | jump_view_left |
| j,Ctrl-j,Down | Move to split below | jump_view_down |
| k,Ctrl-k,Up | Move to split above | jump_view_up |
| l,Ctrl-l,Right | Move to right split | jump_view_right |
| q,Ctrl-q | Close current window | wclose |
| o,Ctrl-o | Close all windows but this one | wonly |
| H | Swap window to the left | swap_view_left |
| J | Swap window downwards | swap_view_down |
| K | Swap window upwards | swap_view_up |
| L | Swap window to the right | swap_view_right |
space mode (Space)
mostly pickers and LSP actions (a kludge layer).
| key | description | command |
|---|---|---|
| f | File picker (workspace root) | file_picker |
| F | File picker (current working dir) | file_picker_in_current_directory |
| b | Buffer picker | buffer_picker |
| j | Jumplist picker | jumplist_picker |
| k | Hover documentation (LSP) | hover |
| s | Document symbol picker (LSP) | symbol_picker |
| S | Workspace symbol picker (LSP) | workspace_symbol_picker |
| d | Document diagnostics (LSP) | diagnostics_picker |
| D | Workspace diagnostics (LSP) | workspace_diagnostics_picker |
| r | Rename symbol (LSP) | rename_symbol |
| a | Apply code action (LSP) | code_action |
| w | Enter window mode | N/A |
| c | Toggle comment | toggle_comments |
| y | Yank to clipboard | yank_to_clipboard |
| p | Paste clipboard after | paste_clipboard_after |
| P | Paste clipboard before | paste_clipboard_before |
| ' | Open last fuzzy picker | last_picker |
insert mode
minimal by design — changes are only checkpointed for undo on return to normal mode.
| key | description | command |
|---|---|---|
| Esc | Switch to normal mode | normal_mode |
| Ctrl-s | Commit undo checkpoint | commit_undo_checkpoint |
| Ctrl-x | Autocomplete | completion |
| Ctrl-r | Insert register content | insert_register |
| Ctrl-w,Alt-Bksp | Delete previous word | delete_word_backward |
| Alt-d | Delete next word | delete_word_forward |
| Ctrl-u | Delete to start of line | kill_to_line_start |
| Ctrl-k | Delete to end of line | kill_to_line_end |
| Ctrl-h | Delete previous char | delete_char_backward |
| Ctrl-d | Delete next char | delete_char_forward |
picker & prompt
navigation within the fuzzy picker (and the : command prompt).
| key | description | command |
|---|---|---|
| Up,Ctrl-p | Previous item | focus_previous |
| Down,Ctrl-n | Next item | focus_next |
| Ctrl-u | Scroll preview up | scroll_up |
| Ctrl-d | Scroll preview down | scroll_down |
| Enter | Confirm selection | select_input |
| Esc,Ctrl-c | Cancel | close |
| Ctrl-h | Delete previous char | delete_char_backward |
| Ctrl-w | Delete previous word | delete_word_backward |
| Ctrl-r | Insert register content | insert_register |