Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shorten embedded command descriptions #3070

Merged
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions book/src/generated/typable-cmd.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
| Name | Description |
| --- | --- |
| `:quit`, `:q` | Close the current view. |
| `:quit!`, `:q!` | Close the current view forcefully (ignoring unsaved changes). |
| `:quit!`, `:q!` | Force close the current view, ignoring unsaved changes. |
| `:open`, `:o` | Open a file from disk into the current view. |
| `:buffer-close`, `:bc`, `:bclose` | Close the current buffer. |
| `:buffer-close!`, `:bc!`, `:bclose!` | Close the current buffer forcefully (ignoring unsaved changes). |
| `:buffer-close!`, `:bc!`, `:bclose!` | Close the current buffer forcefully, ignoring unsaved changes. |
| `:buffer-close-others`, `:bco`, `:bcloseother` | Close all buffers but the currently focused one. |
| `:buffer-close-others!`, `:bco!`, `:bcloseother!` | Close all buffers but the currently focused one. |
| `:buffer-close-all`, `:bca`, `:bcloseall` | Close all buffers, without quitting. |
| `:buffer-close-all!`, `:bca!`, `:bcloseall!` | Close all buffers forcefully (ignoring unsaved changes), without quitting. |
| `:buffer-next`, `:bn`, `:bnext` | Go to next buffer. |
| `:buffer-previous`, `:bp`, `:bprev` | Go to previous buffer. |
| `:buffer-close-others!`, `:bco!`, `:bcloseother!` | Force close all buffers but the currently focused one. |
| `:buffer-close-all`, `:bca`, `:bcloseall` | Close all buffers without quitting. |
| `:buffer-close-all!`, `:bca!`, `:bcloseall!` | Force close all buffers ignoring unsaved changes without quitting. |
| `:buffer-next`, `:bn`, `:bnext` | Goto next buffer. |
| `:buffer-previous`, `:bp`, `:bprev` | Goto previous buffer. |
| `:write`, `:w` | Write changes to disk. Accepts an optional path (:write some/path.txt) |
| `:write!`, `:w!` | Write changes to disk forcefully (creating necessary subdirectories). Accepts an optional path (:write some/path.txt) |
| `:write!`, `:w!` | Force write changes to disk creating necessary subdirectories. Accepts an optional path (:write some/path.txt) |
| `:new`, `:n` | Create a new scratch buffer. |
| `:format`, `:fmt` | Format the file using the LSP formatter. |
| `:indent-style` | Set the indentation style for editing. ('t' for tabs or 1-8 for number of spaces.) |
Expand All @@ -25,9 +25,9 @@
| `:write-quit-all`, `:wqa`, `:xa` | Write changes from all buffers to disk and close all views. |
| `:write-quit-all!`, `:wqa!`, `:xa!` | Write changes from all buffers to disk and close all views forcefully (ignoring unsaved changes). |
| `:quit-all`, `:qa` | Close all views. |
| `:quit-all!`, `:qa!` | Close all views forcefully (ignoring unsaved changes). |
| `:quit-all!`, `:qa!` | Force close all views ignoring unsaved changes. |
| `:cquit`, `:cq` | Quit with exit code (default 1). Accepts an optional integer exit code (:cq 2). |
| `:cquit!`, `:cq!` | Quit with exit code (default 1) forcefully (ignoring unsaved changes). Accepts an optional integer exit code (:cq! 2). |
| `:cquit!`, `:cq!` | Force quit with exit code (default 1) ignoring unsaved changes. Accepts an optional integer exit code (:cq! 2). |
| `:theme` | Change the editor theme. |
| `:clipboard-yank` | Yank main selection into system clipboard. |
| `:clipboard-yank-join` | Yank joined selections into system clipboard. A separator can be provided as first argument. Default value is newline. |
Expand All @@ -42,7 +42,7 @@
| `:show-clipboard-provider` | Show clipboard provider name in status bar. |
| `:change-current-directory`, `:cd` | Change the current working directory. |
| `:show-directory`, `:pwd` | Show the current working directory. |
| `:encoding` | Set encoding based on `https://encoding.spec.whatwg.org` |
| `:encoding` | Set encoding. Based on `https://encoding.spec.whatwg.org`. |
| `:reload` | Discard changes and reload from the source file. |
| `:tree-sitter-scopes` | Display tree sitter scopes, primarily for theming and development. |
| `:debug-start`, `:dbg` | Start a debug session from a given template with given parameters. |
Expand All @@ -53,16 +53,16 @@
| `:hsplit`, `:hs`, `:sp` | Open the file in a horizontal split. |
| `:hsplit-new`, `:hnew` | Open a scratch buffer in a horizontal split. |
| `:tutor` | Open the tutorial. |
| `:goto`, `:g` | Go to line number. |
| `:goto`, `:g` | Goto line number. |
| `:set-language`, `:lang` | Set the language of current buffer. |
| `:set-option`, `:set` | Set a config option at runtime.<br>For example to disable smart case search, use `:set search.smart-case false`. |
| `:get-option`, `:get` | Get the current value of a config option. |
| `:sort` | Sort ranges in selection. |
| `:rsort` | Sort ranges in selection in reverse order. |
| `:reflow` | Hard-wrap the current selection of lines to a given width. |
| `:tree-sitter-subtree`, `:ts-subtree` | Display tree sitter subtree under cursor, primarily for debugging queries. |
| `:config-reload` | Refreshes helix's config. |
| `:config-open` | Open the helix config.toml file. |
| `:config-reload` | Refresh user config. |
| `:config-open` | Open the user config.toml file. |
| `:log-open` | Open the helix log file. |
| `:insert-output` | Run shell command, inserting output after each selection. |
| `:append-output` | Run shell command, appending output after each selection. |
Expand Down
88 changes: 44 additions & 44 deletions helix-term/src/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -204,17 +204,17 @@ impl MappableCommand {
extend_line_down, "Extend down",
copy_selection_on_next_line, "Copy selection on next line",
copy_selection_on_prev_line, "Copy selection on previous line",
move_next_word_start, "Move to beginning of next word",
move_prev_word_start, "Move to beginning of previous word",
move_next_word_start, "Move to start of next word",
move_prev_word_start, "Move to start of previous word",
move_prev_word_end, "Move to end of previous word",
move_next_word_end, "Move to end of next word",
move_next_long_word_start, "Move to beginning of next long word",
move_prev_long_word_start, "Move to beginning of previous long word",
move_next_long_word_start, "Move to start of next long word",
move_prev_long_word_start, "Move to start of previous long word",
move_next_long_word_end, "Move to end of next long word",
extend_next_word_start, "Extend to beginning of next word",
extend_prev_word_start, "Extend to beginning of previous word",
extend_next_long_word_start, "Extend to beginning of next long word",
extend_prev_long_word_start, "Extend to beginning of previous long word",
extend_next_word_start, "Extend to start of next word",
extend_prev_word_start, "Extend to start of previous word",
extend_next_long_word_start, "Extend to start of next long word",
extend_prev_long_word_start, "Extend to start of previous long word",
extend_next_long_word_end, "Extend to end of next long word",
extend_next_word_end, "Extend to end of next word",
find_till_char, "Move till next occurrence of char",
Expand All @@ -225,7 +225,7 @@ impl MappableCommand {
find_prev_char, "Move to previous occurrence of char",
extend_till_prev_char, "Extend till previous occurrence of char",
extend_prev_char, "Extend to previous occurrence of char",
repeat_last_motion, "repeat last motion(extend_next_char, extend_till_char, find_next_char, find_till_char...)",
repeat_last_motion, "Repeat last motion",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Somewhat unrelated to the change here, this tends to be a source of confusion that A-. doesn't work on motions like w, just on these find-type motions (same behavior as Kakoune). Maybe we should have a different word for those kinds of motions?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There seems to be some inconsistency in the implementation though, since it works with shrink/expand syntax node selection and all textobjects in addition to the find type motions. Shouldn't repeat_last_motion repeat any kind of motion, including w, b, etc? Is there any particular reason kakoune chose to go that way?

replace, "Replace with new char",
switch_case, "Switch (toggle) case",
switch_to_uppercase, "Switch to uppercase",
Expand All @@ -236,7 +236,7 @@ impl MappableCommand {
half_page_down, "Move half page down",
select_all, "Select whole document",
select_regex, "Select all regex matches inside selections",
split_selection, "Split selection into subselections on regex matches",
split_selection, "Split selections on regex matches",
split_selection_on_newline, "Split selection on newlines",
search, "Search for regex pattern",
rsearch, "Reverse search for regex pattern",
Expand All @@ -245,20 +245,20 @@ impl MappableCommand {
extend_search_next, "Add next search match to selection",
extend_search_prev, "Add previous search match to selection",
search_selection, "Use current selection as search pattern",
global_search, "Global Search in workspace folder",
global_search, "Global search in workspace folder",
extend_line, "Select current line, if already selected, extend to next line",
extend_line_above, "Select current line, if already selected, extend to previous line",
extend_to_line_bounds, "Extend selection to line bounds (line-wise selection)",
shrink_to_line_bounds, "Shrink selection to line bounds (line-wise selection)",
extend_to_line_bounds, "Extend selection to line bounds",
shrink_to_line_bounds, "Shrink selection to line bounds",
delete_selection, "Delete selection",
delete_selection_noyank, "Delete selection, without yanking",
change_selection, "Change selection (delete and enter insert mode)",
change_selection_noyank, "Change selection (delete and enter insert mode, without yanking)",
collapse_selection, "Collapse selection onto a single cursor",
delete_selection_noyank, "Delete selection without yanking",
change_selection, "Change selection",
change_selection_noyank, "Change selection without yanking",
collapse_selection, "Collapse selection into single cursor",
flip_selections, "Flip selection cursor and anchor",
ensure_selections_forward, "Ensure the selection is in forward direction",
ensure_selections_forward, "Ensure all selections face forward",
insert_mode, "Insert before selection",
append_mode, "Insert after selection (append)",
append_mode, "Append after selection",
command_mode, "Enter command mode",
file_picker, "Open file picker",
file_picker_in_current_directory, "Open file picker at current working directory",
Expand All @@ -271,7 +271,7 @@ impl MappableCommand {
workspace_diagnostics_picker, "Open workspace diagnostic picker",
last_picker, "Open last picker",
prepend_to_line, "Insert at start of line",
append_to_line, "Insert at end of line",
append_to_line, "Append to end of line",
open_below, "Open new line below selection",
open_above, "Open new line above selection",
normal_mode, "Enter normal mode",
Expand Down Expand Up @@ -318,21 +318,21 @@ impl MappableCommand {
delete_char_forward, "Delete next char",
delete_word_backward, "Delete previous word",
delete_word_forward, "Delete next word",
kill_to_line_start, "Delete content till the start of the line",
kill_to_line_end, "Delete content till the end of the line",
kill_to_line_start, "Delete till start of line",
kill_to_line_end, "Delete till end of line",
undo, "Undo change",
redo, "Redo change",
earlier, "Move backward in history",
later, "Move forward in history",
commit_undo_checkpoint, "Commit changes to a new checkpoint",
commit_undo_checkpoint, "Commit changes to new checkpoint",
yank, "Yank selection",
yank_joined_to_clipboard, "Join and yank selections to clipboard",
yank_main_selection_to_clipboard, "Yank main selection to clipboard",
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",
replace_selections_with_clipboard, "Replace selections by clipboard content",
replace_selections_with_primary_clipboard, "Replace selections by primary clipboard content",
replace_selections_with_primary_clipboard, "Replace selections by primary clipboard",
paste_after, "Paste after selection",
paste_before, "Paste before selection",
paste_clipboard_after, "Paste clipboard after selections",
Expand All @@ -357,27 +357,27 @@ impl MappableCommand {
rotate_selection_contents_backward, "Rotate selections contents backward",
expand_selection, "Expand selection to parent syntax node",
shrink_selection, "Shrink selection to previously expanded syntax node",
select_next_sibling, "Select the next sibling in the syntax tree",
select_prev_sibling, "Select the previous sibling in the syntax tree",
select_next_sibling, "Select next sibling in syntax tree",
select_prev_sibling, "Select previous sibling in syntax tree",
jump_forward, "Jump forward on jumplist",
jump_backward, "Jump backward on jumplist",
save_selection, "Save the current selection to the jumplist",
jump_view_right, "Jump to the split to the right",
jump_view_left, "Jump to the split to the left",
jump_view_up, "Jump to the split above",
jump_view_down, "Jump to the split below",
swap_view_right, "Swap with the split to the right",
swap_view_left, "Swap with the split to the left",
swap_view_up, "Swap with the split above",
swap_view_down, "Swap with the split below",
save_selection, "Save current selection to jumplist",
jump_view_right, "Jump to right split",
jump_view_left, "Jump to left split",
jump_view_up, "Jump to split above",
jump_view_down, "Jump to split below",
swap_view_right, "Swap with right split",
swap_view_left, "Swap with left split",
swap_view_up, "Swap with split above",
swap_view_down, "Swap with split below",
transpose_view, "Transpose splits",
rotate_view, "Goto next window",
hsplit, "Horizontal bottom split",
hsplit_new, "Horizontal bottom split scratch buffer",
vsplit, "Vertical right split",
vsplit_new, "Vertical right split scratch buffer",
wclose, "Close window",
wonly, "Current window only",
wonly, "Close windows except current",
select_register, "Select register",
insert_register, "Insert register",
align_view_middle, "Align view middle",
Expand Down Expand Up @@ -413,21 +413,21 @@ impl MappableCommand {
dap_next, "Step to next",
dap_variables, "List variables",
dap_terminate, "End debug session",
dap_edit_condition, "Edit condition of the breakpoint on the current line",
dap_edit_log, "Edit log message of the breakpoint on the current line",
dap_edit_condition, "Edit breakpoint condition on current line",
dap_edit_log, "Edit breakpoint log message on current line",
dap_switch_thread, "Switch current thread",
dap_switch_stack_frame, "Switch stack frame",
dap_enable_exceptions, "Enable exception breakpoints",
dap_disable_exceptions, "Disable exception breakpoints",
shell_pipe, "Pipe selections through shell command",
shell_pipe_to, "Pipe selections into shell command, ignoring command output",
shell_insert_output, "Insert output of shell command before each selection",
shell_append_output, "Append output of shell command after each selection",
shell_pipe_to, "Pipe selections into shell command ignoring output",
shell_insert_output, "Insert shell command output before selections",
shell_append_output, "Append shell command output after selections",
shell_keep_pipe, "Filter selections with shell predicate",
suspend, "Suspend",
suspend, "Suspend and return to shell",
rename_symbol, "Rename symbol",
increment, "Increment",
decrement, "Decrement",
increment, "Increment item under cursor",
decrement, "Decremen item under cursort",
sudormrfbin marked this conversation as resolved.
Show resolved Hide resolved
record_macro, "Record macro",
replay_macro, "Replay macro",
command_palette, "Open command palette",
Expand Down
Loading