2021-11-17 19:00:11 +05:30
| Name | Description |
2021-11-22 00:25:08 +05:30
| --- | --- |
2021-11-17 19:00:11 +05:30
| `:quit` , `:q` | Close the current view. |
2022-07-26 08:34:23 +05:30
| `:quit!` , `:q!` | Force close the current view, ignoring unsaved changes. |
2021-11-17 19:00:11 +05:30
| `:open` , `:o` | Open a file from disk into the current view. |
| `:buffer-close` , `:bc` , `:bclose` | Close the current buffer. |
2022-07-26 08:34:23 +05:30
| `:buffer-close!` , `:bc!` , `:bclose!` | Close the current buffer forcefully, ignoring unsaved changes. |
2022-02-28 20:31:24 -05:00
| `:buffer-close-others` , `:bco` , `:bcloseother` | Close all buffers but the currently focused one. |
2022-07-26 08:34:23 +05:30
| `: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. |
2021-11-17 19:00:11 +05:30
| `:write` , `:w` | Write changes to disk. Accepts an optional path (:write some/path.txt) |
2022-07-26 08:34:23 +05:30
| `:write!` , `:w!` | Force write changes to disk creating necessary subdirectories. Accepts an optional path (:write some/path.txt) |
2021-11-17 19:00:11 +05:30
| `: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.) |
2022-04-23 04:01:08 -04:00
| `:line-ending` | Set the document's default line ending. Options: crlf, lf. |
2021-11-17 19:00:11 +05:30
| `:earlier` , `:ear` | Jump back to an earlier point in edit history. Accepts a number of steps or a time span. |
| `:later` , `:lat` | Jump to a later point in edit history. Accepts a number of steps or a time span. |
| `:write-quit` , `:wq` , `:x` | Write changes to disk and close the current view. Accepts an optional path (:wq some/path.txt) |
| `:write-quit!` , `:wq!` , `:x!` | Write changes to disk and close the current view forcefully. Accepts an optional path (:wq! some/path.txt) |
2022-06-16 18:09:30 -03:00
| `:write-all` , `:wa` | Write changes from all buffers to disk. |
| `: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). |
2021-11-17 19:00:11 +05:30
| `:quit-all` , `:qa` | Close all views. |
2022-07-26 08:34:23 +05:30
| `:quit-all!` , `:qa!` | Force close all views ignoring unsaved changes. |
2021-11-17 19:00:11 +05:30
| `:cquit` , `:cq` | Quit with exit code (default 1). Accepts an optional integer exit code (:cq 2). |
2022-07-26 08:34:23 +05:30
| `:cquit!` , `:cq!` | Force quit with exit code (default 1) ignoring unsaved changes. Accepts an optional integer exit code (:cq! 2). |
2021-11-17 19:00:11 +05:30
| `: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. |
| `:primary-clipboard-yank` | Yank main selection into system primary clipboard. |
| `:primary-clipboard-yank-join` | Yank joined selections into system primary clipboard. A separator can be provided as first argument. Default value is newline. |
| `:clipboard-paste-after` | Paste system clipboard after selections. |
| `:clipboard-paste-before` | Paste system clipboard before selections. |
| `:clipboard-paste-replace` | Replace selections with content of system clipboard. |
| `:primary-clipboard-paste-after` | Paste primary clipboard after selections. |
| `:primary-clipboard-paste-before` | Paste primary clipboard before selections. |
| `:primary-clipboard-paste-replace` | Replace selections with content of system primary clipboard. |
| `: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. |
2022-07-26 08:34:23 +05:30
| `:encoding` | Set encoding. Based on `https://encoding.spec.whatwg.org` . |
2021-11-17 19:00:11 +05:30
| `:reload` | Discard changes and reload from the source file. |
2022-10-26 08:28:49 +05:30
| `:update` | Write changes only if the file has been modified. |
2022-09-20 08:44:36 +01:00
| `:lsp-restart` | Restarts the Language Server that is in use by the current doc |
2021-11-17 19:00:11 +05:30
| `:tree-sitter-scopes` | Display tree sitter scopes, primarily for theming and development. |
2022-02-14 08:02:22 +05:30
| `:debug-start` , `:dbg` | Start a debug session from a given template with given parameters. |
| `:debug-remote` , `:dbg-tcp` | Connect to a debug adapter by TCP address and start a debugging session from a given template with given parameters. |
| `:debug-eval` | Evaluate expression in current debug context. |
2021-11-17 19:00:11 +05:30
| `:vsplit` , `:vs` | Open the file in a vertical split. |
2022-03-13 22:47:52 -04:00
| `:vsplit-new` , `:vnew` | Open a scratch buffer in a vertical split. |
2021-11-17 19:00:11 +05:30
| `:hsplit` , `:hs` , `:sp` | Open the file in a horizontal split. |
2022-03-13 22:47:52 -04:00
| `:hsplit-new` , `:hnew` | Open a scratch buffer in a horizontal split. |
2021-11-17 19:00:11 +05:30
| `:tutor` | Open the tutorial. |
2022-07-26 08:34:23 +05:30
| `:goto` , `:g` | Goto line number. |
2022-04-05 02:56:14 +02:00
| `:set-language` , `:lang` | Set the language of current buffer. |
2022-05-03 22:17:08 -04:00
| `:set-option` , `:set` | Set a config option at runtime.< br > For example to disable smart case search, use `:set search.smart-case false` . |
2022-04-24 03:30:18 -07:00
| `:get-option` , `:get` | Get the current value of a config option. |
2021-12-27 05:11:06 +01:00
| `:sort` | Sort ranges in selection. |
| `:rsort` | Sort ranges in selection in reverse order. |
2022-05-02 10:24:22 -04:00
| `:reflow` | Hard-wrap the current selection of lines to a given width. |
2022-01-21 08:15:35 -06:00
| `:tree-sitter-subtree` , `:ts-subtree` | Display tree sitter subtree under cursor, primarily for debugging queries. |
2022-07-26 08:34:23 +05:30
| `:config-reload` | Refresh user config. |
| `:config-open` | Open the user config.toml file. |
2022-05-11 03:18:45 +02:00
| `:log-open` | Open the helix log file. |
2022-10-16 00:07:42 +08:00
| `:insert-output` | Run shell command, inserting output before each selection. |
2022-06-05 11:52:41 +01:00
| `:append-output` | Run shell command, appending output after each selection. |
2022-04-17 05:03:47 +02:00
| `:pipe` | Pipe each selection to the shell command. |
2022-05-02 23:15:02 +09:00
| `:run-shell-command` , `:sh` | Run a shell command |