Skip to content

Getting Started ​

The ideas below take about five minutes and cover most of what you'll do all day.

First launch ​

Launch HUME on a file:

sh
hume path/to/file.txt

Or run hume with no arguments to open a scratch buffer.

The first minute ​

  1. Learn the keys: type :tutor and press Enter to open the interactive tutorial. It is your own copy, so edit it freely.
  2. Where am I? The mode label (NOR, INS, EXT, …) sits on the right of the statusline; the file path and cursor position sit on the left.
  3. Quit: :q closes the focused pane, or its tab when it is the tab's last pane. In the last pane it closes the buffer, and quits HUME when no other file or unsaved buffer is open. :q! discards unsaved changes, :wq saves first, and :qa quits everything.
  4. Turn on the extras (optional): HUME starts lean: language servers, fuzzy pickers, live git diff, the undo-history graph and the plugin manager stay off until you ask for them. Copy the bundled starter config to ~/.config/hume/init.scm (%APPDATA%\hume\init.scm on Windows) and they're all on from the next launch. The linked section says where to find it and what each plugin does.

The modal idea ​

HUME has distinct modes, and the current mode decides what each key you press does.

How is this different from a normal editor? ​

In a conventional editor every letter you type lands in the document, so actions have to be chorded shortcuts (Ctrl-c, Cmd-v, Ctrl-f), and many moves need the mouse.

Modal editors invert that. In Normal mode letters are commands: d deletes, w selects the next word, x selects a line, and nothing you type reaches the buffer. To write text, switch to Insert mode, type, and press Esc to come back. The payoff: almost every edit is a plain keystroke, with no modifiers and no mouse.

The three main modes ​

The modes you'll use most:

ModeHow to enterWhat it does
NormalEsc from anywhereNavigate and issue commands
Inserti, a, o, c from Normal modeType text
Extende from Normal modeGrow and shrink selections

You spend most of your time in Normal, dropping into Insert only to type. See Modes for the others: Command, Search and Sift.

Motions ​

Motions move the cursor or change the current selection: w to the next word, f followed by a character to jump to it on the line, g g to the first line. In Extend mode they also grow or shrink the selection.

See Moving Around for the full set.

Selection-first editing ​

HUME follows the select-then-act model. First say what to act on (a word, a line, a paragraph, a pair of quotes), then what to do with it: d to delete, c to change, y to yank. There is no cursor without a selection. What looks like a single-character cursor is a one-character selection, and every editing command acts on the current selection.

This reverses the more familiar action-then-target order (press d, then say what to delete). Selecting first means you always see what an edit will touch before it happens.

See Selections for how to build and shape selections.

Multiple selections ​

HUME can hold several selections at once, and any editing command acts on all of them together. The classic example is renaming: select every occurrence of a word, press c, and type the new name once to change them all.

See Selections for how to create and manage multiple selections.

Try it: your first edit ​

Put all of the above together on a practice file. Run hume practice.txt; the file is created when you save it.

StepKeysWhat happens
Type three linesi, then type apples are red, Enter, bananas are yellow, Enter, cherries are red, then EscYou're back in Normal mode, and what you typed stays selected
Go to the end of the first lineg g g lThe cursor sits on the d of red
Change red to greenm i w c green Escm i w selects the word, c deletes it and starts Insert mode
Delete the second linej x dx selects the whole line, d deletes it
Change every are to were% s are Enter c were Esc% selects the whole file, s keeps only the matches: one selection per are, all changed at once
Undo, then redou Uu brings are back, U changes it to were again
Save and quit:wq Enter

The file now reads:

apples were green
cherries were red

Next steps ​

Released under the MIT License.