diff --git a/book/src/generated/static-cmd.md b/book/src/generated/static-cmd.md index 86ddb9d74..2cb8b90d2 100644 --- a/book/src/generated/static-cmd.md +++ b/book/src/generated/static-cmd.md @@ -5,16 +5,16 @@ | `move_char_right` | Move right | normal: `` ``, `` l ``, insert: `` `` | | `move_line_up` | Move up | normal: `` gk `` | | `move_line_down` | Move down | normal: `` gj `` | -| `move_visual_line_up` | Move up | normal: `` ``, `` k ``, insert: `` `` | +| `move_visual_line_up` | Move up | normal: `` k ``, `` ``, insert: `` `` | | `move_visual_line_down` | Move down | normal: `` ``, `` j ``, insert: `` `` | | `extend_char_left` | Extend left | select: `` h ``, `` `` | | `extend_char_right` | Extend right | select: `` ``, `` l `` | | `extend_line_up` | Extend up | select: `` gk `` | | `extend_line_down` | Extend down | select: `` gj `` | -| `extend_visual_line_up` | Extend up | select: `` ``, `` k `` | +| `extend_visual_line_up` | Extend up | select: `` k ``, `` `` | | `extend_visual_line_down` | Extend down | select: `` ``, `` j `` | -| `copy_selection_on_next_line` | Copy selection on next line | normal: `` C ``, normal: `` C `` | -| `copy_selection_on_prev_line` | Copy selection on previous line | normal: `` ``, normal: `` `` | +| `copy_selection_on_next_line` | Copy selection on next line | normal: `` C ``, select: `` C `` | +| `copy_selection_on_prev_line` | Copy selection on previous line | normal: `` ``, select: `` `` | | `move_next_word_start` | Move to start of next word | normal: `` w `` | | `move_prev_word_start` | Move to start of previous word | normal: `` b `` | | `move_next_word_end` | Move to end of next word | normal: `` e `` | @@ -51,106 +51,106 @@ | `find_prev_char` | Move to previous occurrence of char | normal: `` F `` | | `extend_till_prev_char` | Extend till previous occurrence of char | select: `` T `` | | `extend_prev_char` | Extend to previous occurrence of char | select: `` F `` | -| `repeat_last_motion` | Repeat last motion | normal: `` ``, normal: `` `` | -| `replace` | Replace with new char | normal: `` r ``, normal: `` r `` | -| `switch_case` | Switch (toggle) case | normal: `` ~ ``, normal: `` ~ `` | -| `switch_to_uppercase` | Switch to uppercase | normal: `` ``, normal: `` `` | -| `switch_to_lowercase` | Switch to lowercase | normal: `` ` ``, normal: `` ` `` | -| `page_up` | Move page up | normal: `` z ``, `` z ``, `` ``, `` ``, `` Z ``, `` Z ``, normal: `` z ``, `` z ``, `` ``, `` ``, `` Z ``, `` Z ``, insert: `` `` | -| `page_down` | Move page down | normal: `` z ``, `` z ``, `` ``, `` Z ``, `` Z ``, `` ``, normal: `` z ``, `` z ``, `` ``, `` Z ``, `` Z ``, `` ``, insert: `` `` | +| `repeat_last_motion` | Repeat last motion | normal: `` ``, select: `` `` | +| `replace` | Replace with new char | normal: `` r ``, select: `` r `` | +| `switch_case` | Switch (toggle) case | normal: `` ~ ``, select: `` ~ `` | +| `switch_to_uppercase` | Switch to uppercase | normal: `` ``, select: `` `` | +| `switch_to_lowercase` | Switch to lowercase | normal: `` ` ``, select: `` ` `` | +| `page_up` | Move page up | normal: `` z ``, `` z ``, `` ``, `` ``, `` Z ``, `` Z ``, select: `` z ``, `` z ``, `` ``, `` ``, `` Z ``, `` Z ``, insert: `` `` | +| `page_down` | Move page down | normal: `` z ``, `` z ``, `` ``, `` ``, `` Z ``, `` Z ``, select: `` z ``, `` z ``, `` ``, `` ``, `` Z ``, `` Z ``, insert: `` `` | | `half_page_up` | Move half page up | | | `half_page_down` | Move half page down | | | `page_cursor_up` | Move page and cursor up | | | `page_cursor_down` | Move page and cursor down | | -| `page_cursor_half_up` | Move page and cursor half up | normal: `` z ``, `` z ``, `` ``, `` Z ``, `` Z ``, normal: `` z ``, `` z ``, `` ``, `` Z ``, `` Z `` | -| `page_cursor_half_down` | Move page and cursor half down | normal: `` z ``, `` z ``, `` ``, `` Z ``, `` Z ``, normal: `` z ``, `` z ``, `` ``, `` Z ``, `` Z `` | -| `select_all` | Select whole document | normal: `` % ``, normal: `` % `` | -| `select_regex` | Select all regex matches inside selections | normal: `` s ``, normal: `` s `` | -| `split_selection` | Split selections on regex matches | normal: `` S ``, normal: `` S `` | -| `split_selection_on_newline` | Split selection on newlines | normal: `` ``, normal: `` `` | -| `merge_selections` | Merge selections | normal: `` ``, normal: `` `` | -| `merge_consecutive_selections` | Merge consecutive selections | normal: `` ``, normal: `` `` | -| `search` | Search for regex pattern | normal: `` / ``, `` z/ ``, `` Z/ ``, normal: `` / ``, `` z/ ``, `` Z/ `` | -| `rsearch` | Reverse search for regex pattern | normal: `` z? ``, `` ? ``, `` Z? ``, normal: `` z? ``, `` ? ``, `` Z? `` | -| `search_next` | Select next search match | normal: `` n ``, `` zn ``, `` Zn ``, select: `` zn ``, `` Zn `` | +| `page_cursor_half_up` | Move page and cursor half up | normal: `` z ``, `` z ``, `` ``, `` Z ``, `` Z ``, select: `` z ``, `` z ``, `` ``, `` Z ``, `` Z `` | +| `page_cursor_half_down` | Move page and cursor half down | normal: `` z ``, `` z ``, `` ``, `` Z ``, `` Z ``, select: `` z ``, `` z ``, `` ``, `` Z ``, `` Z `` | +| `select_all` | Select whole document | normal: `` % ``, select: `` % `` | +| `select_regex` | Select all regex matches inside selections | normal: `` s ``, select: `` s `` | +| `split_selection` | Split selections on regex matches | normal: `` S ``, select: `` S `` | +| `split_selection_on_newline` | Split selection on newlines | normal: `` ``, select: `` `` | +| `merge_selections` | Merge selections | normal: `` ``, select: `` `` | +| `merge_consecutive_selections` | Merge consecutive selections | normal: `` ``, select: `` `` | +| `search` | Search for regex pattern | normal: `` z/ ``, `` / ``, `` Z/ ``, select: `` z/ ``, `` / ``, `` Z/ `` | +| `rsearch` | Reverse search for regex pattern | normal: `` z? ``, `` ? ``, `` Z? ``, select: `` z? ``, `` ? ``, `` Z? `` | +| `search_next` | Select next search match | normal: `` zn ``, `` n ``, `` Zn ``, select: `` zn ``, `` Zn `` | | `search_prev` | Select previous search match | normal: `` zN ``, `` N ``, `` ZN ``, select: `` zN ``, `` ZN `` | | `extend_search_next` | Add next search match to selection | select: `` n `` | | `extend_search_prev` | Add previous search match to selection | select: `` N `` | -| `search_selection` | Use current selection as search pattern | normal: `` * ``, normal: `` * `` | +| `search_selection` | Use current selection as search pattern | normal: `` * ``, select: `` * `` | | `make_search_word_bounded` | Modify current search to make it word bounded | | -| `global_search` | Global search in workspace folder | normal: `` / ``, normal: `` / `` | +| `global_search` | Global search in workspace folder | normal: `` / ``, select: `` / `` | | `extend_line` | Select current line, if already selected, extend to another line based on the anchor | | -| `extend_line_below` | Select current line, if already selected, extend to next line | normal: `` x ``, normal: `` x `` | +| `extend_line_below` | Select current line, if already selected, extend to next line | normal: `` x ``, select: `` x `` | | `extend_line_above` | Select current line, if already selected, extend to previous line | | | `select_line_above` | Select current line, if already selected, extend or shrink line above based on the anchor | | | `select_line_below` | Select current line, if already selected, extend or shrink line below based on the anchor | | -| `extend_to_line_bounds` | Extend selection to line bounds | normal: `` X ``, normal: `` X `` | -| `shrink_to_line_bounds` | Shrink selection to line bounds | normal: `` ``, normal: `` `` | -| `delete_selection` | Delete selection | normal: `` d ``, normal: `` d `` | -| `delete_selection_noyank` | Delete selection without yanking | normal: `` ``, normal: `` `` | -| `change_selection` | Change selection | normal: `` c ``, normal: `` c `` | -| `change_selection_noyank` | Change selection without yanking | normal: `` ``, normal: `` `` | -| `collapse_selection` | Collapse selection into single cursor | normal: `` ; ``, normal: `` ; `` | -| `flip_selections` | Flip selection cursor and anchor | normal: `` ``, normal: `` `` | -| `ensure_selections_forward` | Ensure all selections face forward | normal: `` ``, normal: `` `` | -| `insert_mode` | Insert before selection | normal: `` i ``, normal: `` i `` | -| `append_mode` | Append after selection | normal: `` a ``, normal: `` a `` | -| `command_mode` | Enter command mode | normal: `` : ``, normal: `` : `` | -| `file_picker` | Open file picker | normal: `` f ``, normal: `` f `` | +| `extend_to_line_bounds` | Extend selection to line bounds | normal: `` X ``, select: `` X `` | +| `shrink_to_line_bounds` | Shrink selection to line bounds | normal: `` ``, select: `` `` | +| `delete_selection` | Delete selection | normal: `` d ``, select: `` d `` | +| `delete_selection_noyank` | Delete selection without yanking | normal: `` ``, select: `` `` | +| `change_selection` | Change selection | normal: `` c ``, select: `` c `` | +| `change_selection_noyank` | Change selection without yanking | normal: `` ``, select: `` `` | +| `collapse_selection` | Collapse selection into single cursor | normal: `` ; ``, select: `` ; `` | +| `flip_selections` | Flip selection cursor and anchor | normal: `` ``, select: `` `` | +| `ensure_selections_forward` | Ensure all selections face forward | normal: `` ``, select: `` `` | +| `insert_mode` | Insert before selection | normal: `` i ``, select: `` i `` | +| `append_mode` | Append after selection | normal: `` a ``, select: `` a `` | +| `command_mode` | Enter command mode | normal: `` : ``, select: `` : `` | +| `file_picker` | Open file picker | normal: `` f ``, select: `` f `` | | `file_picker_in_current_buffer_directory` | Open file picker at current buffer's directory | | -| `file_picker_in_current_directory` | Open file picker at current working directory | normal: `` F ``, normal: `` F `` | -| `code_action` | Perform code action | normal: `` a ``, normal: `` a `` | -| `buffer_picker` | Open buffer picker | normal: `` b ``, normal: `` b `` | -| `jumplist_picker` | Open jumplist picker | normal: `` j ``, normal: `` j `` | -| `symbol_picker` | Open symbol picker | normal: `` s ``, normal: `` s `` | -| `changed_file_picker` | Open changed file picker | normal: `` g ``, normal: `` g `` | -| `select_references_to_symbol_under_cursor` | Select symbol references | normal: `` h ``, normal: `` h `` | -| `workspace_symbol_picker` | Open workspace symbol picker | normal: `` S ``, normal: `` S `` | -| `diagnostics_picker` | Open diagnostic picker | normal: `` d ``, normal: `` d `` | -| `workspace_diagnostics_picker` | Open workspace diagnostic picker | normal: `` D ``, normal: `` D `` | -| `last_picker` | Open last picker | normal: `` ' ``, normal: `` ' `` | -| `insert_at_line_start` | Insert at start of line | normal: `` I ``, normal: `` I `` | -| `insert_at_line_end` | Insert at end of line | normal: `` A ``, normal: `` A `` | -| `open_below` | Open new line below selection | normal: `` o ``, normal: `` o `` | -| `open_above` | Open new line above selection | normal: `` O ``, normal: `` O `` | -| `normal_mode` | Enter normal mode | normal: `` ``, select: `` v ``, normal: `` `` | +| `file_picker_in_current_directory` | Open file picker at current working directory | normal: `` F ``, select: `` F `` | +| `code_action` | Perform code action | normal: `` a ``, select: `` a `` | +| `buffer_picker` | Open buffer picker | normal: `` b ``, select: `` b `` | +| `jumplist_picker` | Open jumplist picker | normal: `` j ``, select: `` j `` | +| `symbol_picker` | Open symbol picker | normal: `` s ``, select: `` s `` | +| `changed_file_picker` | Open changed file picker | normal: `` g ``, select: `` g `` | +| `select_references_to_symbol_under_cursor` | Select symbol references | normal: `` h ``, select: `` h `` | +| `workspace_symbol_picker` | Open workspace symbol picker | normal: `` S ``, select: `` S `` | +| `diagnostics_picker` | Open diagnostic picker | normal: `` d ``, select: `` d `` | +| `workspace_diagnostics_picker` | Open workspace diagnostic picker | normal: `` D ``, select: `` D `` | +| `last_picker` | Open last picker | normal: `` ' ``, select: `` ' `` | +| `insert_at_line_start` | Insert at start of line | normal: `` I ``, select: `` I `` | +| `insert_at_line_end` | Insert at end of line | normal: `` A ``, select: `` A `` | +| `open_below` | Open new line below selection | normal: `` o ``, select: `` o `` | +| `open_above` | Open new line above selection | normal: `` O ``, select: `` O `` | +| `normal_mode` | Enter normal mode | normal: `` ``, select: `` v ``, insert: `` `` | | `select_mode` | Enter selection extend mode | normal: `` v `` | | `exit_select_mode` | Exit selection mode | select: `` `` | -| `goto_definition` | Goto definition | normal: `` gd ``, normal: `` gd `` | -| `goto_declaration` | Goto declaration | normal: `` gD ``, normal: `` gD `` | -| `add_newline_above` | Add newline above | normal: `` [ ``, normal: `` [ `` | -| `add_newline_below` | Add newline below | normal: `` ] ``, normal: `` ] `` | -| `goto_type_definition` | Goto type definition | normal: `` gy ``, normal: `` gy `` | -| `goto_implementation` | Goto implementation | normal: `` gi ``, normal: `` gi `` | -| `goto_file_start` | Goto line number else file start | normal: `` gg ``, normal: `` gg `` | +| `goto_definition` | Goto definition | normal: `` gd ``, select: `` gd `` | +| `goto_declaration` | Goto declaration | normal: `` gD ``, select: `` gD `` | +| `add_newline_above` | Add newline above | normal: `` [ ``, select: `` [ `` | +| `add_newline_below` | Add newline below | normal: `` ] ``, select: `` ] `` | +| `goto_type_definition` | Goto type definition | normal: `` gy ``, select: `` gy `` | +| `goto_implementation` | Goto implementation | normal: `` gi ``, select: `` gi `` | +| `goto_file_start` | Goto line number else file start | normal: `` gg ``, select: `` gg `` | | `goto_file_end` | Goto file end | | -| `goto_file` | Goto files/URLs in selections | normal: `` gf ``, normal: `` gf `` | -| `goto_file_hsplit` | Goto files in selections (hsplit) | normal: `` wf ``, `` f ``, normal: `` wf ``, `` f `` | -| `goto_file_vsplit` | Goto files in selections (vsplit) | normal: `` wF ``, `` F ``, normal: `` wF ``, `` F `` | -| `goto_reference` | Goto references | normal: `` gr ``, normal: `` gr `` | -| `goto_window_top` | Goto window top | normal: `` gt ``, normal: `` gt `` | -| `goto_window_center` | Goto window center | normal: `` gc ``, normal: `` gc `` | -| `goto_window_bottom` | Goto window bottom | normal: `` gb ``, normal: `` gb `` | -| `goto_last_accessed_file` | Goto last accessed file | normal: `` ga ``, normal: `` ga `` | -| `goto_last_modified_file` | Goto last modified file | normal: `` gm ``, normal: `` gm `` | -| `goto_last_modification` | Goto last modification | normal: `` g. ``, normal: `` g. `` | -| `goto_line` | Goto line | normal: `` G ``, normal: `` G `` | -| `goto_last_line` | Goto last line | normal: `` ge ``, normal: `` ge `` | -| `goto_first_diag` | Goto first diagnostic | normal: `` [D ``, normal: `` [D `` | -| `goto_last_diag` | Goto last diagnostic | normal: `` ]D ``, normal: `` ]D `` | -| `goto_next_diag` | Goto next diagnostic | normal: `` ]d ``, normal: `` ]d `` | -| `goto_prev_diag` | Goto previous diagnostic | normal: `` [d ``, normal: `` [d `` | -| `goto_next_change` | Goto next change | normal: `` ]g ``, normal: `` ]g `` | -| `goto_prev_change` | Goto previous change | normal: `` [g ``, normal: `` [g `` | -| `goto_first_change` | Goto first change | normal: `` [G ``, normal: `` [G `` | -| `goto_last_change` | Goto last change | normal: `` ]G ``, normal: `` ]G `` | +| `goto_file` | Goto files/URLs in selections | normal: `` gf ``, select: `` gf `` | +| `goto_file_hsplit` | Goto files in selections (hsplit) | normal: `` f ``, `` wf ``, select: `` f ``, `` wf `` | +| `goto_file_vsplit` | Goto files in selections (vsplit) | normal: `` F ``, `` wF ``, select: `` F ``, `` wF `` | +| `goto_reference` | Goto references | normal: `` gr ``, select: `` gr `` | +| `goto_window_top` | Goto window top | normal: `` gt ``, select: `` gt `` | +| `goto_window_center` | Goto window center | normal: `` gc ``, select: `` gc `` | +| `goto_window_bottom` | Goto window bottom | normal: `` gb ``, select: `` gb `` | +| `goto_last_accessed_file` | Goto last accessed file | normal: `` ga ``, select: `` ga `` | +| `goto_last_modified_file` | Goto last modified file | normal: `` gm ``, select: `` gm `` | +| `goto_last_modification` | Goto last modification | normal: `` g. ``, select: `` g. `` | +| `goto_line` | Goto line | normal: `` G ``, select: `` G `` | +| `goto_last_line` | Goto last line | normal: `` ge ``, select: `` ge `` | +| `goto_first_diag` | Goto first diagnostic | normal: `` [D ``, select: `` [D `` | +| `goto_last_diag` | Goto last diagnostic | normal: `` ]D ``, select: `` ]D `` | +| `goto_next_diag` | Goto next diagnostic | normal: `` ]d ``, select: `` ]d `` | +| `goto_prev_diag` | Goto previous diagnostic | normal: `` [d ``, select: `` [d `` | +| `goto_next_change` | Goto next change | normal: `` ]g ``, select: `` ]g `` | +| `goto_prev_change` | Goto previous change | normal: `` [g ``, select: `` [g `` | +| `goto_first_change` | Goto first change | normal: `` [G ``, select: `` [G `` | +| `goto_last_change` | Goto last change | normal: `` ]G ``, select: `` ]G `` | | `goto_line_start` | Goto line start | normal: `` ``, `` gh ``, select: `` gh ``, insert: `` `` | | `goto_line_end` | Goto line end | normal: `` ``, `` gl ``, select: `` gl `` | -| `goto_next_buffer` | Goto next buffer | normal: `` gn ``, normal: `` gn `` | -| `goto_previous_buffer` | Goto previous buffer | normal: `` gp ``, normal: `` gp `` | +| `goto_next_buffer` | Goto next buffer | normal: `` gn ``, select: `` gn `` | +| `goto_previous_buffer` | Goto previous buffer | normal: `` gp ``, select: `` gp `` | | `goto_line_end_newline` | Goto newline at line end | insert: `` `` | -| `goto_first_nonwhitespace` | Goto first non-blank in line | normal: `` gs ``, normal: `` gs `` | -| `trim_selections` | Trim whitespace from selections | normal: `` _ ``, normal: `` _ `` | +| `goto_first_nonwhitespace` | Goto first non-blank in line | normal: `` gs ``, select: `` gs `` | +| `trim_selections` | Trim whitespace from selections | normal: `` _ ``, select: `` _ `` | | `extend_to_line_start` | Extend to line start | select: `` `` | | `extend_to_first_nonwhitespace` | Extend to first non-blank in line | | | `extend_to_line_end` | Extend to line end | select: `` `` | @@ -159,135 +159,135 @@ | `smart_tab` | Insert tab if all cursors have all whitespace to their left; otherwise, run a separate command. | insert: `` `` | | `insert_tab` | Insert tab char | insert: `` `` | | `insert_newline` | Insert newline char | insert: `` ``, `` `` | -| `delete_char_backward` | Delete previous char | insert: `` ``, `` ``, `` `` | -| `delete_char_forward` | Delete next char | insert: `` ``, `` `` | +| `delete_char_backward` | Delete previous char | insert: `` ``, `` ``, `` `` | +| `delete_char_forward` | Delete next char | insert: `` ``, `` `` | | `delete_word_backward` | Delete previous word | insert: `` ``, `` `` | -| `delete_word_forward` | Delete next word | insert: `` ``, `` `` | +| `delete_word_forward` | Delete next word | insert: `` ``, `` `` | | `kill_to_line_start` | Delete till start of line | insert: `` `` | | `kill_to_line_end` | Delete till end of line | insert: `` `` | -| `undo` | Undo change | normal: `` u ``, normal: `` u `` | -| `redo` | Redo change | normal: `` U ``, normal: `` U `` | -| `earlier` | Move backward in history | normal: `` ``, normal: `` `` | -| `later` | Move forward in history | normal: `` ``, normal: `` `` | +| `undo` | Undo change | normal: `` u ``, select: `` u `` | +| `redo` | Redo change | normal: `` U ``, select: `` U `` | +| `earlier` | Move backward in history | normal: `` ``, select: `` `` | +| `later` | Move forward in history | normal: `` ``, select: `` `` | | `commit_undo_checkpoint` | Commit changes to new checkpoint | insert: `` `` | -| `yank` | Yank selection | normal: `` y ``, normal: `` y `` | -| `yank_to_clipboard` | Yank selections to clipboard | normal: `` y ``, normal: `` y `` | +| `yank` | Yank selection | normal: `` y ``, select: `` y `` | +| `yank_to_clipboard` | Yank selections to clipboard | normal: `` y ``, select: `` y `` | | `yank_to_primary_clipboard` | Yank selections to primary clipboard | | | `yank_joined` | Join and yank selections | | | `yank_joined_to_clipboard` | Join and yank selections to clipboard | | -| `yank_main_selection_to_clipboard` | Yank main selection to clipboard | normal: `` Y ``, normal: `` Y `` | +| `yank_main_selection_to_clipboard` | Yank main selection to clipboard | normal: `` Y ``, select: `` Y `` | | `yank_joined_to_primary_clipboard` | Join and yank selections to primary clipboard | | | `yank_main_selection_to_primary_clipboard` | Yank main selection to primary clipboard | | -| `replace_with_yanked` | Replace with yanked text | normal: `` R ``, normal: `` R `` | -| `replace_selections_with_clipboard` | Replace selections by clipboard content | normal: `` R ``, normal: `` R `` | +| `replace_with_yanked` | Replace with yanked text | normal: `` R ``, select: `` R `` | +| `replace_selections_with_clipboard` | Replace selections by clipboard content | normal: `` R ``, select: `` R `` | | `replace_selections_with_primary_clipboard` | Replace selections by primary clipboard | | -| `paste_after` | Paste after selection | normal: `` p ``, normal: `` p `` | -| `paste_before` | Paste before selection | normal: `` P ``, normal: `` P `` | -| `paste_clipboard_after` | Paste clipboard after selections | normal: `` p ``, normal: `` p `` | -| `paste_clipboard_before` | Paste clipboard before selections | normal: `` P ``, normal: `` P `` | +| `paste_after` | Paste after selection | normal: `` p ``, select: `` p `` | +| `paste_before` | Paste before selection | normal: `` P ``, select: `` P `` | +| `paste_clipboard_after` | Paste clipboard after selections | normal: `` p ``, select: `` p `` | +| `paste_clipboard_before` | Paste clipboard before selections | normal: `` P ``, select: `` P `` | | `paste_primary_clipboard_after` | Paste primary clipboard after selections | | | `paste_primary_clipboard_before` | Paste primary clipboard before selections | | -| `indent` | Indent selection | normal: `` ``, normal: `` `` | -| `unindent` | Unindent selection | normal: `` ``, normal: `` `` | -| `format_selections` | Format selection | normal: `` = ``, normal: `` = `` | -| `join_selections` | Join lines inside selection | normal: `` J ``, normal: `` J `` | -| `join_selections_space` | Join lines inside selection and select spaces | normal: `` ``, normal: `` `` | -| `keep_selections` | Keep selections matching regex | normal: `` K ``, normal: `` K `` | -| `remove_selections` | Remove selections matching regex | normal: `` ``, normal: `` `` | -| `align_selections` | Align selections in column | normal: `` & ``, normal: `` & `` | -| `keep_primary_selection` | Keep primary selection | normal: `` , ``, normal: `` , `` | -| `remove_primary_selection` | Remove primary selection | normal: `` ``, normal: `` `` | +| `indent` | Indent selection | normal: `` ``, select: `` `` | +| `unindent` | Unindent selection | normal: `` ``, select: `` `` | +| `format_selections` | Format selection | normal: `` = ``, select: `` = `` | +| `join_selections` | Join lines inside selection | normal: `` J ``, select: `` J `` | +| `join_selections_space` | Join lines inside selection and select spaces | normal: `` ``, select: `` `` | +| `keep_selections` | Keep selections matching regex | normal: `` K ``, select: `` K `` | +| `remove_selections` | Remove selections matching regex | normal: `` ``, select: `` `` | +| `align_selections` | Align selections in column | normal: `` & ``, select: `` & `` | +| `keep_primary_selection` | Keep primary selection | normal: `` , ``, select: `` , `` | +| `remove_primary_selection` | Remove primary selection | normal: `` ``, select: `` `` | | `completion` | Invoke completion popup | insert: `` `` | -| `hover` | Show docs for item under cursor | normal: `` k ``, normal: `` k `` | -| `toggle_comments` | Comment/uncomment selections | normal: `` c ``, `` ``, normal: `` c ``, `` `` | -| `toggle_line_comments` | Line comment/uncomment selections | normal: `` ``, normal: `` `` | -| `toggle_block_comments` | Block comment/uncomment selections | normal: `` C ``, normal: `` C `` | -| `rotate_selections_forward` | Rotate selections forward | normal: `` ) ``, normal: `` ) `` | -| `rotate_selections_backward` | Rotate selections backward | normal: `` ( ``, normal: `` ( `` | -| `rotate_selection_contents_forward` | Rotate selection contents forward | normal: `` ``, normal: `` `` | -| `rotate_selection_contents_backward` | Rotate selections contents backward | normal: `` ``, normal: `` `` | +| `hover` | Show docs for item under cursor | normal: `` k ``, select: `` k `` | +| `toggle_comments` | Comment/uncomment selections | normal: `` ``, `` c ``, select: `` ``, `` c `` | +| `toggle_line_comments` | Line comment/uncomment selections | normal: `` ``, select: `` `` | +| `toggle_block_comments` | Block comment/uncomment selections | normal: `` C ``, select: `` C `` | +| `rotate_selections_forward` | Rotate selections forward | normal: `` ) ``, select: `` ) `` | +| `rotate_selections_backward` | Rotate selections backward | normal: `` ( ``, select: `` ( `` | +| `rotate_selection_contents_forward` | Rotate selection contents forward | normal: `` ``, select: `` `` | +| `rotate_selection_contents_backward` | Rotate selections contents backward | normal: `` ``, select: `` `` | | `reverse_selection_contents` | Reverse selections contents | | -| `expand_selection` | Expand selection to parent syntax node | normal: `` ``, `` ``, normal: `` ``, `` `` | -| `shrink_selection` | Shrink selection to previously expanded syntax node | normal: `` ``, `` ``, normal: `` ``, `` `` | -| `select_next_sibling` | Select next sibling in the syntax tree | normal: `` ``, `` ``, normal: `` ``, `` `` | -| `select_prev_sibling` | Select previous sibling the in syntax tree | normal: `` ``, `` ``, normal: `` ``, `` `` | -| `select_all_siblings` | Select all siblings of the current node | normal: `` ``, normal: `` `` | -| `select_all_children` | Select all children of the current node | normal: `` ``, `` ``, normal: `` ``, `` `` | -| `jump_forward` | Jump forward on jumplist | normal: `` ``, `` ``, normal: `` ``, `` `` | -| `jump_backward` | Jump backward on jumplist | normal: `` ``, normal: `` `` | -| `save_selection` | Save current selection to jumplist | normal: `` ``, normal: `` `` | -| `jump_view_right` | Jump to right split | normal: `` wl ``, `` w ``, `` w ``, `` l ``, `` ``, `` ``, normal: `` wl ``, `` w ``, `` w ``, `` l ``, `` ``, `` `` | -| `jump_view_left` | Jump to left split | normal: `` w ``, `` w ``, `` wh ``, `` h ``, `` ``, `` ``, normal: `` w ``, `` w ``, `` wh ``, `` h ``, `` ``, `` `` | -| `jump_view_up` | Jump to split above | normal: `` w ``, `` wk ``, `` w ``, `` k ``, `` ``, `` ``, normal: `` w ``, `` wk ``, `` w ``, `` k ``, `` ``, `` `` | -| `jump_view_down` | Jump to split below | normal: `` wj ``, `` w ``, `` w ``, `` j ``, `` ``, `` ``, normal: `` wj ``, `` w ``, `` w ``, `` j ``, `` ``, `` `` | -| `swap_view_right` | Swap with right split | normal: `` wL ``, `` L ``, normal: `` wL ``, `` L `` | -| `swap_view_left` | Swap with left split | normal: `` wH ``, `` H ``, normal: `` wH ``, `` H `` | -| `swap_view_up` | Swap with split above | normal: `` wK ``, `` K ``, normal: `` wK ``, `` K `` | -| `swap_view_down` | Swap with split below | normal: `` wJ ``, `` J ``, normal: `` wJ ``, `` J `` | -| `transpose_view` | Transpose splits | normal: `` wt ``, `` w ``, `` ``, `` t ``, normal: `` wt ``, `` w ``, `` ``, `` t `` | -| `rotate_view` | Goto next window | normal: `` ww ``, `` w ``, `` w ``, `` ``, normal: `` ww ``, `` w ``, `` w ``, `` `` | +| `expand_selection` | Expand selection to parent syntax node | normal: `` ``, `` ``, select: `` ``, `` `` | +| `shrink_selection` | Shrink selection to previously expanded syntax node | normal: `` ``, `` ``, select: `` ``, `` `` | +| `select_next_sibling` | Select next sibling in the syntax tree | normal: `` ``, `` ``, select: `` ``, `` `` | +| `select_prev_sibling` | Select previous sibling the in syntax tree | normal: `` ``, `` ``, select: `` ``, `` `` | +| `select_all_siblings` | Select all siblings of the current node | normal: `` ``, select: `` `` | +| `select_all_children` | Select all children of the current node | normal: `` ``, `` ``, select: `` ``, `` `` | +| `jump_forward` | Jump forward on jumplist | normal: `` ``, `` ``, select: `` ``, `` `` | +| `jump_backward` | Jump backward on jumplist | normal: `` ``, select: `` `` | +| `save_selection` | Save current selection to jumplist | normal: `` ``, select: `` `` | +| `jump_view_right` | Jump to right split | normal: `` ``, `` l ``, `` ``, `` w ``, `` w ``, `` wl ``, select: `` ``, `` l ``, `` ``, `` w ``, `` w ``, `` wl `` | +| `jump_view_left` | Jump to left split | normal: `` ``, `` ``, `` h ``, `` wh ``, `` w ``, `` w ``, select: `` ``, `` ``, `` h ``, `` wh ``, `` w ``, `` w `` | +| `jump_view_up` | Jump to split above | normal: `` k ``, `` ``, `` ``, `` w ``, `` wk ``, `` w ``, select: `` k ``, `` ``, `` ``, `` w ``, `` wk ``, `` w `` | +| `jump_view_down` | Jump to split below | normal: `` ``, `` j ``, `` ``, `` wj ``, `` w ``, `` w ``, select: `` ``, `` j ``, `` ``, `` wj ``, `` w ``, `` w `` | +| `swap_view_right` | Swap with right split | normal: `` L ``, `` wL ``, select: `` L ``, `` wL `` | +| `swap_view_left` | Swap with left split | normal: `` H ``, `` wH ``, select: `` H ``, `` wH `` | +| `swap_view_up` | Swap with split above | normal: `` K ``, `` wK ``, select: `` K ``, `` wK `` | +| `swap_view_down` | Swap with split below | normal: `` J ``, `` wJ ``, select: `` J ``, `` wJ `` | +| `transpose_view` | Transpose splits | normal: `` t ``, `` ``, `` wt ``, `` w ``, select: `` t ``, `` ``, `` wt ``, `` w `` | +| `rotate_view` | Goto next window | normal: `` w ``, `` ``, `` w ``, `` ww ``, select: `` w ``, `` ``, `` w ``, `` ww `` | | `rotate_view_reverse` | Goto previous window | | -| `hsplit` | Horizontal bottom split | normal: `` ws ``, `` w ``, `` ``, `` s ``, normal: `` ws ``, `` w ``, `` ``, `` s `` | -| `hsplit_new` | Horizontal bottom split scratch buffer | normal: `` wn ``, `` wns ``, `` n ``, `` ns ``, normal: `` wn ``, `` wns ``, `` n ``, `` ns `` | -| `vsplit` | Vertical right split | normal: `` w ``, `` wv ``, `` v ``, `` ``, normal: `` w ``, `` wv ``, `` v ``, `` `` | -| `vsplit_new` | Vertical right split scratch buffer | normal: `` wn ``, `` wnv ``, `` nv ``, `` n ``, normal: `` wn ``, `` wnv ``, `` nv ``, `` n `` | -| `wclose` | Close window | normal: `` wq ``, `` w ``, `` ``, `` q ``, normal: `` wq ``, `` w ``, `` ``, `` q `` | -| `wonly` | Close windows except current | normal: `` w ``, `` wo ``, `` o ``, `` ``, normal: `` w ``, `` wo ``, `` o ``, `` `` | -| `select_register` | Select register | normal: `` " ``, normal: `` " `` | +| `hsplit` | Horizontal bottom split | normal: `` s ``, `` ``, `` ws ``, `` w ``, select: `` s ``, `` ``, `` ws ``, `` w `` | +| `hsplit_new` | Horizontal bottom split scratch buffer | normal: `` ns ``, `` n ``, `` wn ``, `` wns ``, select: `` ns ``, `` n ``, `` wn ``, `` wns `` | +| `vsplit` | Vertical right split | normal: `` ``, `` v ``, `` wv ``, `` w ``, select: `` ``, `` v ``, `` wv ``, `` w `` | +| `vsplit_new` | Vertical right split scratch buffer | normal: `` n ``, `` nv ``, `` wn ``, `` wnv ``, select: `` n ``, `` nv ``, `` wn ``, `` wnv `` | +| `wclose` | Close window | normal: `` ``, `` q ``, `` wq ``, `` w ``, select: `` ``, `` q ``, `` wq ``, `` w `` | +| `wonly` | Close windows except current | normal: `` o ``, `` ``, `` wo ``, `` w ``, select: `` o ``, `` ``, `` wo ``, `` w `` | +| `select_register` | Select register | normal: `` " ``, select: `` " `` | | `insert_register` | Insert register | insert: `` `` | -| `align_view_middle` | Align view middle | normal: `` zm ``, `` Zm ``, normal: `` zm ``, `` Zm `` | -| `align_view_top` | Align view top | normal: `` zt ``, `` Zt ``, normal: `` zt ``, `` Zt `` | -| `align_view_center` | Align view center | normal: `` zc ``, `` zz ``, `` Zz ``, `` Zc ``, normal: `` zc ``, `` zz ``, `` Zz ``, `` Zc `` | -| `align_view_bottom` | Align view bottom | normal: `` zb ``, `` Zb ``, normal: `` zb ``, `` Zb `` | -| `scroll_up` | Scroll view up | normal: `` zk ``, `` z ``, `` Z ``, `` Zk ``, normal: `` zk ``, `` z ``, `` Z ``, `` Zk `` | -| `scroll_down` | Scroll view down | normal: `` z ``, `` zj ``, `` Z ``, `` Zj ``, normal: `` z ``, `` zj ``, `` Z ``, `` Zj `` | -| `match_brackets` | Goto matching bracket | normal: `` mm ``, normal: `` mm `` | -| `surround_add` | Surround add | normal: `` ms ``, normal: `` ms `` | -| `surround_replace` | Surround replace | normal: `` mr ``, normal: `` mr `` | -| `surround_delete` | Surround delete | normal: `` md ``, normal: `` md `` | -| `select_textobject_around` | Select around object | normal: `` ma ``, normal: `` ma `` | -| `select_textobject_inner` | Select inside object | normal: `` mi ``, normal: `` mi `` | -| `goto_next_function` | Goto next function | normal: `` ]f ``, normal: `` ]f `` | -| `goto_prev_function` | Goto previous function | normal: `` [f ``, normal: `` [f `` | -| `goto_next_class` | Goto next type definition | normal: `` ]t ``, normal: `` ]t `` | -| `goto_prev_class` | Goto previous type definition | normal: `` [t ``, normal: `` [t `` | -| `goto_next_parameter` | Goto next parameter | normal: `` ]a ``, normal: `` ]a `` | -| `goto_prev_parameter` | Goto previous parameter | normal: `` [a ``, normal: `` [a `` | -| `goto_next_comment` | Goto next comment | normal: `` ]c ``, normal: `` ]c `` | -| `goto_prev_comment` | Goto previous comment | normal: `` [c ``, normal: `` [c `` | -| `goto_next_test` | Goto next test | normal: `` ]T ``, normal: `` ]T `` | -| `goto_prev_test` | Goto previous test | normal: `` [T ``, normal: `` [T `` | -| `goto_next_entry` | Goto next pairing | normal: `` ]e ``, normal: `` ]e `` | -| `goto_prev_entry` | Goto previous pairing | normal: `` [e ``, normal: `` [e `` | -| `goto_next_paragraph` | Goto next paragraph | normal: `` ]p ``, normal: `` ]p `` | -| `goto_prev_paragraph` | Goto previous paragraph | normal: `` [p ``, normal: `` [p `` | -| `dap_launch` | Launch debug target | normal: `` Gl ``, normal: `` Gl `` | -| `dap_restart` | Restart debugging session | normal: `` Gr ``, normal: `` Gr `` | -| `dap_toggle_breakpoint` | Toggle breakpoint | normal: `` Gb ``, normal: `` Gb `` | -| `dap_continue` | Continue program execution | normal: `` Gc ``, normal: `` Gc `` | -| `dap_pause` | Pause program execution | normal: `` Gh ``, normal: `` Gh `` | -| `dap_step_in` | Step in | normal: `` Gi ``, normal: `` Gi `` | -| `dap_step_out` | Step out | normal: `` Go ``, normal: `` Go `` | -| `dap_next` | Step to next | normal: `` Gn ``, normal: `` Gn `` | -| `dap_variables` | List variables | normal: `` Gv ``, normal: `` Gv `` | -| `dap_terminate` | End debug session | normal: `` Gt ``, normal: `` Gt `` | -| `dap_edit_condition` | Edit breakpoint condition on current line | normal: `` G ``, normal: `` G `` | -| `dap_edit_log` | Edit breakpoint log message on current line | normal: `` G ``, normal: `` G `` | -| `dap_switch_thread` | Switch current thread | normal: `` Gst ``, normal: `` Gst `` | -| `dap_switch_stack_frame` | Switch stack frame | normal: `` Gsf ``, normal: `` Gsf `` | -| `dap_enable_exceptions` | Enable exception breakpoints | normal: `` Ge ``, normal: `` Ge `` | -| `dap_disable_exceptions` | Disable exception breakpoints | normal: `` GE ``, normal: `` GE `` | -| `shell_pipe` | Pipe selections through shell command | normal: `` | ``, normal: `` | `` | -| `shell_pipe_to` | Pipe selections into shell command ignoring output | normal: `` ``, normal: `` `` | -| `shell_insert_output` | Insert shell command output before selections | normal: `` ! ``, normal: `` ! `` | -| `shell_append_output` | Append shell command output after selections | normal: `` ``, normal: `` `` | -| `shell_keep_pipe` | Filter selections with shell predicate | normal: `` $ ``, normal: `` $ `` | -| `suspend` | Suspend and return to shell | normal: `` ``, normal: `` `` | -| `rename_symbol` | Rename symbol | normal: `` r ``, normal: `` r `` | -| `increment` | Increment item under cursor | normal: `` ``, normal: `` `` | -| `decrement` | Decrement item under cursor | normal: `` ``, normal: `` `` | -| `record_macro` | Record macro | normal: `` Q ``, normal: `` Q `` | -| `replay_macro` | Replay macro | normal: `` q ``, normal: `` q `` | -| `command_palette` | Open command palette | normal: `` ? ``, normal: `` ? `` | +| `align_view_middle` | Align view middle | normal: `` zm ``, `` Zm ``, select: `` zm ``, `` Zm `` | +| `align_view_top` | Align view top | normal: `` zt ``, `` Zt ``, select: `` zt ``, `` Zt `` | +| `align_view_center` | Align view center | normal: `` zc ``, `` zz ``, `` Zz ``, `` Zc ``, select: `` zc ``, `` zz ``, `` Zz ``, `` Zc `` | +| `align_view_bottom` | Align view bottom | normal: `` zb ``, `` Zb ``, select: `` zb ``, `` Zb `` | +| `scroll_up` | Scroll view up | normal: `` zk ``, `` z ``, `` Z ``, `` Zk ``, select: `` zk ``, `` z ``, `` Z ``, `` Zk `` | +| `scroll_down` | Scroll view down | normal: `` zj ``, `` z ``, `` Zj ``, `` Z ``, select: `` zj ``, `` z ``, `` Zj ``, `` Z `` | +| `match_brackets` | Goto matching bracket | normal: `` mm ``, select: `` mm `` | +| `surround_add` | Surround add | normal: `` ms ``, select: `` ms `` | +| `surround_replace` | Surround replace | normal: `` mr ``, select: `` mr `` | +| `surround_delete` | Surround delete | normal: `` md ``, select: `` md `` | +| `select_textobject_around` | Select around object | normal: `` ma ``, select: `` ma `` | +| `select_textobject_inner` | Select inside object | normal: `` mi ``, select: `` mi `` | +| `goto_next_function` | Goto next function | normal: `` ]f ``, select: `` ]f `` | +| `goto_prev_function` | Goto previous function | normal: `` [f ``, select: `` [f `` | +| `goto_next_class` | Goto next type definition | normal: `` ]t ``, select: `` ]t `` | +| `goto_prev_class` | Goto previous type definition | normal: `` [t ``, select: `` [t `` | +| `goto_next_parameter` | Goto next parameter | normal: `` ]a ``, select: `` ]a `` | +| `goto_prev_parameter` | Goto previous parameter | normal: `` [a ``, select: `` [a `` | +| `goto_next_comment` | Goto next comment | normal: `` ]c ``, select: `` ]c `` | +| `goto_prev_comment` | Goto previous comment | normal: `` [c ``, select: `` [c `` | +| `goto_next_test` | Goto next test | normal: `` ]T ``, select: `` ]T `` | +| `goto_prev_test` | Goto previous test | normal: `` [T ``, select: `` [T `` | +| `goto_next_entry` | Goto next pairing | normal: `` ]e ``, select: `` ]e `` | +| `goto_prev_entry` | Goto previous pairing | normal: `` [e ``, select: `` [e `` | +| `goto_next_paragraph` | Goto next paragraph | normal: `` ]p ``, select: `` ]p `` | +| `goto_prev_paragraph` | Goto previous paragraph | normal: `` [p ``, select: `` [p `` | +| `dap_launch` | Launch debug target | normal: `` Gl ``, select: `` Gl `` | +| `dap_restart` | Restart debugging session | normal: `` Gr ``, select: `` Gr `` | +| `dap_toggle_breakpoint` | Toggle breakpoint | normal: `` Gb ``, select: `` Gb `` | +| `dap_continue` | Continue program execution | normal: `` Gc ``, select: `` Gc `` | +| `dap_pause` | Pause program execution | normal: `` Gh ``, select: `` Gh `` | +| `dap_step_in` | Step in | normal: `` Gi ``, select: `` Gi `` | +| `dap_step_out` | Step out | normal: `` Go ``, select: `` Go `` | +| `dap_next` | Step to next | normal: `` Gn ``, select: `` Gn `` | +| `dap_variables` | List variables | normal: `` Gv ``, select: `` Gv `` | +| `dap_terminate` | End debug session | normal: `` Gt ``, select: `` Gt `` | +| `dap_edit_condition` | Edit breakpoint condition on current line | normal: `` G ``, select: `` G `` | +| `dap_edit_log` | Edit breakpoint log message on current line | normal: `` G ``, select: `` G `` | +| `dap_switch_thread` | Switch current thread | normal: `` Gst ``, select: `` Gst `` | +| `dap_switch_stack_frame` | Switch stack frame | normal: `` Gsf ``, select: `` Gsf `` | +| `dap_enable_exceptions` | Enable exception breakpoints | normal: `` Ge ``, select: `` Ge `` | +| `dap_disable_exceptions` | Disable exception breakpoints | normal: `` GE ``, select: `` GE `` | +| `shell_pipe` | Pipe selections through shell command | normal: `` | ``, select: `` | `` | +| `shell_pipe_to` | Pipe selections into shell command ignoring output | normal: `` ``, select: `` `` | +| `shell_insert_output` | Insert shell command output before selections | normal: `` ! ``, select: `` ! `` | +| `shell_append_output` | Append shell command output after selections | normal: `` ``, select: `` `` | +| `shell_keep_pipe` | Filter selections with shell predicate | normal: `` $ ``, select: `` $ `` | +| `suspend` | Suspend and return to shell | normal: `` ``, select: `` `` | +| `rename_symbol` | Rename symbol | normal: `` r ``, select: `` r `` | +| `increment` | Increment item under cursor | normal: `` ``, select: `` `` | +| `decrement` | Decrement item under cursor | normal: `` ``, select: `` `` | +| `record_macro` | Record macro | normal: `` Q ``, select: `` Q `` | +| `replay_macro` | Replay macro | normal: `` q ``, select: `` q `` | +| `command_palette` | Open command palette | normal: `` ? ``, select: `` ? `` | | `goto_word` | Jump to a two-character label | normal: `` gw `` | | `extend_to_word` | Extend to a two-character label | select: `` gw `` | diff --git a/xtask/src/docgen.rs b/xtask/src/docgen.rs index 4cd208129..a52c1165d 100644 --- a/xtask/src/docgen.rs +++ b/xtask/src/docgen.rs @@ -70,12 +70,10 @@ pub fn static_commands() -> Result { ])); for cmd in MappableCommand::STATIC_COMMAND_LIST { - let keymap_strings: Vec = keymaps + let keymap_strings: Vec<_> = keymaps .iter() - .enumerate() - .map(|(_, keymap)| { - keymap - .1 + .map(|(mode, keymap)| { + let bindings = keymap .get(cmd.name()) .map(|bindings| { bindings.iter().fold(String::new(), |mut acc, bind| { @@ -90,22 +88,16 @@ pub fn static_commands() -> Result { acc }) }) - .unwrap_or_default() + .unwrap_or_default(); + + (mode, bindings) }) .collect(); let keymap_string = keymap_strings .iter() - .filter(|s| !s.is_empty()) - .map(|s| { - let mode = match keymap_strings.iter().position(|t| t == s) { - Some(0) => "normal", - Some(1) => "select", - Some(2) => "insert", - _ => unreachable!(), - }; - format!("{}: {}", mode, s) - }) + .filter(|(_, bindings)| !bindings.is_empty()) + .map(|(mode, bindings)| format!("{}: {}", mode, bindings)) .collect::>() .join(", ");