on master help sign in
Shorten embedded command descriptions (#3070)

* Shorten embedded command descriptions - Compact descriptions in command palette and infobox * Shorten typed command descriptions * Fix typo in decrement command description

commitde8ade896771875482fed0a4da6c9cc62410edf5 authorGokul Soumya <gokulps15@gmail.com> dateTue 26 Jul 2022, 08:34 (4 years ago) parent42115d0
3 files changed+72−72
book/src/generated/typable-cmd.md+14−14 helix-term/src/commands.rs+44−44 helix-term/src/commands/typed.rs+14−14
book/src/generated/typable-cmd.md+14−14
@@ -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,7 +53,7 @@
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. |
@@ -61,8 +61,8 @@
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+44−44
@@ -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,13 +319,13 @@ 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",
@@ -333,7 +333,7 @@ impl MappableCommand {
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,19 +358,19 @@ 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",
@@ -378,7 +378,7 @@ impl MappableCommand {
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 palette",
helix-term/src/commands/typed.rs+14−14
@@ -1525,7 +1525,7 @@ pub const TYPABLE_COMMAND_LIST: &[TypableCommand] = &[
15251525 TypableCommand {
15261526 name: "quit!",
15271527 aliases: &["q!"],
1528− doc: "Close the current view forcefully (ignoring unsaved changes).",
1528+ doc: "Force close the current view, ignoring unsaved changes.",
15291529 fun: force_quit,
15301530 completer: None,
15311531 },
@@ -1546,7 +1546,7 @@ pub const TYPABLE_COMMAND_LIST: &[TypableCommand] = &[
15461546 TypableCommand {
15471547 name: "buffer-close!",
15481548 aliases: &["bc!", "bclose!"],
1549− doc: "Close the current buffer forcefully (ignoring unsaved changes).",
1549+ doc: "Close the current buffer forcefully, ignoring unsaved changes.",
15501550 fun: force_buffer_close,
15511551 completer: Some(completers::buffer),
15521552 },
@@ -1560,35 +1560,35 @@ pub const TYPABLE_COMMAND_LIST: &[TypableCommand] = &[
15601560 TypableCommand {
15611561 name: "buffer-close-others!",
15621562 aliases: &["bco!", "bcloseother!"],
1563− doc: "Close all buffers but the currently focused one.",
1563+ doc: "Force close all buffers but the currently focused one.",
15641564 fun: force_buffer_close_others,
15651565 completer: None,
15661566 },
15671567 TypableCommand {
15681568 name: "buffer-close-all",
15691569 aliases: &["bca", "bcloseall"],
1570− doc: "Close all buffers, without quitting.",
1570+ doc: "Close all buffers without quitting.",
15711571 fun: buffer_close_all,
15721572 completer: None,
15731573 },
15741574 TypableCommand {
15751575 name: "buffer-close-all!",
15761576 aliases: &["bca!", "bcloseall!"],
1577− doc: "Close all buffers forcefully (ignoring unsaved changes), without quitting.",
1577+ doc: "Force close all buffers ignoring unsaved changes without quitting.",
15781578 fun: force_buffer_close_all,
15791579 completer: None,
15801580 },
15811581 TypableCommand {
15821582 name: "buffer-next",
15831583 aliases: &["bn", "bnext"],
1584− doc: "Go to next buffer.",
1584+ doc: "Goto next buffer.",
15851585 fun: buffer_next,
15861586 completer: None,
15871587 },
15881588 TypableCommand {
15891589 name: "buffer-previous",
15901590 aliases: &["bp", "bprev"],
1591− doc: "Go to previous buffer.",
1591+ doc: "Goto previous buffer.",
15921592 fun: buffer_previous,
15931593 completer: None,
15941594 },
@@ -1602,7 +1602,7 @@ pub const TYPABLE_COMMAND_LIST: &[TypableCommand] = &[
16021602 TypableCommand {
16031603 name: "write!",
16041604 aliases: &["w!"],
1605− doc: "Write changes to disk forcefully (creating necessary subdirectories). Accepts an optional path (:write some/path.txt)",
1605+ doc: "Force write changes to disk creating necessary subdirectories. Accepts an optional path (:write some/path.txt)",
16061606 fun: force_write,
16071607 completer: Some(completers::filename),
16081608 },
@@ -1696,7 +1696,7 @@ pub const TYPABLE_COMMAND_LIST: &[TypableCommand] = &[
16961696 TypableCommand {
16971697 name: "quit-all!",
16981698 aliases: &["qa!"],
1699− doc: "Close all views forcefully (ignoring unsaved changes).",
1699+ doc: "Force close all views ignoring unsaved changes.",
17001700 fun: force_quit_all,
17011701 completer: None,
17021702 },
@@ -1710,7 +1710,7 @@ pub const TYPABLE_COMMAND_LIST: &[TypableCommand] = &[
17101710 TypableCommand {
17111711 name: "cquit!",
17121712 aliases: &["cq!"],
1713− doc: "Quit with exit code (default 1) forcefully (ignoring unsaved changes). Accepts an optional integer exit code (:cq! 2).",
1713+ doc: "Force quit with exit code (default 1) ignoring unsaved changes. Accepts an optional integer exit code (:cq! 2).",
17141714 fun: force_cquit,
17151715 completer: None,
17161716 },
@@ -1815,7 +1815,7 @@ pub const TYPABLE_COMMAND_LIST: &[TypableCommand] = &[
18151815 TypableCommand {
18161816 name: "encoding",
18171817 aliases: &[],
1818− doc: "Set encoding based on `https://encoding.spec.whatwg.org`",
1818+ doc: "Set encoding. Based on `https://encoding.spec.whatwg.org`.",
18191819 fun: set_encoding,
18201820 completer: None,
18211821 },
@@ -1892,7 +1892,7 @@ pub const TYPABLE_COMMAND_LIST: &[TypableCommand] = &[
18921892 TypableCommand {
18931893 name: "goto",
18941894 aliases: &["g"],
1895− doc: "Go to line number.",
1895+ doc: "Goto line number.",
18961896 fun: goto_line_number,
18971897 completer: None,
18981898 },
@@ -1948,14 +1948,14 @@ pub const TYPABLE_COMMAND_LIST: &[TypableCommand] = &[
19481948 TypableCommand {
19491949 name: "config-reload",
19501950 aliases: &[],
1951− doc: "Refreshes helix's config.",
1951+ doc: "Refresh user config.",
19521952 fun: refresh_config,
19531953 completer: None,
19541954 },
19551955 TypableCommand {
19561956 name: "config-open",
19571957 aliases: &[],
1958− doc: "Open the helix config.toml file.",
1958+ doc: "Open the user config.toml file.",
19591959 fun: open_config,
19601960 completer: None,
19611961 },