Skip to content

Typed Commands

List of commands that can be run from the command menu, which is open with :

NameDescription
:quit and :qClose the current view.
:quit! and :q!Force close the current view, ignoring unsaved changes.
:open, :o, :edit and :eOpen a file from disk into the current view.
:buffer-close, :bc and :bcloseClose the current buffer.
:buffer-close!, :bc! and :bclose!Close the current buffer forcefully, ignoring unsaved changes.
:buffer-close-others, :bco and :bcloseotherClose all buffers but the currently focused one.
:buffer-close-others!, :bco! and :bcloseother!Force close all buffers but the currently focused one.
:buffer-close-all, :bca and :bcloseallClose all buffers without quitting.
:buffer-close-all!, :bca! and :bcloseall!Force close all buffers ignoring unsaved changes without quitting.
:buffer-next, :bn and :bnextGoto next buffer.
:buffer-previous, :bp and :bprevGoto previous buffer.
:write and :wWrite changes to disk. Accepts an optional path (:write some/path.txt)
:write! and :w!Force write changes to disk creating necessary subdirectories. Accepts an optional path (:write! some/path.txt)
:write-buffer-close and :wbcWrite changes to disk and closes the buffer. Accepts an optional path (:write-buffer-close some/path.txt)
:write-buffer-close! and :wbc!Force write changes to disk creating necessary subdirectories and closes the buffer. Accepts an optional path (:write-buffer-close! some/path.txt)
:new and :nCreate a new scratch buffer.
:format and :fmtFormat the file using the LSP formatter.
:indent-styleSet the indentation style for editing. (‘t’ for tabs or 1-16 for number of spaces.)
:line-endingSet the document’s default line ending. Options: crlf, lf.
:earlier and :earJump back to an earlier point in edit history. Accepts a number of steps or a time span.
:later and :latJump to a later point in edit history. Accepts a number of steps or a time span.
:write-quit, :wq and :xWrite changes to disk and close the current view. Accepts an optional path (:wq some/path.txt)
:write-quit!, :wq! and :x!Write changes to disk and close the current view forcefully. Accepts an optional path (:wq! some/path.txt)
:write-all and :waWrite changes from all buffers to disk.
:write-all! and :wa!Forcefully write changes from all buffers to disk creating necessary subdirectories.
:write-quit-all, :wqa and :xaWrite changes from all buffers to disk and close all views.
:write-quit-all!, :wqa! and :xa!Write changes from all buffers to disk and close all views forcefully (ignoring unsaved changes).
:quit-all and :qaClose all views.
:quit-all! and :qa!Force close all views ignoring unsaved changes.
:cquit and :cqQuit with exit code (default 1). Accepts an optional integer exit code (:cq 2).
:cquit! and :cq!Force quit with exit code (default 1) ignoring unsaved changes. Accepts an optional integer exit code (:cq! 2).
:themeChange the editor theme (show current theme if no name specified).
:yank-joinYank joined selections. A separator can be provided as first argument. Default value is newline.
:clipboard-yankYank main selection into system clipboard.
:clipboard-yank-joinYank joined selections into system clipboard. A separator can be provided as first argument. Default value is newline.
:primary-clipboard-yankYank main selection into system primary clipboard.
:primary-clipboard-yank-joinYank joined selections into system primary clipboard. A separator can be provided as first argument. Default value is newline.
:clipboard-paste-afterPaste system clipboard after selections.
:clipboard-paste-beforePaste system clipboard before selections.
:clipboard-paste-replaceReplace selections with content of system clipboard.
:primary-clipboard-paste-afterPaste primary clipboard after selections.
:primary-clipboard-paste-beforePaste primary clipboard before selections.
:primary-clipboard-paste-replaceReplace selections with content of system primary clipboard.
:show-clipboard-providerShow clipboard provider name in status bar.
:change-current-directory and :cdChange the current working directory.
:show-directory and :pwdShow the current working directory.
:encodingSet encoding. Based on https://encoding.spec.whatwg.org.
:character-info and :charGet info about the character under the primary cursor.
:reload and :rlDiscard changes and reload from the source file.
:reload-all and :rlaDiscard changes and reload all documents from the source files.
:update and :uWrite changes only if the file has been modified.
:lsp-workspace-commandOpen workspace command picker
:lsp-restartRestarts the language servers used by the current doc
:lsp-stopStops the language servers that are used by the current doc
:tree-sitter-scopesDisplay tree sitter scopes, primarily for theming and development.
:tree-sitter-highlight-nameDisplay name of tree-sitter highlight scope under the cursor.
:debug-start and :dbgStart a debug session from a given template with given parameters.
:debug-remote and :dbg-tcpConnect to a debug adapter by TCP address and start a debugging session from a given template with given parameters.
:debug-evalEvaluate expression in current debug context.
:vsplit and :vsOpen the file in a vertical split.
:vsplit-new and :vnewOpen a scratch buffer in a vertical split.
:hsplit, :hs and :spOpen the file in a horizontal split.
:hsplit-new and :hnewOpen a scratch buffer in a horizontal split.
:tutorOpen the tutorial.
:goto and :gGoto line number.
:set-language and :langSet the language of current buffer (show current language if no value specified).
:set-option and :setSet a config option at runtime.
For example to disable smart case search, use :set search.smart-case false.
:toggle-option and :toggleToggle a boolean config option at runtime.
For example to toggle smart case search, use :toggle search.smart-case.
:get-option and :getGet the current value of a config option.
:sortSort ranges in selection.
:rsortSort ranges in selection in reverse order.
:reflowHard-wrap the current selection of lines to a given width.
:tree-sitter-subtree and :ts-subtreeDisplay the smallest tree-sitter subtree that spans the primary selection, primarily for debugging queries.
:config-reloadRefresh user config.
:config-openOpen the user config.toml file.
:config-open-workspaceOpen the workspace config.toml file.
:log-openOpen the helix log file.
:insert-outputRun shell command, inserting output before each selection.
:append-outputRun shell command, appending output after each selection.
:pipePipe each selection to the shell command.
:pipe-toPipe each selection to the shell command, ignoring output.
:run-shell-command and :shRun a shell command
:reset-diff-change, :diffget and :diffgReset the diff change at the cursor position.
:clear-registerClear given register. If no argument is provided, clear all registers.
:redrawClear and re-render the whole UI
:move and :mvMove the current buffer and its corresponding file to a different path
:yank-diagnosticYank diagnostic(s) under primary cursor to register, or clipboard by default
:read and :rLoad a file into buffer