| 1 |
| Name | Description | |
| 2 |
| --- | --- | |
| 3 |
| `:exit`, `:x`, `:xit` | Write changes to disk if the buffer is modified and then quit. Accepts an optional path (:exit some/path.txt). | |
| 4 |
| `:exit!`, `:x!`, `:xit!` | Force write changes to disk, creating necessary subdirectories, if the buffer is modified and then quit. Accepts an optional path (:exit! some/path.txt). | |
| 5 |
| `:quit`, `:q` | Close the current view. | |
| 6 |
| `:quit!`, `:q!` | Force close the current view, ignoring unsaved changes. | |
| 7 |
| `:open`, `:o`, `:edit`, `:e` | Open a file from disk into the current view. | |
| 8 |
| `:buffer-close`, `:bc`, `:bclose` | Close the current buffer. | |
| 9 |
| `:buffer-close!`, `:bc!`, `:bclose!` | Close the current buffer forcefully, ignoring unsaved changes. | |
| 10 |
| `:buffer-close-others`, `:bco`, `:bcloseother` | Close all buffers but the currently focused one. | |
| 11 |
| `:buffer-close-others!`, `:bco!`, `:bcloseother!` | Force close all buffers but the currently focused one. | |
| 12 |
| `:buffer-close-all`, `:bca`, `:bcloseall` | Close all buffers without quitting. | |
| 13 |
| `:buffer-close-all!`, `:bca!`, `:bcloseall!` | Force close all buffers ignoring unsaved changes without quitting. | |
| 14 |
| `:buffer-next`, `:bn`, `:bnext` | Goto next buffer. | |
| 15 |
| `:buffer-previous`, `:bp`, `:bprev` | Goto previous buffer. | |
| 16 |
| `:write`, `:w` | Write changes to disk. Accepts an optional path (:write some/path.txt) | |
| 17 |
| `:write!`, `:w!` | Force write changes to disk creating necessary subdirectories. Accepts an optional path (:write! some/path.txt) | |
| 18 |
| `:write-buffer-close`, `:wbc` | Write changes to disk and closes the buffer. Accepts an optional path (:write-buffer-close some/path.txt) | |
| 19 |
| `:write-buffer-close!`, `:wbc!` | Force write changes to disk creating necessary subdirectories and closes the buffer. Accepts an optional path (:write-buffer-close! some/path.txt) | |
| 20 |
| `:new`, `:n` | Create a new scratch buffer. | |
| 21 |
| `:format`, `:fmt` | Format the file using an external formatter or language server. | |
| 22 |
| `:indent-style` | Set the indentation style for editing. ('t' for tabs or 1-16 for number of spaces.) | |
| 23 |
| `:line-ending` | Set the document's default line ending. Options: crlf, lf. | |
| 24 |
| `:earlier`, `:ear` | Jump back to an earlier point in edit history. Accepts a number of steps or a time span. | |
| 25 |
| `:later`, `:lat` | Jump to a later point in edit history. Accepts a number of steps or a time span. | |
| 26 |
| `:write-quit`, `:wq` | Write changes to disk and close the current view. Accepts an optional path (:wq some/path.txt) | |
| 27 |
| `:write-quit!`, `:wq!` | Write changes to disk and close the current view forcefully. Accepts an optional path (:wq! some/path.txt) | |
| 28 |
| `:write-all`, `:wa` | Write changes from all buffers to disk. | |
| 29 |
| `:write-all!`, `:wa!` | Forcefully write changes from all buffers to disk creating necessary subdirectories. | |
| 30 |
| `:write-quit-all`, `:wqa`, `:xa` | Write changes from all buffers to disk and close all views. | |
| 31 |
| `:write-quit-all!`, `:wqa!`, `:xa!` | Forcefully write changes from all buffers to disk, creating necessary subdirectories, and close all views (ignoring unsaved changes). | |
| 32 |
| `:quit-all`, `:qa` | Close all views. | |
| 33 |
| `:quit-all!`, `:qa!` | Force close all views ignoring unsaved changes. | |
| 34 |
| `:cquit`, `:cq` | Quit with exit code (default 1). Accepts an optional integer exit code (:cq 2). | |
| 35 |
| `:cquit!`, `:cq!` | Force quit with exit code (default 1) ignoring unsaved changes. Accepts an optional integer exit code (:cq! 2). | |
| 36 |
| `:theme` | Change the editor theme (show current theme if no name specified). | |
| 37 |
| `:yank-join` | Yank joined selections. A separator can be provided as first argument. Default value is newline. | |
| 38 |
| `:clipboard-yank` | Yank main selection into system clipboard. | |
| 39 |
| `:clipboard-yank-join` | Yank joined selections into system clipboard. A separator can be provided as first argument. Default value is newline. | |
| 40 |
| `:primary-clipboard-yank` | Yank main selection into system primary clipboard. | |
| 41 |
| `:primary-clipboard-yank-join` | Yank joined selections into system primary clipboard. A separator can be provided as first argument. Default value is newline. | |
| 42 |
| `:clipboard-paste-after` | Paste system clipboard after selections. | |
| 43 |
| `:clipboard-paste-before` | Paste system clipboard before selections. | |
| 44 |
| `:clipboard-paste-replace` | Replace selections with content of system clipboard. | |
| 45 |
| `:primary-clipboard-paste-after` | Paste primary clipboard after selections. | |
| 46 |
| `:primary-clipboard-paste-before` | Paste primary clipboard before selections. | |
| 47 |
| `:primary-clipboard-paste-replace` | Replace selections with content of system primary clipboard. | |
| 48 |
| `:show-clipboard-provider` | Show clipboard provider name in status bar. | |
| 49 |
| `:change-current-directory`, `:cd` | Change the current working directory. | |
| 50 |
| `:show-directory-stack` | Show the directory stack as a <space> delimited string. | |
| 51 |
| `:push-directory`, `:pushd` | Save and then change the current directory. | |
| 52 |
| `:pop-directory`, `:popd` | Remove the top entry from the directory stack, and cd to the new top directory.. | |
| 53 |
| `:show-directory`, `:pwd` | Show the current working directory. | |
| 54 |
| `:encoding` | Set encoding. Based on `https://encoding.spec.whatwg.org`. | |
| 55 |
| `:character-info`, `:char` | Get info about the character under the primary cursor. | |
| 56 |
| `:reload`, `:rl` | Discard changes and reload from the source file. | |
| 57 |
| `:reload-all`, `:rla` | Discard changes and reload all documents from the source files. | |
| 58 |
| `:update`, `:u` | Write changes only if the file has been modified. | |
| 59 |
| `:lsp-workspace-command` | Open workspace command picker | |
| 60 |
| `:lsp-restart` | Restarts the given language servers, or all language servers that are used by the current file if no arguments are supplied | |
| 61 |
| `:lsp-stop` | Stops the given language servers, or all language servers that are used by the current file if no arguments are supplied | |
| 62 |
| `:tree-sitter-scopes` | Display tree sitter scopes, primarily for theming and development. | |
| 63 |
| `:tree-sitter-highlight-name` | Display name of tree-sitter highlight scope under the cursor. | |
| 64 |
| `:tree-sitter-layers` | Display language names of tree-sitter injection layers under the cursor. | |
| 65 |
| `:debug-start`, `:dbg` | Start a debug session from a given template with given parameters. | |
| 66 |
| `:debug-remote`, `:dbg-tcp` | Connect to a debug adapter by TCP address and start a debugging session from a given template with given parameters. | |
| 67 |
| `:debug-eval` | Evaluate expression in current debug context. | |
| 68 |
| `:vsplit`, `:vs` | Open the file in a vertical split. | |
| 69 |
| `:vsplit-new`, `:vnew` | Open a scratch buffer in a vertical split. | |
| 70 |
| `:hsplit`, `:hs`, `:sp` | Open the file in a horizontal split. | |
| 71 |
| `:hsplit-new`, `:hnew` | Open a scratch buffer in a horizontal split. | |
| 72 |
| `:tutor` | Open the tutorial. | |
| 73 |
| `:goto`, `:g` | Goto line number. | |
| 74 |
| `:set-language`, `:lang` | Set the language of current buffer (show current language if no value specified). | |
| 75 |
| `:set-option`, `:set` | Set a config option at runtime.<br>For example to disable smart case search, use `:set search.smart-case false`. | |
| 76 |
| `:toggle-option`, `:toggle` | Toggle a config option at runtime.<br>For example to toggle smart case search, use `:toggle search.smart-case`. | |
| 77 |
| `:get-option`, `:get` | Get the current value of a config option. | |
| 78 |
| `:sort` | Sort ranges in selection. | |
| 79 |
| `:reflow` | Hard-wrap the current selection of lines to a given width. | |
| 80 |
| `:tree-sitter-subtree`, `:ts-subtree` | Display the smallest tree-sitter subtree that spans the primary selection, primarily for debugging queries. | |
| 81 |
| `:config-reload` | Refresh user config. | |
| 82 |
| `:config-open` | Open the user config.toml file. | |
| 83 |
| `:config-open-workspace` | Open the workspace config.toml file. | |
| 84 |
| `:log-open` | Open the helix log file. | |
| 85 |
| `:insert-output` | Run shell command, inserting output before each selection. | |
| 86 |
| `:append-output` | Run shell command, appending output after each selection. | |
| 87 |
| `:pipe`, `:\|` | Pipe each selection to the shell command. | |
| 88 |
| `:pipe-to` | Pipe each selection to the shell command, ignoring output. | |
| 89 |
| `:run-shell-command`, `:sh`, `:!` | Run a shell command | |
| 90 |
| `:reset-diff-change`, `:diffget`, `:diffg` | Reset the diff change at the cursor position. | |
| 91 |
| `:clear-register` | Clear given register. If no argument is provided, clear all registers. | |
| 92 |
| `:set-register` | Set contents of the given register. | |
| 93 |
| `:redraw` | Clear and re-render the whole UI | |
| 94 |
| `:move`, `:mv` | Move the current buffer and its corresponding file to a different path | |
| 95 |
| `:move!`, `:mv!` | Move the current buffer and its corresponding file to a different path creating necessary subdirectories | |
| 96 |
| `:yank-diagnostic` | Yank diagnostic(s) under primary cursor to register, or clipboard by default | |
| 97 |
| `:read`, `:r` | Load a file into buffer | |
| 98 |
| `:echo` | Prints the given arguments to the statusline. | |
| 99 |
| `:noop` | Does nothing. | |
| 100 |
| `:workspace-trust` | Allow language servers and local config for the current workspace. | |
| 101 |
| `:workspace-untrust` | Revoke the current workspace's trust grant or exclusion. | |
| 102 |
| `:workspace-exclude` | Mark the current workspace as never-prompt. Never prompts for trust again. | |