Skip to content

Commit 728933e

Browse files
sudormrfbinthomasskk
authored andcommitted
Shorten embedded command descriptions (helix-editor#3070)
* Shorten embedded command descriptions - Compact descriptions in command palette and infobox * Shorten typed command descriptions * Fix typo in decrement command description
1 parent 8d960b7 commit 728933e

File tree

3 files changed

+72
-72
lines changed

3 files changed

+72
-72
lines changed

book/src/generated/typable-cmd.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
| Name | Description |
22
| --- | --- |
33
| `:quit`, `:q` | Close the current view. |
4-
| `:quit!`, `:q!` | Close the current view forcefully (ignoring unsaved changes). |
4+
| `:quit!`, `:q!` | Force close the current view, ignoring unsaved changes. |
55
| `:open`, `:o` | Open a file from disk into the current view. |
66
| `:buffer-close`, `:bc`, `:bclose` | Close the current buffer. |
7-
| `:buffer-close!`, `:bc!`, `:bclose!` | Close the current buffer forcefully (ignoring unsaved changes). |
7+
| `:buffer-close!`, `:bc!`, `:bclose!` | Close the current buffer forcefully, ignoring unsaved changes. |
88
| `:buffer-close-others`, `:bco`, `:bcloseother` | Close all buffers but the currently focused one. |
9-
| `:buffer-close-others!`, `:bco!`, `:bcloseother!` | Close all buffers but the currently focused one. |
10-
| `:buffer-close-all`, `:bca`, `:bcloseall` | Close all buffers, without quitting. |
11-
| `:buffer-close-all!`, `:bca!`, `:bcloseall!` | Close all buffers forcefully (ignoring unsaved changes), without quitting. |
12-
| `:buffer-next`, `:bn`, `:bnext` | Go to next buffer. |
13-
| `:buffer-previous`, `:bp`, `:bprev` | Go to previous buffer. |
9+
| `:buffer-close-others!`, `:bco!`, `:bcloseother!` | Force close all buffers but the currently focused one. |
10+
| `:buffer-close-all`, `:bca`, `:bcloseall` | Close all buffers without quitting. |
11+
| `:buffer-close-all!`, `:bca!`, `:bcloseall!` | Force close all buffers ignoring unsaved changes without quitting. |
12+
| `:buffer-next`, `:bn`, `:bnext` | Goto next buffer. |
13+
| `:buffer-previous`, `:bp`, `:bprev` | Goto previous buffer. |
1414
| `:write`, `:w` | Write changes to disk. Accepts an optional path (:write some/path.txt) |
15-
| `:write!`, `:w!` | Write changes to disk forcefully (creating necessary subdirectories). Accepts an optional path (:write some/path.txt) |
15+
| `:write!`, `:w!` | Force write changes to disk creating necessary subdirectories. Accepts an optional path (:write some/path.txt) |
1616
| `:new`, `:n` | Create a new scratch buffer. |
1717
| `:format`, `:fmt` | Format the file using the LSP formatter. |
1818
| `:indent-style` | Set the indentation style for editing. ('t' for tabs or 1-8 for number of spaces.) |
@@ -25,9 +25,9 @@
2525
| `:write-quit-all`, `:wqa`, `:xa` | Write changes from all buffers to disk and close all views. |
2626
| `:write-quit-all!`, `:wqa!`, `:xa!` | Write changes from all buffers to disk and close all views forcefully (ignoring unsaved changes). |
2727
| `:quit-all`, `:qa` | Close all views. |
28-
| `:quit-all!`, `:qa!` | Close all views forcefully (ignoring unsaved changes). |
28+
| `:quit-all!`, `:qa!` | Force close all views ignoring unsaved changes. |
2929
| `:cquit`, `:cq` | Quit with exit code (default 1). Accepts an optional integer exit code (:cq 2). |
30-
| `:cquit!`, `:cq!` | Quit with exit code (default 1) forcefully (ignoring unsaved changes). Accepts an optional integer exit code (:cq! 2). |
30+
| `:cquit!`, `:cq!` | Force quit with exit code (default 1) ignoring unsaved changes. Accepts an optional integer exit code (:cq! 2). |
3131
| `:theme` | Change the editor theme. |
3232
| `:clipboard-yank` | Yank main selection into system clipboard. |
3333
| `:clipboard-yank-join` | Yank joined selections into system clipboard. A separator can be provided as first argument. Default value is newline. |
@@ -42,7 +42,7 @@
4242
| `:show-clipboard-provider` | Show clipboard provider name in status bar. |
4343
| `:change-current-directory`, `:cd` | Change the current working directory. |
4444
| `:show-directory`, `:pwd` | Show the current working directory. |
45-
| `:encoding` | Set encoding based on `https://encoding.spec.whatwg.org` |
45+
| `:encoding` | Set encoding. Based on `https://encoding.spec.whatwg.org`. |
4646
| `:reload` | Discard changes and reload from the source file. |
4747
| `:tree-sitter-scopes` | Display tree sitter scopes, primarily for theming and development. |
4848
| `:debug-start`, `:dbg` | Start a debug session from a given template with given parameters. |
@@ -53,16 +53,16 @@
5353
| `:hsplit`, `:hs`, `:sp` | Open the file in a horizontal split. |
5454
| `:hsplit-new`, `:hnew` | Open a scratch buffer in a horizontal split. |
5555
| `:tutor` | Open the tutorial. |
56-
| `:goto`, `:g` | Go to line number. |
56+
| `:goto`, `:g` | Goto line number. |
5757
| `:set-language`, `:lang` | Set the language of current buffer. |
5858
| `:set-option`, `:set` | Set a config option at runtime.<br>For example to disable smart case search, use `:set search.smart-case false`. |
5959
| `:get-option`, `:get` | Get the current value of a config option. |
6060
| `:sort` | Sort ranges in selection. |
6161
| `:rsort` | Sort ranges in selection in reverse order. |
6262
| `:reflow` | Hard-wrap the current selection of lines to a given width. |
6363
| `:tree-sitter-subtree`, `:ts-subtree` | Display tree sitter subtree under cursor, primarily for debugging queries. |
64-
| `:config-reload` | Refreshes helix's config. |
65-
| `:config-open` | Open the helix config.toml file. |
64+
| `:config-reload` | Refresh user config. |
65+
| `:config-open` | Open the user config.toml file. |
6666
| `:log-open` | Open the helix log file. |
6767
| `:insert-output` | Run shell command, inserting output after each selection. |
6868
| `:append-output` | Run shell command, appending output after each selection. |

helix-term/src/commands.rs

Lines changed: 44 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -204,17 +204,17 @@ impl MappableCommand {
204204
extend_line_down, "Extend down",
205205
copy_selection_on_next_line, "Copy selection on next line",
206206
copy_selection_on_prev_line, "Copy selection on previous line",
207-
move_next_word_start, "Move to beginning of next word",
208-
move_prev_word_start, "Move to beginning of previous word",
207+
move_next_word_start, "Move to start of next word",
208+
move_prev_word_start, "Move to start of previous word",
209209
move_prev_word_end, "Move to end of previous word",
210210
move_next_word_end, "Move to end of next word",
211-
move_next_long_word_start, "Move to beginning of next long word",
212-
move_prev_long_word_start, "Move to beginning of previous long word",
211+
move_next_long_word_start, "Move to start of next long word",
212+
move_prev_long_word_start, "Move to start of previous long word",
213213
move_next_long_word_end, "Move to end of next long word",
214-
extend_next_word_start, "Extend to beginning of next word",
215-
extend_prev_word_start, "Extend to beginning of previous word",
216-
extend_next_long_word_start, "Extend to beginning of next long word",
217-
extend_prev_long_word_start, "Extend to beginning of previous long word",
214+
extend_next_word_start, "Extend to start of next word",
215+
extend_prev_word_start, "Extend to start of previous word",
216+
extend_next_long_word_start, "Extend to start of next long word",
217+
extend_prev_long_word_start, "Extend to start of previous long word",
218218
extend_next_long_word_end, "Extend to end of next long word",
219219
extend_next_word_end, "Extend to end of next word",
220220
find_till_char, "Move till next occurrence of char",
@@ -225,7 +225,7 @@ impl MappableCommand {
225225
find_prev_char, "Move to previous occurrence of char",
226226
extend_till_prev_char, "Extend till previous occurrence of char",
227227
extend_prev_char, "Extend to previous occurrence of char",
228-
repeat_last_motion, "repeat last motion(extend_next_char, extend_till_char, find_next_char, find_till_char...)",
228+
repeat_last_motion, "Repeat last motion",
229229
replace, "Replace with new char",
230230
switch_case, "Switch (toggle) case",
231231
switch_to_uppercase, "Switch to uppercase",
@@ -236,7 +236,7 @@ impl MappableCommand {
236236
half_page_down, "Move half page down",
237237
select_all, "Select whole document",
238238
select_regex, "Select all regex matches inside selections",
239-
split_selection, "Split selection into subselections on regex matches",
239+
split_selection, "Split selections on regex matches",
240240
split_selection_on_newline, "Split selection on newlines",
241241
search, "Search for regex pattern",
242242
rsearch, "Reverse search for regex pattern",
@@ -245,20 +245,20 @@ impl MappableCommand {
245245
extend_search_next, "Add next search match to selection",
246246
extend_search_prev, "Add previous search match to selection",
247247
search_selection, "Use current selection as search pattern",
248-
global_search, "Global Search in workspace folder",
248+
global_search, "Global search in workspace folder",
249249
extend_line, "Select current line, if already selected, extend to next line",
250250
extend_line_above, "Select current line, if already selected, extend to previous line",
251-
extend_to_line_bounds, "Extend selection to line bounds (line-wise selection)",
252-
shrink_to_line_bounds, "Shrink selection to line bounds (line-wise selection)",
251+
extend_to_line_bounds, "Extend selection to line bounds",
252+
shrink_to_line_bounds, "Shrink selection to line bounds",
253253
delete_selection, "Delete selection",
254-
delete_selection_noyank, "Delete selection, without yanking",
255-
change_selection, "Change selection (delete and enter insert mode)",
256-
change_selection_noyank, "Change selection (delete and enter insert mode, without yanking)",
257-
collapse_selection, "Collapse selection onto a single cursor",
254+
delete_selection_noyank, "Delete selection without yanking",
255+
change_selection, "Change selection",
256+
change_selection_noyank, "Change selection without yanking",
257+
collapse_selection, "Collapse selection into single cursor",
258258
flip_selections, "Flip selection cursor and anchor",
259-
ensure_selections_forward, "Ensure the selection is in forward direction",
259+
ensure_selections_forward, "Ensure all selections face forward",
260260
insert_mode, "Insert before selection",
261-
append_mode, "Insert after selection (append)",
261+
append_mode, "Append after selection",
262262
command_mode, "Enter command mode",
263263
file_picker, "Open file picker",
264264
file_picker_in_current_directory, "Open file picker at current working directory",
@@ -272,7 +272,7 @@ impl MappableCommand {
272272
workspace_diagnostics_picker, "Open workspace diagnostic picker",
273273
last_picker, "Open last picker",
274274
prepend_to_line, "Insert at start of line",
275-
append_to_line, "Insert at end of line",
275+
append_to_line, "Append to end of line",
276276
open_below, "Open new line below selection",
277277
open_above, "Open new line above selection",
278278
normal_mode, "Enter normal mode",
@@ -319,21 +319,21 @@ impl MappableCommand {
319319
delete_char_forward, "Delete next char",
320320
delete_word_backward, "Delete previous word",
321321
delete_word_forward, "Delete next word",
322-
kill_to_line_start, "Delete content till the start of the line",
323-
kill_to_line_end, "Delete content till the end of the line",
322+
kill_to_line_start, "Delete till start of line",
323+
kill_to_line_end, "Delete till end of line",
324324
undo, "Undo change",
325325
redo, "Redo change",
326326
earlier, "Move backward in history",
327327
later, "Move forward in history",
328-
commit_undo_checkpoint, "Commit changes to a new checkpoint",
328+
commit_undo_checkpoint, "Commit changes to new checkpoint",
329329
yank, "Yank selection",
330330
yank_joined_to_clipboard, "Join and yank selections to clipboard",
331331
yank_main_selection_to_clipboard, "Yank main selection to clipboard",
332332
yank_joined_to_primary_clipboard, "Join and yank selections to primary clipboard",
333333
yank_main_selection_to_primary_clipboard, "Yank main selection to primary clipboard",
334334
replace_with_yanked, "Replace with yanked text",
335335
replace_selections_with_clipboard, "Replace selections by clipboard content",
336-
replace_selections_with_primary_clipboard, "Replace selections by primary clipboard content",
336+
replace_selections_with_primary_clipboard, "Replace selections by primary clipboard",
337337
paste_after, "Paste after selection",
338338
paste_before, "Paste before selection",
339339
paste_clipboard_after, "Paste clipboard after selections",
@@ -358,27 +358,27 @@ impl MappableCommand {
358358
rotate_selection_contents_backward, "Rotate selections contents backward",
359359
expand_selection, "Expand selection to parent syntax node",
360360
shrink_selection, "Shrink selection to previously expanded syntax node",
361-
select_next_sibling, "Select the next sibling in the syntax tree",
362-
select_prev_sibling, "Select the previous sibling in the syntax tree",
361+
select_next_sibling, "Select next sibling in syntax tree",
362+
select_prev_sibling, "Select previous sibling in syntax tree",
363363
jump_forward, "Jump forward on jumplist",
364364
jump_backward, "Jump backward on jumplist",
365-
save_selection, "Save the current selection to the jumplist",
366-
jump_view_right, "Jump to the split to the right",
367-
jump_view_left, "Jump to the split to the left",
368-
jump_view_up, "Jump to the split above",
369-
jump_view_down, "Jump to the split below",
370-
swap_view_right, "Swap with the split to the right",
371-
swap_view_left, "Swap with the split to the left",
372-
swap_view_up, "Swap with the split above",
373-
swap_view_down, "Swap with the split below",
365+
save_selection, "Save current selection to jumplist",
366+
jump_view_right, "Jump to right split",
367+
jump_view_left, "Jump to left split",
368+
jump_view_up, "Jump to split above",
369+
jump_view_down, "Jump to split below",
370+
swap_view_right, "Swap with right split",
371+
swap_view_left, "Swap with left split",
372+
swap_view_up, "Swap with split above",
373+
swap_view_down, "Swap with split below",
374374
transpose_view, "Transpose splits",
375375
rotate_view, "Goto next window",
376376
hsplit, "Horizontal bottom split",
377377
hsplit_new, "Horizontal bottom split scratch buffer",
378378
vsplit, "Vertical right split",
379379
vsplit_new, "Vertical right split scratch buffer",
380380
wclose, "Close window",
381-
wonly, "Current window only",
381+
wonly, "Close windows except current",
382382
select_register, "Select register",
383383
insert_register, "Insert register",
384384
align_view_middle, "Align view middle",
@@ -414,21 +414,21 @@ impl MappableCommand {
414414
dap_next, "Step to next",
415415
dap_variables, "List variables",
416416
dap_terminate, "End debug session",
417-
dap_edit_condition, "Edit condition of the breakpoint on the current line",
418-
dap_edit_log, "Edit log message of the breakpoint on the current line",
417+
dap_edit_condition, "Edit breakpoint condition on current line",
418+
dap_edit_log, "Edit breakpoint log message on current line",
419419
dap_switch_thread, "Switch current thread",
420420
dap_switch_stack_frame, "Switch stack frame",
421421
dap_enable_exceptions, "Enable exception breakpoints",
422422
dap_disable_exceptions, "Disable exception breakpoints",
423423
shell_pipe, "Pipe selections through shell command",
424-
shell_pipe_to, "Pipe selections into shell command, ignoring command output",
425-
shell_insert_output, "Insert output of shell command before each selection",
426-
shell_append_output, "Append output of shell command after each selection",
424+
shell_pipe_to, "Pipe selections into shell command ignoring output",
425+
shell_insert_output, "Insert shell command output before selections",
426+
shell_append_output, "Append shell command output after selections",
427427
shell_keep_pipe, "Filter selections with shell predicate",
428-
suspend, "Suspend",
428+
suspend, "Suspend and return to shell",
429429
rename_symbol, "Rename symbol",
430-
increment, "Increment",
431-
decrement, "Decrement",
430+
increment, "Increment item under cursor",
431+
decrement, "Decrement item under cursor",
432432
record_macro, "Record macro",
433433
replay_macro, "Replay macro",
434434
command_palette, "Open command pallete",

0 commit comments

Comments
 (0)