You're reading docs for unreleased changes —  switch to v0.12.0.
Skip to content

Command mode

Command mode is where HUME reaches commands that aren't bound to a key. Press : in Normal mode to open the command mode prompt, type a name, and press Enter. Esc dismisses without running.

Every command in this manual is one of two kinds, and each is reachable only its own way:

  • Typed commands — everything on this page. Reached only from the command mode prompt, take a text argument and an optional !.
  • Editor commands — everything in the Builtin Commands reference. Reached only from a key or a plugin (including your init.scm), never from the command mode prompt.

INFO

Navigate buffers with :bprev/:bnext from the command mode prompt. Doing this often enough to want a keybind? Use the editor commands goto-prev-buffer/goto-next-buffer in init.scm instead:

scheme
(bind-key! 'normal "ctrl-h" "goto-prev-buffer")
(bind-key! 'normal "ctrl-l" "goto-next-buffer")

Most typed commands have a short alias — both forms are listed below, and both work. Press Tab at any point for completion of names and, where it makes sense, arguments.

For running HUME from a shell instead, see Command-line Flags.

Quitting and saving

CommandEffect
:q, :quitClose the focused pane; with one pane, close the buffer, and quit HUME when it's the last one
:q!Same, discarding unsaved changes
:qa, :quit-allQuit everything. Refuses if any buffer has unsaved changes, and jumps to the first one
:qa!Quit everything, discarding unsaved changes
:w, :writeSave
:w <path>Save as
:w!Save, retrying with a permission change if the first attempt is refused; also overwrites a file changed on disk since it was last read or saved
:wa, :write-allSave every modified buffer
:wq, :write-quitSave, then close the focused pane; with one pane, close the buffer, and quit HUME when it's the last one

Relative paths given to :w resolve against HUME's working directory (:pwd), not the shell's.

Files

CommandEffect
:e <path>, :edit <path>Open a file
:eReload the current file. Refuses if there are unsaved changes
:e!Reload, discarding unsaved changes
:checktimeCheck every open buffer against its file on disk right now, instead of waiting for the next automatic check (switching back to HUME, switching to the buffer)

In arguments, % expands to the current file's path and # to the alternate file's. Both only work as a whole argument — :w %.bak won't expand. :b is the exception: it resolves # itself, which is why :b # works for buffers with no file on disk.

See Files & Buffers for what happens when a file changes on disk.

Buffers

CommandEffect
:ls, :list-buffersList open buffers
:b <name>, :buffer <name>Switch buffer. Accepts a name, a unique filename prefix, a full path, a number from :ls, or # for the previous buffer (:b# and :b # both work)
:bn, :bnextNext buffer
:bp, :bprevPrevious buffer
:bd, :buffer-deleteClose the buffer. Refuses if there are unsaved changes; closing the last one leaves a scratch buffer
:bd!Close the buffer, discarding unsaved changes

:b# is the quickest way back to the previous buffer. The same jump is also an editor command, goto-alternate-buffer, for binding to a key — core:vim-keybind binds it to Ctrl+6 for you.

Panes

CommandEffect
:sp, :splitSplit the focused pane, stacking the new pane below
:vsp, :vsplitSplit the focused pane side by side

Splitting is refused with a message when the pane is already too small. Focus and closing use the Ctrl+p prefix (Ctrl+p then h/j/k/l/p/s/v/c) — see the Default Keys.

Editing

CommandEffect
:sortSort adjacent rows by their selected text
:sort -rSort in reverse
:sort -iSort case-insensitively

:sort groups your selections into runs of adjacent rows and sorts each run independently, keyed by whatever text you selected on that row — not necessarily the whole line. Select whole lines (% selects the whole buffer) to sort a file; select a single column across a block of lines to sort by that column instead. A run sorts numerically only if every row's key looks like a number — one row with non-numeric text drops the whole run back to plain text order. Two selections on the same row combine into one key rather than being treated as separate rows, so sorting several items within one line isn't what :sort does.

A single selection that spans several rows keeps its place in the buffer — the rows underneath it reorder, but the selection itself still covers the same stretch of text afterward.

Select the count on each row, then run :sort
mia   34
zoe   19
kai   52

Result
zoe   19
mia   34
kai   52

Settings

CommandEffect
:set global <option>=<value>Set an option everywhere
:set buffer <option>=<value>Set an option for this buffer only
:set pane <option>=<value>Set an option for this pane only (wrap-mode only)

See Configuration for every option.

Display

CommandEffect
:theme <name>Load a theme; with no argument, show the current one
:theme-debugShow the resolved styles for the main UI scopes
:wrap, :toggle-soft-wrapToggle line wrapping in this pane — see wrap styles
:mes, :messagesShow the message log in a read-only buffer
CommandEffect
:cd <path>, :change-directory <path>Change the working directory
:pwd, :print-working-directoryPrint the working directory
:goto <n>Jump to line <n>. :42 is shorthand. Records a jump, so Ctrl+o comes back

Config and plugins

CommandEffect
:plugins, :plugin-statusShow declared plugins and whether they've loaded
:reload-configRe-run init.scm from scratch
:ver, :versionShow the editor version
:tutorOpen the interactive tutorial

Plugins add commands of their own once you load them. The :plum-* commands (installing plugins and grammars) come from core:plum, and :lsp-*, :diagnostics, and :format-source from core:lsp — neither plugin is loaded until you ask for it in init.scm. See Core Plugins.

Finding a command

There is no listing command. Open the command mode prompt with : and press Tab — completion shows every registered typed name and alias, including stubs for plugins that haven't loaded yet. It never shows editor commands — those aren't reachable from the command mode prompt at all; see Builtin Commands for the full list.

Released under the MIT License.