Keymap
These tables list the built-in bindings. To change them, see Key remapping.
<space> means Space, <ret> means Enter, <esc> means Escape,
<C-x> means Ctrl-x, and <A-x> means Alt-x. Adjacent keys form a
sequence: <space>f means press Space, then f.
Some terminals intercept keys before Mitos receives them; check your terminal
settings if a binding does not work.
Language-server commands require an active server, and syntax-aware commands require a tree-sitter grammar and the relevant queries for the file type.
Normal mode
Normal mode is the default when Mitos starts. Press Escape to return to it.
Type a number before a command to give it a count, for example 42G to go
to line 42. Unlike Vim, f, F, t, and T can cross line boundaries.
See Selections for building and transforming selections,
Search and replacement for search, and
Shell commands for filtering text. Search commands use the /
register by default; select another register with "<char>.
Minor modes
Prefix keys open groups of commands. Most return to normal mode after a command; sticky groups stay open until Escape. See remapping minor modes.
zscrolls and positions the view;Zopens its sticky variant.gjumps to locations.mworks with surround and textobjects.- Backtick opens case conversions for each selection. Formats such as
snake_casetreat punctuation and whitespace as word separators. Ctrl-wmanages split views.Space xopens debugging commands;Space Xkeeps that group active.- Space opens pickers and project tools.
Space 'reopens global search. [and]move to previous and next items, including syntax textobjects.
Bindings
| Key | Description | Command |
|---|---|---|
h | Move left | move_char_left |
<left> | Move left | move_char_left |
j | Move down | move_visual_line_down |
<down> | Move down | move_visual_line_down |
k | Move up | move_visual_line_up |
<up> | Move up | move_visual_line_up |
l | Move right | move_char_right |
<right> | Move right | move_char_right |
t | Move till next occurrence of char | find_till_next_char |
f | Move to next occurrence of char | find_next_char |
T | Move till previous occurrence of char | find_till_previous_char |
F | Move to previous occurrence of char | find_previous_char |
r | Replace each selected grapheme with a character | replace_char |
<A-r> | Replace selections with entered text | replace |
R | Replace with yanked text | replace_with_yanked |
<A-.> | Repeat last motion | repeat_last_motion |
~ | Switch (toggle) case | switch_case |
` | Case | Prefix |
<A-`> | Switch to uppercase | switch_to_uppercase |
<home> | Go to line start | goto_line_start |
<end> | Go to line end | goto_line_end |
w | Move to start of next word | move_next_word_start |
b | Move to start of previous word | move_previous_word_start |
e | Move to end of next word | move_next_word_end |
W | Move to start of next long word | move_next_long_word_start |
B | Move to start of previous long word | move_previous_long_word_start |
E | Move to end of next long word | move_next_long_word_end |
v | Enter selection extend mode | select_mode |
G | Go to line | goto_line |
g | Goto | Prefix |
: | Enter command mode | command_mode |
<A-q> | Add current location to quicklist | add_to_quicklist |
i | Insert before selection | insert_mode |
I | Insert at start of line | insert_at_line_start |
a | Append after selection | append_mode |
A | Insert at end of line | insert_at_line_end |
o | Open new line below selection | open_below |
O | Open new line above selection | open_above |
d | Delete selection | delete_selection |
<A-d> | Delete selection without yanking | delete_selection_noyank |
<ret> | Jump from a diff review to its source location | vcs_diff_open_source |
c | Change selection | change_selection |
<A-c> | Change selection without yanking | change_selection_noyank |
C | Copy selection on next line | copy_selection_on_next_line |
<A-C> | Copy selection on previous line | copy_selection_on_previous_line |
s | Select all regex matches inside selections | select_regex |
<A-s> | Split selection on newlines | split_selection_on_newline |
<A-minus> | Merge selections | merge_selections |
<A-_> | Merge consecutive selections | merge_consecutive_selections |
S | Split selections on regex matches | split_selection |
; | Collapse selection into single cursor | collapse_selection |
<A-;> | Flip selection cursor and anchor | flip_selections |
<A-o> | Expand selection to enclosing structure | expand_selection |
<A-up> | Expand selection to enclosing structure | expand_selection |
<A-i> | Shrink selection to previously expanded structure | shrink_selection |
<A-down> | Shrink selection to previously expanded structure | shrink_selection |
<A-I> | Select all children of the current node | select_all_children |
<S-A-down> | Select all children of the current node | select_all_children |
<A-p> | Select previous sibling in the syntax tree | select_previous_sibling |
<A-left> | Select previous sibling in the syntax tree | select_previous_sibling |
<A-n> | Select next sibling in the syntax tree | select_next_sibling |
<A-right> | Select next sibling in the syntax tree | select_next_sibling |
<A-e> | Move to end of the parent node | move_parent_node_end |
<A-b> | Move to beginning of the parent node | move_parent_node_start |
<A-a> | Select all siblings of the current node | select_all_siblings |
% | Select whole document | select_all |
x | Select current line, if already selected, extend to next line | extend_line_below |
X | Extend selection to line bounds | extend_to_line_bounds |
<A-x> | Shrink selection to line bounds | shrink_to_line_bounds |
m | Match | Prefix |
[ | Left bracket | Prefix |
] | Right bracket | Prefix |
/ | Search forward for regex pattern | search_forward |
? | Search backward for regex pattern | search_backward |
n | Select next search match | search_next |
N | Select previous search match | search_previous |
* | Use current selection as the search pattern, automatically wrapping with \b on word boundaries | search_selection_detect_word_boundaries |
<A-*> | Use current selection as search pattern | search_selection |
u | Undo change | undo |
U | Redo change | redo |
<A-u> | Go to previous selection | undo_selection |
<A-U> | Go to next selection | redo_selection |
y | Yank selection | yank |
p | Paste after selection | paste_after |
P | Paste before selection | paste_before |
Q | Record macro | record_macro |
q | Replay macro | replay_macro |
<gt> | Indent selection | indent |
<lt> | Unindent selection | unindent |
= | Format selection | format_selections |
J | Join lines inside selection | join_lines |
<A-J> | Join lines inside selection and select spaces | join_lines_and_select_spaces |
K | Keep selections matching regex | keep_selections |
<A-K> | Remove selections matching regex | remove_selections |
, | Keep primary selection | keep_primary_selection |
<A-,> | Remove primary selection | remove_primary_selection |
& | Align selections in column | align_selections |
_ | Trim whitespace from selections | trim_selections |
( | Make the previous selection primary | cycle_primary_selection_backward |
) | Make the next selection primary | cycle_primary_selection_forward |
<A-(> | Rotate selections contents backward | rotate_selection_contents_backward |
<A-)> | Rotate selection contents forward | rotate_selection_contents_forward |
<A-:> | Ensure all selections face forward | ensure_selections_forward |
<esc> | Enter normal mode | normal_mode |
<C-b> | Move page up | page_up |
<pageup> | Move page up | page_up |
<C-e> | Switch focus between editor and file explorer sidebar | switch_sidebar_focus |
<C-f> | Move page down | page_down |
<pagedown> | Move page down | page_down |
<C-u> | Move page and cursor half up | page_cursor_half_up |
<C-d> | Move page and cursor half down | page_cursor_half_down |
<C-k> | Move current line selection up | move_lines_up |
<C-j> | Move current line selection down | move_lines_down |
<C-w> | Window | Prefix |
<C-c> | Comment/uncomment selections | toggle_comments |
<C-i> | Jump forward on jumplist | jump_forward |
<tab> | Jump forward on jumplist | jump_forward |
<C-o> | Jump backward on jumplist | jump_backward |
<C-s> | Record current selections in the jumplist | save_selection |
<space> | Space | Prefix |
z | View | Prefix |
Z | View (sticky; Escape to exit) | Prefix |
" | Select register | select_register |
| | Pipe selections through shell command | shell_pipe |
<A-|> | Pipe selections into shell command ignoring output | shell_pipe_to |
! | Insert shell command output before selections | shell_insert_output |
<A-!> | Append shell command output after selections | shell_append_output |
$ | Filter selections with shell predicate | shell_keep_pipe |
<C-z> | Suspend and return to shell | suspend |
<C-a> | Increment item under cursor | increment |
<C-x> | Decrement item under cursor | decrement |
` — Case
| Key | Description | Command |
|---|---|---|
`a | Switch (toggle) case | switch_case |
`l | Switch to lowercase | switch_to_lowercase |
`u | Switch to uppercase | switch_to_uppercase |
`c | Switch to lowerCamelCase | switch_to_lower_camel_case |
`p | Switch to UpperCamelCase | switch_to_upper_camel_case |
`s | Switch to snake_case | switch_to_snake_case |
`S | Switch to SHOUTY_SNAKE_CASE | switch_to_shouty_snake_case |
`k | Switch to kebab-case | switch_to_kebab_case |
`K | Switch to SHOUTY-KEBAB-CASE | switch_to_shouty_kebab_case |
`t | Switch to Title Case | switch_to_title_case |
`T | Switch to Train-Case | switch_to_train_case |
g — Goto
| Key | Description | Command |
|---|---|---|
gg | Go to line number <n> else file start | goto_file_start |
g| | Go to column | goto_column |
ge | Go to last line | goto_last_line |
gf | Go to files/URLs in selections | goto_file |
gh | Go to line start | goto_line_start |
gl | Go to line end | goto_line_end |
gs | Go to first non-blank in line | goto_first_nonwhitespace |
gd | Go to definition | goto_definition |
gD | Go to declaration | goto_declaration |
gy | Go to type definition | goto_type_definition |
gr | Go to references | goto_reference |
gi | Go to implementation | goto_implementation |
gt | Go to window top | goto_window_top |
gc | Go to window center | goto_window_center |
gb | Go to window bottom | goto_window_bottom |
ga | Go to last accessed file | goto_last_accessed_file |
gm | Go to last modified file | goto_last_modified_file |
gn | Go to next buffer | goto_next_buffer |
gp | Go to previous buffer | goto_previous_buffer |
gk | Move up | move_line_up |
gj | Move down | move_line_down |
g. | Go to last modification | goto_last_modification |
g<minus> | Move backward in history | earlier |
g+ | Move forward in history | later |
gw | Jump to a two-character label | goto_word |
m — Match
| Key | Description | Command |
|---|---|---|
mm | Go to matching bracket | match_brackets |
ms | Surround add | surround_add |
mr | Surround replace | surround_replace |
md | Surround delete | surround_delete |
ma | Select around object | select_textobject_around |
mi | Select inside object | select_textobject_inner |
mA | Select all textobjects around selections | select_all_textobjects_around |
mI | Select all textobjects inside selections | select_all_textobjects_inner |
[ — Left bracket
| Key | Description | Command |
|---|---|---|
[d | Go to previous diagnostic | goto_previous_diagnostic |
[s | Go to previous spelling finding | goto_previous_spelling |
[q | Go to previous quicklist entry | goto_previous_quicklist |
[D | Go to first diagnostic | goto_first_diagnostic |
[g | Go to previous change | vcs_goto_previous_change |
[m | Go to the previous unresolved conflict | vcs_goto_previous_conflict |
[G | Go to first change | vcs_goto_first_change |
[l | Go to previous quicklist entry in current file | goto_previous_file_quicklist |
[f | Go to previous function | goto_previous_function |
[t | Go to previous type definition | goto_previous_class |
[a | Go to previous parameter | goto_previous_parameter |
[c | Go to previous comment | goto_previous_comment |
[e | Go to previous pairing | goto_previous_entry |
[T | Go to previous test | goto_previous_test |
[p | Go to previous paragraph | goto_previous_paragraph |
[x | Go to previous (X)HTML element | goto_previous_xml_element |
[<space> | Add newline above | add_newline_above |
] — Right bracket
| Key | Description | Command |
|---|---|---|
]d | Go to next diagnostic | goto_next_diagnostic |
]s | Go to next spelling finding | goto_next_spelling |
]q | Go to next quicklist entry | goto_next_quicklist |
]D | Go to last diagnostic | goto_last_diagnostic |
]g | Go to next change | vcs_goto_next_change |
]m | Go to the next unresolved conflict | vcs_goto_next_conflict |
]G | Go to last change | vcs_goto_last_change |
]l | Go to next quicklist entry in current file | goto_next_file_quicklist |
]f | Go to next function | goto_next_function |
]t | Go to next type definition | goto_next_class |
]a | Go to next parameter | goto_next_parameter |
]c | Go to next comment | goto_next_comment |
]e | Go to next pairing | goto_next_entry |
]T | Go to next test | goto_next_test |
]p | Go to next paragraph | goto_next_paragraph |
]x | Go to next (X)HTML element | goto_next_xml_element |
]<space> | Add newline below | add_newline_below |
<C-w> — Window
| Key | Description | Command |
|---|---|---|
<C-w>b | Toggle file explorer sidebar | toggle_sidebar |
<C-w>e | Open and focus file explorer sidebar | focus_sidebar |
<C-w><C-w> | Go to next window | rotate_view |
<C-w>w | Go to next window | rotate_view |
<C-w>W | Go to previous window | rotate_view_reverse |
<C-w><C-s> | Horizontal bottom split | split_horizontal |
<C-w>s | Horizontal bottom split | split_horizontal |
<C-w><C-v> | Vertical right split | split_vertical |
<C-w>v | Vertical right split | split_vertical |
<C-w><C-t> | Transpose splits | transpose_view |
<C-w>t | Transpose splits | transpose_view |
<C-w>r | Resize windows (Enter to confirm, Escape to cancel) | resize_mode |
<C-w>= | Make all splits the same size | equalize_views |
<C-w>f | Open files in selections in a horizontal split | goto_file_in_horizontal_split |
<C-w>F | Open files in selections in a vertical split | goto_file_in_vertical_split |
<C-w><C-q> | Close current view | close_view |
<C-w>q | Close current view | close_view |
<C-w><C-o> | Close views except current | close_other_views |
<C-w>o | Close views except current | close_other_views |
<C-w><C-h> | Jump to left split | jump_view_left |
<C-w>h | Jump to left split | jump_view_left |
<C-w><left> | Jump to left split | jump_view_left |
<C-w><C-j> | Jump to split below | jump_view_down |
<C-w>j | Jump to split below | jump_view_down |
<C-w><down> | Jump to split below | jump_view_down |
<C-w><C-k> | Jump to split above | jump_view_up |
<C-w>k | Jump to split above | jump_view_up |
<C-w><up> | Jump to split above | jump_view_up |
<C-w><C-l> | Jump to right split | jump_view_right |
<C-w>l | Jump to right split | jump_view_right |
<C-w><right> | Jump to right split | jump_view_right |
<C-w>L | Swap with right split | swap_view_right |
<C-w><S-right> | Swap with right split | swap_view_right |
<C-w>K | Swap with split above | swap_view_up |
<C-w><S-up> | Swap with split above | swap_view_up |
<C-w>H | Swap with left split | swap_view_left |
<C-w><S-left> | Swap with left split | swap_view_left |
<C-w>J | Swap with split below | swap_view_down |
<C-w><S-down> | Swap with split below | swap_view_down |
<C-w>n | New split scratch buffer | Prefix |
<C-w>n — New split scratch buffer
| Key | Description | Command |
|---|---|---|
<C-w>n<C-s> | Horizontal bottom split scratch buffer | split_horizontal_new |
<C-w>ns | Horizontal bottom split scratch buffer | split_horizontal_new |
<C-w>n<C-v> | Vertical right split scratch buffer | split_vertical_new |
<C-w>nv | Vertical right split scratch buffer | split_vertical_new |
<space> — Space
| Key | Description | Command |
|---|---|---|
<space>f | Open file picker | file_picker |
<space>F | Open file picker at current buffer’s directory | file_picker_in_current_buffer_directory |
<space>e | Open file explorer in workspace root | file_explorer |
<space>E | Open file explorer at current buffer’s directory | file_explorer_in_current_buffer_directory |
<space>b | Open buffer picker | buffer_picker |
<space>j | Open jumplist picker | jumplist_picker |
<space>q | Open quicklist picker | quicklist_picker |
<space>s | Open symbol picker from LSP or syntax information | lsp_or_syntax_symbol_picker |
<space>S | Open workspace symbol picker from LSP or syntax information | lsp_or_syntax_workspace_symbol_picker |
<space>d | Open diagnostic picker | diagnostics_picker |
<space>D | Open workspace diagnostic picker | workspace_diagnostics_picker |
<space>g | Version control | Prefix |
<space>a | Perform code action | code_action |
<space>l | Show code lenses under cursor | show_code_lenses_under_cursor |
<space>' | Open last picker | last_picker |
<space>x | Debug | Prefix |
<space>X | Debug (sticky; Escape to exit) | Prefix |
<space>w | Window | Prefix |
<space>y | Yank selections to clipboard | yank_to_clipboard |
<space>Y | Yank primary selection to clipboard | yank_primary_selection_to_clipboard |
<space>p | Paste clipboard after selections | paste_clipboard_after |
<space>P | Paste clipboard before selections | paste_clipboard_before |
<space>R | Replace selections by clipboard content | replace_selections_with_clipboard |
<space>/ | Search text in the current working directory | search_picker_in_current_working_directory |
<space>k | Show docs for item under cursor | hover |
<space>K | Show docs for item under cursor in a new buffer | goto_hover |
<space>r | Rename symbol | rename_symbol |
<space>h | Select symbol references | select_references_to_symbol_under_cursor |
<space>c | Comment/uncomment selections | toggle_comments |
<space>C | Block comment/uncomment selections | toggle_block_comments |
<space><A-c> | Line comment/uncomment selections | toggle_line_comments |
<space>? | Open command palette | command_palette |
<space>g — Version control
| Key | Description | Command |
|---|---|---|
<space>gs | Browse changed files | vcs_changed_file_picker |
<space>gd | Show file diff | vcs_diff |
<space>gf | Browse file history | vcs_file_history_picker |
<space>gl | Browse commits | vcs_history_picker |
<space>gb | Show line blame | vcs_blame_line |
<space>gi | Show hunk diff | vcs_show_change |
<space>gt | Toggle inline blame | vcs_toggle_inline_blame |
<space>gS | Browse stashes | vcs_stash_picker |
<space>x — Debug
| Key | Description | Command |
|---|---|---|
<space>xl | Choose a launch configuration and start debugging | debug_launch_picker |
<space>xr | Restart debugging session | debug_restart |
<space>xb | Toggle breakpoints | debug_toggle_breakpoints |
<space>xc | Continue program execution | debug_continue |
<space>xh | Pause program execution | debug_pause |
<space>xi | Step in | debug_step_in |
<space>xo | Step out | debug_step_out |
<space>xn | Step over the current statement | debug_step_over |
<space>xv | Browse variables | debug_variables |
<space>xt | End debug session | debug_terminate |
<space>xB | Breakpoint settings | Prefix |
<space>xs | Switch | Prefix |
<space>xe | Enable exception breakpoints | debug_enable_exception_breakpoints |
<space>xE | Disable exception breakpoints | debug_disable_exception_breakpoints |
<space>xB — Breakpoint settings
| Key | Description | Command |
|---|---|---|
<space>xBc | Edit breakpoint condition on current line | debug_edit_breakpoint_condition |
<space>xBl | Edit breakpoint log message on current line | debug_edit_breakpoint_log_message |
<space>xs — Switch
| Key | Description | Command |
|---|---|---|
<space>xss | Open debug session picker | debug_session_picker |
<space>xst | Choose the current debug thread | debug_thread_picker |
<space>xsf | Open debug stack frame picker | debug_stack_frame_picker |
<space>X — Debug
| Key | Description | Command |
|---|---|---|
<space>Xl | Choose a launch configuration and start debugging | debug_launch_picker |
<space>Xr | Restart debugging session | debug_restart |
<space>Xb | Toggle breakpoints | debug_toggle_breakpoints |
<space>Xc | Continue program execution | debug_continue |
<space>Xh | Pause program execution | debug_pause |
<space>Xi | Step in | debug_step_in |
<space>Xo | Step out | debug_step_out |
<space>Xn | Step over the current statement | debug_step_over |
<space>Xv | Browse variables | debug_variables |
<space>Xt | End debug session | debug_terminate |
<space>XB | Breakpoint settings | Prefix |
<space>Xs | Switch | Prefix |
<space>Xe | Enable exception breakpoints | debug_enable_exception_breakpoints |
<space>XE | Disable exception breakpoints | debug_disable_exception_breakpoints |
<space>XB — Breakpoint settings
| Key | Description | Command |
|---|---|---|
<space>XBc | Edit breakpoint condition on current line | debug_edit_breakpoint_condition |
<space>XBl | Edit breakpoint log message on current line | debug_edit_breakpoint_log_message |
<space>Xs — Switch
| Key | Description | Command |
|---|---|---|
<space>Xss | Open debug session picker | debug_session_picker |
<space>Xst | Choose the current debug thread | debug_thread_picker |
<space>Xsf | Open debug stack frame picker | debug_stack_frame_picker |
<space>w — Window
| Key | Description | Command |
|---|---|---|
<space>wb | Toggle file explorer sidebar | toggle_sidebar |
<space>we | Open and focus file explorer sidebar | focus_sidebar |
<space>w<C-w> | Go to next window | rotate_view |
<space>ww | Go to next window | rotate_view |
<space>wW | Go to previous window | rotate_view_reverse |
<space>w<C-s> | Horizontal bottom split | split_horizontal |
<space>ws | Horizontal bottom split | split_horizontal |
<space>w<C-v> | Vertical right split | split_vertical |
<space>wv | Vertical right split | split_vertical |
<space>w<C-t> | Transpose splits | transpose_view |
<space>wt | Transpose splits | transpose_view |
<space>wr | Resize windows (Enter to confirm, Escape to cancel) | resize_mode |
<space>w= | Make all splits the same size | equalize_views |
<space>wf | Open files in selections in a horizontal split | goto_file_in_horizontal_split |
<space>wF | Open files in selections in a vertical split | goto_file_in_vertical_split |
<space>w<C-q> | Close current view | close_view |
<space>wq | Close current view | close_view |
<space>w<C-o> | Close views except current | close_other_views |
<space>wo | Close views except current | close_other_views |
<space>w<C-h> | Jump to left split | jump_view_left |
<space>wh | Jump to left split | jump_view_left |
<space>w<left> | Jump to left split | jump_view_left |
<space>w<C-j> | Jump to split below | jump_view_down |
<space>wj | Jump to split below | jump_view_down |
<space>w<down> | Jump to split below | jump_view_down |
<space>w<C-k> | Jump to split above | jump_view_up |
<space>wk | Jump to split above | jump_view_up |
<space>w<up> | Jump to split above | jump_view_up |
<space>w<C-l> | Jump to right split | jump_view_right |
<space>wl | Jump to right split | jump_view_right |
<space>w<right> | Jump to right split | jump_view_right |
<space>wL | Swap with right split | swap_view_right |
<space>w<S-right> | Swap with right split | swap_view_right |
<space>wK | Swap with split above | swap_view_up |
<space>w<S-up> | Swap with split above | swap_view_up |
<space>wH | Swap with left split | swap_view_left |
<space>w<S-left> | Swap with left split | swap_view_left |
<space>wJ | Swap with split below | swap_view_down |
<space>w<S-down> | Swap with split below | swap_view_down |
<space>wn | New split scratch buffer | Prefix |
<space>wn — New split scratch buffer
| Key | Description | Command |
|---|---|---|
<space>wn<C-s> | Horizontal bottom split scratch buffer | split_horizontal_new |
<space>wns | Horizontal bottom split scratch buffer | split_horizontal_new |
<space>wn<C-v> | Vertical right split scratch buffer | split_vertical_new |
<space>wnv | Vertical right split scratch buffer | split_vertical_new |
z — View
| Key | Description | Command |
|---|---|---|
zc | Close the innermost fold | fold_close |
zo | Open the fold at each cursor | fold_open |
za | Toggle the fold at each cursor | fold_toggle |
zf | Fold selected lines | fold_selection |
zC | Close all folds | fold_all |
zO | Open all folds | unfold_all |
zA | Open all folds if any are closed, otherwise close all folds | fold_toggle_all |
zz | Scroll vertically to center the primary cursor | center_view_vertically |
zt | Align view top | align_view_top |
zb | Align view bottom | align_view_bottom |
zm | Scroll horizontally to center the primary cursor | center_view_horizontally |
zk | Scroll view up | scroll_up |
z<up> | Scroll view up | scroll_up |
zj | Scroll view down | scroll_down |
z<down> | Scroll view down | scroll_down |
z<C-b> | Move page up | page_up |
z<pageup> | Move page up | page_up |
z<C-f> | Move page down | page_down |
z<pagedown> | Move page down | page_down |
z<C-u> | Move page and cursor half up | page_cursor_half_up |
z<backspace> | Move page and cursor half up | page_cursor_half_up |
z<C-d> | Move page and cursor half down | page_cursor_half_down |
z<space> | Move page and cursor half down | page_cursor_half_down |
z/ | Search forward for regex pattern | search_forward |
z? | Search backward for regex pattern | search_backward |
zn | Select next search match | search_next |
zN | Select previous search match | search_previous |
Z — View
| Key | Description | Command |
|---|---|---|
Zc | Close the innermost fold | fold_close |
Zo | Open the fold at each cursor | fold_open |
Za | Toggle the fold at each cursor | fold_toggle |
Zf | Fold selected lines | fold_selection |
ZC | Close all folds | fold_all |
ZO | Open all folds | unfold_all |
ZA | Open all folds if any are closed, otherwise close all folds | fold_toggle_all |
Zz | Scroll vertically to center the primary cursor | center_view_vertically |
Zt | Align view top | align_view_top |
Zb | Align view bottom | align_view_bottom |
Zm | Scroll horizontally to center the primary cursor | center_view_horizontally |
Zk | Scroll view up | scroll_up |
Z<up> | Scroll view up | scroll_up |
Zj | Scroll view down | scroll_down |
Z<down> | Scroll view down | scroll_down |
Z<C-b> | Move page up | page_up |
Z<pageup> | Move page up | page_up |
Z<C-f> | Move page down | page_down |
Z<pagedown> | Move page down | page_down |
Z<C-u> | Move page and cursor half up | page_cursor_half_up |
Z<backspace> | Move page and cursor half up | page_cursor_half_up |
Z<C-d> | Move page and cursor half down | page_cursor_half_down |
Z<space> | Move page and cursor half down | page_cursor_half_down |
Z/ | Search forward for regex pattern | search_forward |
Z? | Search backward for regex pattern | search_backward |
Zn | Select next search match | search_next |
ZN | Select previous search match | search_previous |
Insert mode
Press i in normal mode to enter insert mode. An insert session normally
forms one undo step when you return to normal mode. Ctrl-s starts another
undo step without leaving insert mode; see Macros and undo.
Tab uses smart tab. To disable a binding, map
it to no_op in [keys.insert].
| Key | Description | Command |
|---|---|---|
<esc> | Enter normal mode | normal_mode |
<C-s> | Start a new undo step without leaving insert mode | commit_undo_checkpoint |
<C-x> | Invoke completion popup | completion |
<C-r> | Insert register | insert_register |
<C-w> | Delete previous word | delete_word_backward |
<A-backspace> | Delete previous word | delete_word_backward |
<A-d> | Delete next word | delete_word_forward |
<A-del> | Delete next word | delete_word_forward |
<C-u> | Delete till start of line | kill_to_line_start |
<C-k> | Delete till end of line | kill_to_line_end |
<C-h> | Delete previous char | delete_char_backward |
<backspace> | Delete previous char | delete_char_backward |
<S-backspace> | Delete previous char | delete_char_backward |
<C-d> | Delete next char | delete_char_forward |
<del> | Delete next char | delete_char_forward |
<C-j> | Insert newline char | insert_newline |
<ret> | Insert newline char | insert_newline |
<tab> | Insert tab if all cursors have all whitespace to their left; otherwise, run a separate command. | smart_tab |
<S-tab> | Insert tab char | insert_tab |
<up> | Move up | move_visual_line_up |
<down> | Move down | move_visual_line_down |
<left> | Move left | move_char_left |
<right> | Move right | move_char_right |
<pageup> | Move page up | page_up |
<pagedown> | Move page down | page_down |
<home> | Go to line start | goto_line_start |
<end> | Go to newline at line end | goto_line_end_newline |
Select / extend mode
Press v in normal mode to enter select mode. Motions extend selections
rather than replace them; vgl, for example, extends to the end of the line.
Searching with n or N keeps the current selection and adds the next match.
| Key | Description | Command |
|---|---|---|
h | Extend left | extend_char_left |
<left> | Extend left | extend_char_left |
j | Extend down | extend_visual_line_down |
<down> | Extend down | extend_visual_line_down |
k | Extend up | extend_visual_line_up |
<up> | Extend up | extend_visual_line_up |
l | Extend right | extend_char_right |
<right> | Extend right | extend_char_right |
t | Extend till next occurrence of char | extend_till_next_char |
f | Extend to next occurrence of char | extend_next_char |
T | Extend till previous occurrence of char | extend_till_previous_char |
F | Extend to previous occurrence of char | extend_previous_char |
r | Replace each selected grapheme with a character | replace_char |
<A-r> | Replace selections with entered text | replace |
R | Replace with yanked text | replace_with_yanked |
<A-.> | Repeat last motion | repeat_last_motion |
~ | Switch (toggle) case | switch_case |
` | Case | Prefix |
<A-`> | Switch to uppercase | switch_to_uppercase |
<home> | Extend to line start | extend_to_line_start |
<end> | Extend to line end | extend_to_line_end |
w | Extend to start of next word | extend_next_word_start |
b | Extend to start of previous word | extend_previous_word_start |
e | Extend to end of next word | extend_next_word_end |
W | Extend to start of next long word | extend_next_long_word_start |
B | Extend to start of previous long word | extend_previous_long_word_start |
E | Extend to end of next long word | extend_next_long_word_end |
v | Enter normal mode | normal_mode |
G | Go to line | goto_line |
g | Goto | Prefix |
: | Enter command mode | command_mode |
<A-q> | Add current location to quicklist | add_to_quicklist |
i | Insert before selection | insert_mode |
I | Insert at start of line | insert_at_line_start |
a | Append after selection | append_mode |
A | Insert at end of line | insert_at_line_end |
o | Open new line below selection | open_below |
O | Open new line above selection | open_above |
d | Delete selection | delete_selection |
<A-d> | Delete selection without yanking | delete_selection_noyank |
<ret> | Jump from a diff review to its source location | vcs_diff_open_source |
c | Change selection | change_selection |
<A-c> | Change selection without yanking | change_selection_noyank |
C | Copy selection on next line | copy_selection_on_next_line |
<A-C> | Copy selection on previous line | copy_selection_on_previous_line |
s | Select all regex matches inside selections | select_regex |
<A-s> | Split selection on newlines | split_selection_on_newline |
<A-minus> | Merge selections | merge_selections |
<A-_> | Merge consecutive selections | merge_consecutive_selections |
S | Split selections on regex matches | split_selection |
; | Collapse selection into single cursor | collapse_selection |
<A-;> | Flip selection cursor and anchor | flip_selections |
<A-o> | Expand selection to enclosing structure | expand_selection |
<A-up> | Expand selection to enclosing structure | expand_selection |
<A-i> | Shrink selection to previously expanded structure | shrink_selection |
<A-down> | Shrink selection to previously expanded structure | shrink_selection |
<A-I> | Select all children of the current node | select_all_children |
<S-A-down> | Select all children of the current node | select_all_children |
<A-p> | Select previous sibling in the syntax tree | select_previous_sibling |
<A-left> | Select previous sibling in the syntax tree | select_previous_sibling |
<A-n> | Select next sibling in the syntax tree | select_next_sibling |
<A-right> | Select next sibling in the syntax tree | select_next_sibling |
<A-e> | Extend to end of the parent node | extend_parent_node_end |
<A-b> | Extend to beginning of the parent node | extend_parent_node_start |
<A-a> | Select all siblings of the current node | select_all_siblings |
% | Select whole document | select_all |
x | Select current line, if already selected, extend to next line | extend_line_below |
X | Extend selection to line bounds | extend_to_line_bounds |
<A-x> | Shrink selection to line bounds | shrink_to_line_bounds |
m | Match | Prefix |
[ | Left bracket | Prefix |
] | Right bracket | Prefix |
/ | Search forward for regex pattern | search_forward |
? | Search backward for regex pattern | search_backward |
n | Add next search match to selection | extend_search_next |
N | Add previous search match to selection | extend_search_previous |
* | Use current selection as the search pattern, automatically wrapping with \b on word boundaries | search_selection_detect_word_boundaries |
<A-*> | Use current selection as search pattern | search_selection |
u | Undo change | undo |
U | Redo change | redo |
<A-u> | Go to previous selection | undo_selection |
<A-U> | Go to next selection | redo_selection |
y | Yank selection | yank |
p | Paste after selection | paste_after |
P | Paste before selection | paste_before |
Q | Record macro | record_macro |
q | Replay macro | replay_macro |
<gt> | Indent selection | indent |
<lt> | Unindent selection | unindent |
= | Format selection | format_selections |
J | Join lines inside selection | join_lines |
<A-J> | Join lines inside selection and select spaces | join_lines_and_select_spaces |
K | Keep selections matching regex | keep_selections |
<A-K> | Remove selections matching regex | remove_selections |
, | Keep primary selection | keep_primary_selection |
<A-,> | Remove primary selection | remove_primary_selection |
& | Align selections in column | align_selections |
_ | Trim whitespace from selections | trim_selections |
( | Make the previous selection primary | cycle_primary_selection_backward |
) | Make the next selection primary | cycle_primary_selection_forward |
<A-(> | Rotate selections contents backward | rotate_selection_contents_backward |
<A-)> | Rotate selection contents forward | rotate_selection_contents_forward |
<A-:> | Ensure all selections face forward | ensure_selections_forward |
<esc> | Exit selection mode | exit_select_mode |
<C-b> | Move page up | page_up |
<pageup> | Move page up | page_up |
<C-e> | Switch focus between editor and file explorer sidebar | switch_sidebar_focus |
<C-f> | Move page down | page_down |
<pagedown> | Move page down | page_down |
<C-u> | Move page and cursor half up | page_cursor_half_up |
<C-d> | Move page and cursor half down | page_cursor_half_down |
<C-k> | Move current line selection up | move_lines_up |
<C-j> | Move current line selection down | move_lines_down |
<C-w> | Window | Prefix |
<C-c> | Comment/uncomment selections | toggle_comments |
<C-i> | Jump forward on jumplist | jump_forward |
<tab> | Jump forward on jumplist | jump_forward |
<C-o> | Jump backward on jumplist | jump_backward |
<C-s> | Record current selections in the jumplist | save_selection |
<space> | Space | Prefix |
z | View | Prefix |
Z | View (sticky; Escape to exit) | Prefix |
" | Select register | select_register |
| | Pipe selections through shell command | shell_pipe |
<A-|> | Pipe selections into shell command ignoring output | shell_pipe_to |
! | Insert shell command output before selections | shell_insert_output |
<A-!> | Append shell command output after selections | shell_append_output |
$ | Filter selections with shell predicate | shell_keep_pipe |
<C-z> | Suspend and return to shell | suspend |
<C-a> | Increment item under cursor | increment |
<C-x> | Decrement item under cursor | decrement |
` — Case
| Key | Description | Command |
|---|---|---|
`a | Switch (toggle) case | switch_case |
`l | Switch to lowercase | switch_to_lowercase |
`u | Switch to uppercase | switch_to_uppercase |
`c | Switch to lowerCamelCase | switch_to_lower_camel_case |
`p | Switch to UpperCamelCase | switch_to_upper_camel_case |
`s | Switch to snake_case | switch_to_snake_case |
`S | Switch to SHOUTY_SNAKE_CASE | switch_to_shouty_snake_case |
`k | Switch to kebab-case | switch_to_kebab_case |
`K | Switch to SHOUTY-KEBAB-CASE | switch_to_shouty_kebab_case |
`t | Switch to Title Case | switch_to_title_case |
`T | Switch to Train-Case | switch_to_train_case |
g — Goto
| Key | Description | Command |
|---|---|---|
gg | Extend to line number <n> else file start | extend_to_file_start |
g| | Extend to column | extend_to_column |
ge | Extend to last line | extend_to_last_line |
gf | Go to files/URLs in selections | goto_file |
gh | Go to line start | goto_line_start |
gl | Go to line end | goto_line_end |
gs | Go to first non-blank in line | goto_first_nonwhitespace |
gd | Go to definition | goto_definition |
gD | Go to declaration | goto_declaration |
gy | Go to type definition | goto_type_definition |
gr | Go to references | goto_reference |
gi | Go to implementation | goto_implementation |
gt | Go to window top | goto_window_top |
gc | Go to window center | goto_window_center |
gb | Go to window bottom | goto_window_bottom |
ga | Go to last accessed file | goto_last_accessed_file |
gm | Go to last modified file | goto_last_modified_file |
gn | Go to next buffer | goto_next_buffer |
gp | Go to previous buffer | goto_previous_buffer |
gk | Extend up | extend_line_up |
gj | Extend down | extend_line_down |
g. | Go to last modification | goto_last_modification |
g<minus> | Move backward in history | earlier |
g+ | Move forward in history | later |
gw | Extend to a two-character label | extend_to_word |
m — Match
| Key | Description | Command |
|---|---|---|
mm | Go to matching bracket | match_brackets |
ms | Surround add | surround_add |
mr | Surround replace | surround_replace |
md | Surround delete | surround_delete |
ma | Select around object | select_textobject_around |
mi | Select inside object | select_textobject_inner |
mA | Select all textobjects around selections | select_all_textobjects_around |
mI | Select all textobjects inside selections | select_all_textobjects_inner |
[ — Left bracket
| Key | Description | Command |
|---|---|---|
[d | Go to previous diagnostic | goto_previous_diagnostic |
[s | Go to previous spelling finding | goto_previous_spelling |
[q | Go to previous quicklist entry | goto_previous_quicklist |
[D | Go to first diagnostic | goto_first_diagnostic |
[g | Go to previous change | vcs_goto_previous_change |
[m | Go to the previous unresolved conflict | vcs_goto_previous_conflict |
[G | Go to first change | vcs_goto_first_change |
[l | Go to previous quicklist entry in current file | goto_previous_file_quicklist |
[f | Go to previous function | goto_previous_function |
[t | Go to previous type definition | goto_previous_class |
[a | Go to previous parameter | goto_previous_parameter |
[c | Go to previous comment | goto_previous_comment |
[e | Go to previous pairing | goto_previous_entry |
[T | Go to previous test | goto_previous_test |
[p | Go to previous paragraph | goto_previous_paragraph |
[x | Go to previous (X)HTML element | goto_previous_xml_element |
[<space> | Add newline above | add_newline_above |
] — Right bracket
| Key | Description | Command |
|---|---|---|
]d | Go to next diagnostic | goto_next_diagnostic |
]s | Go to next spelling finding | goto_next_spelling |
]q | Go to next quicklist entry | goto_next_quicklist |
]D | Go to last diagnostic | goto_last_diagnostic |
]g | Go to next change | vcs_goto_next_change |
]m | Go to the next unresolved conflict | vcs_goto_next_conflict |
]G | Go to last change | vcs_goto_last_change |
]l | Go to next quicklist entry in current file | goto_next_file_quicklist |
]f | Go to next function | goto_next_function |
]t | Go to next type definition | goto_next_class |
]a | Go to next parameter | goto_next_parameter |
]c | Go to next comment | goto_next_comment |
]e | Go to next pairing | goto_next_entry |
]T | Go to next test | goto_next_test |
]p | Go to next paragraph | goto_next_paragraph |
]x | Go to next (X)HTML element | goto_next_xml_element |
]<space> | Add newline below | add_newline_below |
<C-w> — Window
| Key | Description | Command |
|---|---|---|
<C-w>b | Toggle file explorer sidebar | toggle_sidebar |
<C-w>e | Open and focus file explorer sidebar | focus_sidebar |
<C-w><C-w> | Go to next window | rotate_view |
<C-w>w | Go to next window | rotate_view |
<C-w>W | Go to previous window | rotate_view_reverse |
<C-w><C-s> | Horizontal bottom split | split_horizontal |
<C-w>s | Horizontal bottom split | split_horizontal |
<C-w><C-v> | Vertical right split | split_vertical |
<C-w>v | Vertical right split | split_vertical |
<C-w><C-t> | Transpose splits | transpose_view |
<C-w>t | Transpose splits | transpose_view |
<C-w>r | Resize windows (Enter to confirm, Escape to cancel) | resize_mode |
<C-w>= | Make all splits the same size | equalize_views |
<C-w>f | Open files in selections in a horizontal split | goto_file_in_horizontal_split |
<C-w>F | Open files in selections in a vertical split | goto_file_in_vertical_split |
<C-w><C-q> | Close current view | close_view |
<C-w>q | Close current view | close_view |
<C-w><C-o> | Close views except current | close_other_views |
<C-w>o | Close views except current | close_other_views |
<C-w><C-h> | Jump to left split | jump_view_left |
<C-w>h | Jump to left split | jump_view_left |
<C-w><left> | Jump to left split | jump_view_left |
<C-w><C-j> | Jump to split below | jump_view_down |
<C-w>j | Jump to split below | jump_view_down |
<C-w><down> | Jump to split below | jump_view_down |
<C-w><C-k> | Jump to split above | jump_view_up |
<C-w>k | Jump to split above | jump_view_up |
<C-w><up> | Jump to split above | jump_view_up |
<C-w><C-l> | Jump to right split | jump_view_right |
<C-w>l | Jump to right split | jump_view_right |
<C-w><right> | Jump to right split | jump_view_right |
<C-w>L | Swap with right split | swap_view_right |
<C-w><S-right> | Swap with right split | swap_view_right |
<C-w>K | Swap with split above | swap_view_up |
<C-w><S-up> | Swap with split above | swap_view_up |
<C-w>H | Swap with left split | swap_view_left |
<C-w><S-left> | Swap with left split | swap_view_left |
<C-w>J | Swap with split below | swap_view_down |
<C-w><S-down> | Swap with split below | swap_view_down |
<C-w>n | New split scratch buffer | Prefix |
<C-w>n — New split scratch buffer
| Key | Description | Command |
|---|---|---|
<C-w>n<C-s> | Horizontal bottom split scratch buffer | split_horizontal_new |
<C-w>ns | Horizontal bottom split scratch buffer | split_horizontal_new |
<C-w>n<C-v> | Vertical right split scratch buffer | split_vertical_new |
<C-w>nv | Vertical right split scratch buffer | split_vertical_new |
<space> — Space
| Key | Description | Command |
|---|---|---|
<space>f | Open file picker | file_picker |
<space>F | Open file picker at current buffer’s directory | file_picker_in_current_buffer_directory |
<space>e | Open file explorer in workspace root | file_explorer |
<space>E | Open file explorer at current buffer’s directory | file_explorer_in_current_buffer_directory |
<space>b | Open buffer picker | buffer_picker |
<space>j | Open jumplist picker | jumplist_picker |
<space>q | Open quicklist picker | quicklist_picker |
<space>s | Open symbol picker from LSP or syntax information | lsp_or_syntax_symbol_picker |
<space>S | Open workspace symbol picker from LSP or syntax information | lsp_or_syntax_workspace_symbol_picker |
<space>d | Open diagnostic picker | diagnostics_picker |
<space>D | Open workspace diagnostic picker | workspace_diagnostics_picker |
<space>g | Version control | Prefix |
<space>a | Perform code action | code_action |
<space>l | Show code lenses under cursor | show_code_lenses_under_cursor |
<space>' | Open last picker | last_picker |
<space>x | Debug | Prefix |
<space>X | Debug (sticky; Escape to exit) | Prefix |
<space>w | Window | Prefix |
<space>y | Yank selections to clipboard | yank_to_clipboard |
<space>Y | Yank primary selection to clipboard | yank_primary_selection_to_clipboard |
<space>p | Paste clipboard after selections | paste_clipboard_after |
<space>P | Paste clipboard before selections | paste_clipboard_before |
<space>R | Replace selections by clipboard content | replace_selections_with_clipboard |
<space>/ | Search text in the current working directory | search_picker_in_current_working_directory |
<space>k | Show docs for item under cursor | hover |
<space>K | Show docs for item under cursor in a new buffer | goto_hover |
<space>r | Rename symbol | rename_symbol |
<space>h | Select symbol references | select_references_to_symbol_under_cursor |
<space>c | Comment/uncomment selections | toggle_comments |
<space>C | Block comment/uncomment selections | toggle_block_comments |
<space><A-c> | Line comment/uncomment selections | toggle_line_comments |
<space>? | Open command palette | command_palette |
<space>g — Version control
| Key | Description | Command |
|---|---|---|
<space>gs | Browse changed files | vcs_changed_file_picker |
<space>gd | Show file diff | vcs_diff |
<space>gf | Browse file history | vcs_file_history_picker |
<space>gl | Browse commits | vcs_history_picker |
<space>gb | Show line blame | vcs_blame_line |
<space>gi | Show hunk diff | vcs_show_change |
<space>gt | Toggle inline blame | vcs_toggle_inline_blame |
<space>gS | Browse stashes | vcs_stash_picker |
<space>x — Debug
| Key | Description | Command |
|---|---|---|
<space>xl | Choose a launch configuration and start debugging | debug_launch_picker |
<space>xr | Restart debugging session | debug_restart |
<space>xb | Toggle breakpoints | debug_toggle_breakpoints |
<space>xc | Continue program execution | debug_continue |
<space>xh | Pause program execution | debug_pause |
<space>xi | Step in | debug_step_in |
<space>xo | Step out | debug_step_out |
<space>xn | Step over the current statement | debug_step_over |
<space>xv | Browse variables | debug_variables |
<space>xt | End debug session | debug_terminate |
<space>xB | Breakpoint settings | Prefix |
<space>xs | Switch | Prefix |
<space>xe | Enable exception breakpoints | debug_enable_exception_breakpoints |
<space>xE | Disable exception breakpoints | debug_disable_exception_breakpoints |
<space>xB — Breakpoint settings
| Key | Description | Command |
|---|---|---|
<space>xBc | Edit breakpoint condition on current line | debug_edit_breakpoint_condition |
<space>xBl | Edit breakpoint log message on current line | debug_edit_breakpoint_log_message |
<space>xs — Switch
| Key | Description | Command |
|---|---|---|
<space>xss | Open debug session picker | debug_session_picker |
<space>xst | Choose the current debug thread | debug_thread_picker |
<space>xsf | Open debug stack frame picker | debug_stack_frame_picker |
<space>X — Debug
| Key | Description | Command |
|---|---|---|
<space>Xl | Choose a launch configuration and start debugging | debug_launch_picker |
<space>Xr | Restart debugging session | debug_restart |
<space>Xb | Toggle breakpoints | debug_toggle_breakpoints |
<space>Xc | Continue program execution | debug_continue |
<space>Xh | Pause program execution | debug_pause |
<space>Xi | Step in | debug_step_in |
<space>Xo | Step out | debug_step_out |
<space>Xn | Step over the current statement | debug_step_over |
<space>Xv | Browse variables | debug_variables |
<space>Xt | End debug session | debug_terminate |
<space>XB | Breakpoint settings | Prefix |
<space>Xs | Switch | Prefix |
<space>Xe | Enable exception breakpoints | debug_enable_exception_breakpoints |
<space>XE | Disable exception breakpoints | debug_disable_exception_breakpoints |
<space>XB — Breakpoint settings
| Key | Description | Command |
|---|---|---|
<space>XBc | Edit breakpoint condition on current line | debug_edit_breakpoint_condition |
<space>XBl | Edit breakpoint log message on current line | debug_edit_breakpoint_log_message |
<space>Xs — Switch
| Key | Description | Command |
|---|---|---|
<space>Xss | Open debug session picker | debug_session_picker |
<space>Xst | Choose the current debug thread | debug_thread_picker |
<space>Xsf | Open debug stack frame picker | debug_stack_frame_picker |
<space>w — Window
| Key | Description | Command |
|---|---|---|
<space>wb | Toggle file explorer sidebar | toggle_sidebar |
<space>we | Open and focus file explorer sidebar | focus_sidebar |
<space>w<C-w> | Go to next window | rotate_view |
<space>ww | Go to next window | rotate_view |
<space>wW | Go to previous window | rotate_view_reverse |
<space>w<C-s> | Horizontal bottom split | split_horizontal |
<space>ws | Horizontal bottom split | split_horizontal |
<space>w<C-v> | Vertical right split | split_vertical |
<space>wv | Vertical right split | split_vertical |
<space>w<C-t> | Transpose splits | transpose_view |
<space>wt | Transpose splits | transpose_view |
<space>wr | Resize windows (Enter to confirm, Escape to cancel) | resize_mode |
<space>w= | Make all splits the same size | equalize_views |
<space>wf | Open files in selections in a horizontal split | goto_file_in_horizontal_split |
<space>wF | Open files in selections in a vertical split | goto_file_in_vertical_split |
<space>w<C-q> | Close current view | close_view |
<space>wq | Close current view | close_view |
<space>w<C-o> | Close views except current | close_other_views |
<space>wo | Close views except current | close_other_views |
<space>w<C-h> | Jump to left split | jump_view_left |
<space>wh | Jump to left split | jump_view_left |
<space>w<left> | Jump to left split | jump_view_left |
<space>w<C-j> | Jump to split below | jump_view_down |
<space>wj | Jump to split below | jump_view_down |
<space>w<down> | Jump to split below | jump_view_down |
<space>w<C-k> | Jump to split above | jump_view_up |
<space>wk | Jump to split above | jump_view_up |
<space>w<up> | Jump to split above | jump_view_up |
<space>w<C-l> | Jump to right split | jump_view_right |
<space>wl | Jump to right split | jump_view_right |
<space>w<right> | Jump to right split | jump_view_right |
<space>wL | Swap with right split | swap_view_right |
<space>w<S-right> | Swap with right split | swap_view_right |
<space>wK | Swap with split above | swap_view_up |
<space>w<S-up> | Swap with split above | swap_view_up |
<space>wH | Swap with left split | swap_view_left |
<space>w<S-left> | Swap with left split | swap_view_left |
<space>wJ | Swap with split below | swap_view_down |
<space>w<S-down> | Swap with split below | swap_view_down |
<space>wn | New split scratch buffer | Prefix |
<space>wn — New split scratch buffer
| Key | Description | Command |
|---|---|---|
<space>wn<C-s> | Horizontal bottom split scratch buffer | split_horizontal_new |
<space>wns | Horizontal bottom split scratch buffer | split_horizontal_new |
<space>wn<C-v> | Vertical right split scratch buffer | split_vertical_new |
<space>wnv | Vertical right split scratch buffer | split_vertical_new |
z — View
| Key | Description | Command |
|---|---|---|
zc | Close the innermost fold | fold_close |
zo | Open the fold at each cursor | fold_open |
za | Toggle the fold at each cursor | fold_toggle |
zf | Fold selected lines | fold_selection |
zC | Close all folds | fold_all |
zO | Open all folds | unfold_all |
zA | Open all folds if any are closed, otherwise close all folds | fold_toggle_all |
zz | Scroll vertically to center the primary cursor | center_view_vertically |
zt | Align view top | align_view_top |
zb | Align view bottom | align_view_bottom |
zm | Scroll horizontally to center the primary cursor | center_view_horizontally |
zk | Scroll view up | scroll_up |
z<up> | Scroll view up | scroll_up |
zj | Scroll view down | scroll_down |
z<down> | Scroll view down | scroll_down |
z<C-b> | Move page up | page_up |
z<pageup> | Move page up | page_up |
z<C-f> | Move page down | page_down |
z<pagedown> | Move page down | page_down |
z<C-u> | Move page and cursor half up | page_cursor_half_up |
z<backspace> | Move page and cursor half up | page_cursor_half_up |
z<C-d> | Move page and cursor half down | page_cursor_half_down |
z<space> | Move page and cursor half down | page_cursor_half_down |
z/ | Search forward for regex pattern | search_forward |
z? | Search backward for regex pattern | search_backward |
zn | Select next search match | search_next |
zN | Select previous search match | search_previous |
Z — View
| Key | Description | Command |
|---|---|---|
Zc | Close the innermost fold | fold_close |
Zo | Open the fold at each cursor | fold_open |
Za | Toggle the fold at each cursor | fold_toggle |
Zf | Fold selected lines | fold_selection |
ZC | Close all folds | fold_all |
ZO | Open all folds | unfold_all |
ZA | Open all folds if any are closed, otherwise close all folds | fold_toggle_all |
Zz | Scroll vertically to center the primary cursor | center_view_vertically |
Zt | Align view top | align_view_top |
Zb | Align view bottom | align_view_bottom |
Zm | Scroll horizontally to center the primary cursor | center_view_horizontally |
Zk | Scroll view up | scroll_up |
Z<up> | Scroll view up | scroll_up |
Zj | Scroll view down | scroll_down |
Z<down> | Scroll view down | scroll_down |
Z<C-b> | Move page up | page_up |
Z<pageup> | Move page up | page_up |
Z<C-f> | Move page down | page_down |
Z<pagedown> | Move page down | page_down |
Z<C-u> | Move page and cursor half up | page_cursor_half_up |
Z<backspace> | Move page and cursor half up | page_cursor_half_up |
Z<C-d> | Move page and cursor half down | page_cursor_half_down |
Z<space> | Move page and cursor half down | page_cursor_half_down |
Z/ | Search forward for regex pattern | search_forward |
Z? | Search backward for regex pattern | search_backward |
Zn | Select next search match | search_next |
ZN | Select previous search match | search_previous |
Component bindings
The tables below use the action names accepted by component key remapping. Prompt bindings also work in pickers, except where they conflict with picker bindings. Buffer pickers use their own binding table. Popups use the popup bindings together with their specific hover, signature-help, or blame bindings. In the completion menu, other typing accepts the completion and continues inserting text.
Picker
| Key | Action |
|---|---|
<ret> | accept |
<C-s> | accept_horizontal_split |
<A-ret> | accept_keep_open |
<C-v> | accept_vertical_split |
<C-c>, <esc> | cancel |
<C-n>, <tab>, <down> | move_down |
<end> | move_end |
<home> | move_start |
<up>, <C-p>, <S-tab> | move_up |
<A-a> | open_all |
<A-o> | open_preview |
<C-d>, <pagedown> | page_down |
<C-u>, <pageup> | page_up |
<C-q> | populate_quicklist |
<A-j>, <A-down> | preview_scroll_down |
<A-k>, <A-up> | preview_scroll_up |
<C-ret>, <Meta-ret> | replace_all |
<A-c> | toggle_case_sensitive |
<C-l> | toggle_loading |
<C-t> | toggle_preview |
<A-r> | toggle_replacement |
Buffer picker
| Key | Action |
|---|---|
<ret> | accept |
<C-s> | accept_horizontal_split |
<A-ret> | accept_keep_open |
<C-v> | accept_vertical_split |
<C-c>, <esc> | cancel |
<C-n>, <tab>, <down> | move_down |
<end> | move_end |
<home> | move_start |
<up>, <C-p>, <S-tab> | move_up |
<A-a> | open_all |
<A-o> | open_preview |
<C-d>, <pagedown> | page_down |
<C-u>, <pageup> | page_up |
<C-q> | populate_quicklist |
<A-j>, <A-down> | preview_scroll_down |
<A-k>, <A-up> | preview_scroll_up |
<C-ret>, <Meta-ret> | replace_all |
<A-c> | toggle_case_sensitive |
<C-l> | toggle_loading |
<C-t> | toggle_preview |
<A-r> | toggle_replacement |
Quicklist picker
| Key | Action |
|---|---|
<ret> | accept |
<C-s> | accept_horizontal_split |
<A-ret> | accept_keep_open |
<C-v> | accept_vertical_split |
<C-c>, <esc> | cancel |
<C-n>, <tab>, <down> | move_down |
<end> | move_end |
<home> | move_start |
<up>, <C-p>, <S-tab> | move_up |
<A-a> | open_all |
<A-o> | open_preview |
<C-d>, <pagedown> | page_down |
<C-u>, <pageup> | page_up |
<C-q> | populate_quicklist |
<A-j>, <A-down> | preview_scroll_down |
<A-k>, <A-up> | preview_scroll_up |
<C-x> | remove_entry |
<C-ret>, <Meta-ret> | replace_all |
<A-c> | toggle_case_sensitive |
<C-l> | toggle_loading |
<C-t> | toggle_preview |
<A-r> | toggle_replacement |
Git picker
| Key | Action |
|---|---|
<ret> | accept |
<C-s> | accept_horizontal_split |
<A-ret> | accept_keep_open |
<C-v> | accept_vertical_split |
<A-a> | actions |
<C-c>, <esc> | cancel |
<C-n>, <tab>, <down> | move_down |
<end> | move_end |
<home> | move_start |
<up>, <C-p>, <S-tab> | move_up |
<A-A> | open_all |
<A-o> | open_preview |
<C-d>, <pagedown> | page_down |
<C-u>, <pageup> | page_up |
<C-q> | populate_quicklist |
<A-n> | preview_next |
<A-p> | preview_previous |
<A-j>, <A-down> | preview_scroll_down |
<A-k>, <A-up> | preview_scroll_up |
<C-ret>, <Meta-ret> | replace_all |
<A-s> | stage |
<A-z> | stash |
<A-l> | stashes |
<A-c> | toggle_case_sensitive |
<C-l> | toggle_loading |
<C-t> | toggle_preview |
<A-r> | toggle_replacement |
<A-u> | unstage |
Branch picker
| Key | Action |
|---|---|
<ret> | accept |
<C-s> | accept_horizontal_split |
<A-ret> | accept_keep_open |
<C-v> | accept_vertical_split |
<C-c>, <esc> | cancel |
<A-n> | create_branch |
<A-d> | delete_branch |
<C-n>, <tab>, <down> | move_down |
<end> | move_end |
<home> | move_start |
<up>, <C-p>, <S-tab> | move_up |
<A-a> | open_all |
<A-o> | open_preview |
<C-d>, <pagedown> | page_down |
<C-u>, <pageup> | page_up |
<C-q> | populate_quicklist |
<A-j>, <A-down> | preview_scroll_down |
<A-k>, <A-up> | preview_scroll_up |
<C-ret>, <Meta-ret> | replace_all |
<A-c> | toggle_case_sensitive |
<C-t> | toggle_preview |
<A-r> | toggle_replacement |
Worktree picker
| Key | Action |
|---|---|
<ret> | accept |
<C-s> | accept_horizontal_split |
<A-ret> | accept_keep_open |
<C-v> | accept_vertical_split |
<C-c>, <esc> | cancel |
<A-n> | create_worktree |
<A-l> | lock_worktree |
<C-n>, <tab>, <down> | move_down |
<end> | move_end |
<home> | move_start |
<up>, <C-p>, <S-tab> | move_up |
<A-a> | open_all |
<A-o> | open_preview |
<C-d>, <pagedown> | page_down |
<C-u>, <pageup> | page_up |
<C-q> | populate_quicklist |
<A-j>, <A-down> | preview_scroll_down |
<A-k>, <A-up> | preview_scroll_up |
<A-d> | remove_worktree |
<C-ret>, <Meta-ret> | replace_all |
<A-c> | toggle_case_sensitive |
<C-t> | toggle_preview |
<A-r> | toggle_replacement |
<A-u> | unlock_worktree |
Stash picker
| Key | Action |
|---|---|
<ret> | accept |
<C-s> | accept_horizontal_split |
<A-ret> | accept_keep_open |
<C-v> | accept_vertical_split |
<A-a> | actions |
<A-s> | apply_stash |
<A-i> | apply_stash_with_index |
<C-c>, <esc> | cancel |
<C-n>, <tab>, <down> | move_down |
<end> | move_end |
<home> | move_start |
<up>, <C-p>, <S-tab> | move_up |
<A-o> | open_preview |
<C-d>, <pagedown> | page_down |
<C-u>, <pageup> | page_up |
<C-q> | populate_quicklist |
<A-j>, <A-down> | preview_scroll_down |
<A-k>, <A-up> | preview_scroll_up |
<C-ret>, <Meta-ret> | replace_all |
<A-c> | toggle_case_sensitive |
<C-l> | toggle_loading |
<C-t> | toggle_preview |
<A-r> | toggle_replacement |
History picker
| Key | Action |
|---|---|
<ret> | accept |
<C-s> | accept_horizontal_split |
<A-ret> | accept_keep_open |
<C-v> | accept_vertical_split |
<A-a> | actions |
<A-h> | back |
<C-c>, <esc> | cancel |
<C-n>, <tab>, <down> | move_down |
<end> | move_end |
<home> | move_start |
<up>, <C-p>, <S-tab> | move_up |
<A-o> | open_preview |
<C-d>, <pagedown> | page_down |
<C-u>, <pageup> | page_up |
<C-q> | populate_quicklist |
<A-j>, <A-down> | preview_scroll_down |
<A-k>, <A-up> | preview_scroll_up |
<C-ret>, <Meta-ret> | replace_all |
<A-c> | toggle_case_sensitive |
<C-l> | toggle_loading |
<C-t> | toggle_preview |
<A-r> | toggle_replacement |
File explorer
| Key | Action |
|---|---|
<ret> | accept |
<C-s> | accept_horizontal_split |
<A-ret> | accept_keep_open |
<C-v> | accept_vertical_split |
<C-c>, <esc> | cancel |
<A-c> | copy_path |
<A-n> | create_path |
<A-d> | delete_path |
<C-n>, <tab>, <down> | move_down |
<end> | move_end |
<A-m> | move_path |
<home> | move_start |
<up>, <C-p>, <S-tab> | move_up |
<A-a> | open_all |
<A-o> | open_preview |
<C-d>, <pagedown> | page_down |
<C-u>, <pageup> | page_up |
<C-q> | populate_quicklist |
<A-j>, <A-down> | preview_scroll_down |
<A-k>, <A-up> | preview_scroll_up |
<C-ret>, <Meta-ret> | replace_all |
<C-l> | toggle_loading |
<C-t> | toggle_preview |
<A-r> | toggle_replacement |
<A-y> | yank_path |
Sidebar
| Key | Action |
|---|---|
<ret> | accept |
<C-s> | accept_horizontal_split |
<A-ret> | accept_keep_open |
<C-v> | accept_vertical_split |
<C-c>, <esc> | cancel |
<A-c> | copy_path |
<A-n> | create_path |
<A-d> | delete_path |
/ | filter |
<C-e>, <C-w>l, <C-w><C-l>, <C-w><right> | focus_editor |
zC | fold_all |
zc | fold_close |
zo | fold_open |
za | fold_toggle |
q, <C-w>b, <C-w>q, <C-w><C-q> | hide |
j, <C-n>, <tab>, <down> | move_down |
ge, <end> | move_end |
<A-m> | move_path |
gg, <home> | move_start |
k, <up>, <C-p>, <S-tab> | move_up |
<C-w>w, <C-w><C-w> | next_view |
<A-a> | open_all |
<A-o> | open_preview |
<C-d>, <pagedown> | page_down |
<C-u>, <pageup> | page_up |
<C-q> | populate_quicklist |
<A-j>, <A-down> | preview_scroll_down |
<A-k>, <A-up> | preview_scroll_up |
<C-w>W | previous_view |
<C-ret>, <Meta-ret> | replace_all |
<C-w>r | resize |
<C-l> | toggle_loading |
<C-t> | toggle_preview |
<A-r> | toggle_replacement |
<A-y> | yank_path |
Sidebar filter
| Key | Action |
|---|---|
<ret> | accept |
<C-s> | accept_horizontal_split |
<A-ret> | accept_keep_open |
<C-v> | accept_vertical_split |
<C-c>, <esc> | cancel |
<A-c> | copy_path |
<A-n> | create_path |
<A-d> | delete_path |
<C-e> | focus_editor |
<C-n>, <tab>, <down> | move_down |
<end> | move_end |
<A-m> | move_path |
<home> | move_start |
<up>, <C-p>, <S-tab> | move_up |
<A-a> | open_all |
<A-o> | open_preview |
<C-d>, <pagedown> | page_down |
<C-u>, <pageup> | page_up |
<C-q> | populate_quicklist |
<A-j>, <A-down> | preview_scroll_down |
<A-k>, <A-up> | preview_scroll_up |
<C-ret>, <Meta-ret> | replace_all |
<C-l> | toggle_loading |
<C-t> | toggle_preview |
<A-r> | toggle_replacement |
<A-y> | yank_path |
Prompt
| Key | Action |
|---|---|
<ret> | accept |
<C-c>, <esc> | cancel |
<tab> | complete_next |
<S-tab> | complete_previous |
<C-h>, <backspace>, <S-backspace> | delete_backward |
<C-d>, <del> | delete_forward |
<C-k> | delete_to_end |
<C-u>, <Meta-backspace> | delete_to_start |
<C-w>, <A-backspace>, <C-backspace> | delete_word_backward |
<A-d>, <A-del>, <C-del> | delete_word_forward |
<C-q> | exit_selection |
<C-n>, <down> | history_next |
<up>, <C-p> | history_previous |
<C-r> | insert_register |
<C-s> | insert_word |
<C-e>, <end>, <C-end>, <Meta-right> | move_end |
<C-b>, <left> | move_left |
<C-f>, <right> | move_right |
<C-a>, <home>, <C-home>, <Meta-left> | move_start |
<A-right> | move_word_end |
<A-b>, <A-left>, <C-left> | move_word_left |
<A-f>, <C-right> | move_word_right |
<A-r> | toggle_search_syntax |
Completion menu
| Key | Action |
|---|---|
<ret> | accept |
<C-c>, <esc> | cancel |
<C-n>, <tab>, <down> | move_down |
<up>, <C-p>, <S-tab> | move_up |
<C-d>, <pagedown> | page_down |
<C-u>, <pageup> | page_up |
Popup
| Key | Action |
|---|---|
<C-c>, <esc> | cancel |
<C-d>, <pagedown> | scroll_down |
<C-u>, <pageup> | scroll_up |
Hover
| Key | Action |
|---|---|
<A-n> | next |
<A-p> | previous |
Signature-help popup
| Key | Action |
|---|---|
<A-n> | next |
<A-p> | previous |
Blame
| Key | Action |
|---|---|
y | copy_commit_id |
Y | copy_message |
Diff popup
| Key | Action |
|---|---|
r | restore |
<left> | scroll_left |
<right> | scroll_right |