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

Builtin Commands

These are editor commands — reached from a key binding or from a plugin with (call! …), never from the command mode prompt. (Typed commands are listed on the Command mode page instead.) Every command below is a native one — owned by the editor itself, not a plugin. They are callable two ways from Scheme:

scheme
;; directly, as a bare binding
(move-left)
;; or through the generic dispatcher, like a plugin command
(call! "move-left")

The first form is only valid for builtins (they are pre-registered in the Steel scripting engine); call! works for any key-bindable command, builtin or Scheme-defined. Each entry lists the command name and what it does. For key bindings that trigger these commands, see the key reference and the per-topic pages.

Motions

Move the cursor/selection. Callable as (name) or (call! "name").

CommandDefault keyEffect
find-backwardF + charFind previous occurrence of a character (inclusive, backward).
find-forwardf + charFind next occurrence of a character (inclusive, forward).
goto-first-lineg gMove cursors to the first character of the buffer.
goto-first-nonblankg sMove cursors to the first non-blank character on the line.
goto-last-lineg eMove cursors to the first character of the last line.
goto-line-endEnd / g lMove cursors to the last character on the line.
goto-line-startHome / g hMove cursors to the start of the line.
goto-matching-pair#Move cursors to the matching bracket or tag.
goto-next-argumentg aSelect the next argument.
goto-next-classg tSelect the next class or type.
goto-next-commentg cSelect the next comment.
goto-next-functiong fSelect the next function.
goto-next-paragraph}Select the next paragraph.
goto-next-testg uSelect the next unit test.
goto-next-valueg vSelect the next array/tuple/struct value.
goto-prev-argumentg ASelect the previous argument.
goto-prev-classg TSelect the previous class or type.
goto-prev-commentg CSelect the previous comment.
goto-prev-functiong FSelect the previous function.
goto-prev-paragraph{Select the previous paragraph.
goto-prev-testg USelect the previous unit test.
goto-prev-valueg VSelect the previous array/tuple/struct value.
jump-backwardCtrl+oNavigate to the previous position in the jump list.
jump-forwardCtrl+i / TabNavigate to the next position in the jump list.
move-downj / Move cursors down one visual line (one buffer line with a count).
move-lefth / Move cursors one grapheme to the left.
move-rightl / Move cursors one grapheme to the right.
move-upk / Move cursors up one visual line (one buffer line with a count).
repeat-find-backward-Repeat the last find/till motion backward.
repeat-find-forward=Repeat the last find/till motion forward.
select-linex / Ctrl+xSelect the full current line (forward).
select-line-backwardX / Ctrl+XSelect the full current line (backward).
select-next-uppercase-wordWSelect the next uppercase word (whitespace-delimited).
select-next-wordwSelect the next word.
select-prev-uppercase-wordBSelect the previous uppercase word (whitespace-delimited).
select-prev-wordbSelect the previous word.
till-backwardT + charMove to just after previous occurrence of a character (exclusive).
till-forwardt + charMove to just before next occurrence of a character (exclusive).

Selection commands

Create, refine, or manipulate the selection set.

CommandDefault keyEffect
collapse-and-exit-extend;Collapse each selection to its cursor and exit extend mode.
collapse-selectionCollapse each selection to a single cursor at the head.
collapse-to-anchor-and-exit-extendCtrl+;Collapse each selection to its anchor and exit extend mode.
copy-selection-on-next-lineCDuplicate each selection on the line below.
copy-selection-on-prev-lineDuplicate each selection on the line above.
cycle-primary-backward(Cycle the primary selection backward.
cycle-primary-forward)Cycle the primary selection forward.
flip-selectionsCtrl+eSwap anchor and head for each selection.
keep-primary-selection,Remove all selections except the primary.
remove-primary-selectionCtrl+,Remove the primary selection, promoting the next.
select-all%Select the entire buffer.
select-last-insertionm i iSelect the text typed during the most recently completed insert session.
sift-withinsNarrow each selection down to its regex matches.
split-selection-on-newlinesSSplit each multi-line selection into one per line.
trim-selection-whitespace_Trim leading and trailing whitespace from each selection.

Text objects

Select a delimited region around the cursor.

CommandDefault keyEffect
around-anglem a < / m a >Select content including the nearest <>.
around-argumentm a aSelect the argument and its separator comma. Structure-aware — uses the language's parameter object when the grammar defines one.
around-backtickm a `Select content including the nearest backtick pair.
around-bracem a { / m a }Select content including the nearest {}.
around-bracketm a [ / m a ]Select content including the nearest [].
around-classm a tSelect the class or type including its header. Requires a grammar with a textobjects.scm.
around-commentm a cSelect the whole comment block. Requires a grammar with a textobjects.scm.
around-double-quotem a "Select content including the nearest ".
around-functionm a fSelect the function including its signature (and attributes/decorators). Requires a grammar with a textobjects.scm.
around-linem a lSelect the line including its newline.
around-paragraphm a pSelect the paragraph plus its trailing blank gap.
around-parenm a ( / m a )Select content including the nearest ().
around-single-quotem a 'Select content including the nearest '.
around-testm a uSelect the whole unit test, including its attribute or decorator. Requires a grammar with a textobjects.scm.
around-uppercase-wordm a WSelect uppercase word plus one adjacent whitespace run.
around-valuem a vSelect an array/tuple/struct value plus its separator comma. Requires a grammar with a textobjects.scm.
around-wordm a wSelect word plus one adjacent whitespace run.
inner-anglem i < / m i >Select content inside the nearest <>.
inner-argumentm i aSelect the argument at the cursor (trimmed). Structure-aware — uses the language's parameter object when the grammar defines one.
inner-backtickm i `Select content inside the nearest backtick pair.
inner-bracem i { / m i }Select content inside the nearest {}.
inner-bracketm i [ / m i ]Select content inside the nearest [].
inner-classm i tSelect inside a class or type. Requires a grammar with a textobjects.scm.
inner-commentm i cSelect inside a comment. Requires a grammar with a textobjects.scm.
inner-double-quotem i "Select content inside the nearest ".
inner-functionm i fSelect inside a function. Requires a grammar with a textobjects.scm.
inner-linem i lSelect inner line content (excluding the newline).
inner-paragraphm i pSelect the paragraph's text, excluding any trailing blank gap.
inner-parenm i ( / m i )Select content inside the nearest ().
inner-single-quotem i 'Select content inside the nearest '.
inner-testm i uSelect inside a unit test function's body. Requires a grammar with a textobjects.scm.
inner-uppercase-wordm i WSelect inner uppercase word (whitespace-delimited).
inner-valuem i vSelect inside an array/tuple/struct value. Requires a grammar with a textobjects.scm.
inner-wordm i wSelect inner word.
select-uppercase-wordM MSelect the uppercase word (WORD) under the cursor.
select-wordm mSelect the word under the cursor.
select-word-nearest-on-lineSelect the word under the cursor, or the nearest word on the same visual line when on whitespace; span follows word-selects-whitespace.

Surround

Select or wrap delimiter pairs.

CommandDefault keyEffect
surround-addm w + charWrap each selection with a delimiter pair. Reads the next typed character to determine the pair.
surround-anglem s < / m s >Select surrounding <> delimiters.
surround-backtickm s `Select surrounding ` delimiters.
surround-bracem s { / m s }Select surrounding {} delimiters.
surround-bracketm s [ / m s ]Select surrounding [] delimiters.
surround-double-quotem s "Select surrounding " delimiters.
surround-parenm s ( / m s )Select surrounding () delimiters.
surround-single-quotem s 'Select surrounding ' delimiters.

Edits

Modify buffer text.

CommandDefault keyEffect
align-selections&Align each selection's anchor to the primary selection's anchor column.
changecDelete selections onto the kill ring, then enter insert mode (one undo group).
deletedDelete selections, pushing their text onto the kill ring.
delete-char-backwardDelete the character before each cursor.
delete-char-forwardDelete the character (or selection) under the cursor.
delete-selectionDelete all selections.
delete-word-backwardCtrl+w (insert mode)Delete the word before each cursor.
indent>Indent every line touched by a selection by one level.
join-lines-select-spacesJJoin lines inside each selection and select the inserted spaces.
make-text-capitalizedG CCapitalize each word in every selection (Title Case).
make-text-lowercaseG LLowercase the text in each selection.
make-text-uppercaseG UUppercase the text in each selection.
open-line-aboveOOpen a new line above the cursor and enter insert mode.
open-line-belowoOpen a new line below the cursor and enter insert mode.
replacer + charReplace every character in each selection with the next typed character.
unindent<Unindent every line touched by a selection by one level.

Clipboard and registers

Move text between the buffer, the kill ring, and the system clipboard.

CommandDefault keyEffect
paste-afterPaste register contents after the selection. Bare (no "<reg> prefix) reads the kill-ring head, with no clipboard fallback.
paste-beforePaste register contents before the selection. Bare (no "<reg> prefix) reads the kill-ring head, with no clipboard fallback.
paste-ring-newer]Cycle kill ring one step newer and re-paste.
paste-ring-older[Cycle kill ring one step older and re-paste.
smart-paste-afterpPaste after the selection: kill-ring head while nothing has been edited since the last capture, clipboard otherwise.
smart-paste-beforePPaste before the selection: kill-ring head while nothing has been edited since the last capture, clipboard otherwise.
yankyCopy selections to the clipboard and kill ring without deleting.

Undo and repeat

Replay or roll back past changes.

CommandDefault keyEffect
redoU / Ctrl+rRedo the last undone change.
repeat-last-action.Repeat the last editing action.
undouUndo the last change.

Find text and act on the matches.

CommandDefault keyEffect
clear-searchClear search highlights. Esc also clears them; bind a key to run this directly.
search-backward?Enter search mode (backward).
search-forward/Enter search mode (forward).
search-nextnJump to the next search match.
search-prevNJump to the previous search match.
search-selectionCtrl+/Use the primary selection text literally as the search pattern.
search-word-under-cursor*Search the whole word under the cursor.
select-all-matchesm /Turn every search match in the buffer into a selection.

Modes

Switch between normal, insert, extend, and the command prompt.

CommandDefault keyEffect
command-mode:Open the command mode prompt.
exit-insertEsc / Ctrl+cReturn to normal mode from insert mode.
insert-afterEnter insert mode after the cursor (move one grapheme right).
insert-at-line-endAEnter insert mode after the last character on the line.
insert-at-line-startIEnter insert mode at the first non-blank character on the line.
insert-at-selection-endaEnter insert mode after the end of the selection.
insert-at-selection-startiEnter insert mode at the start of the selection.
insert-beforeEnter insert mode; collapse each selection to its start.
toggle-extendeToggle sticky extend mode.

Scrolling

Move the viewport without moving the cursor.

CommandDefault keyEffect
bottom-view-on-cursorz jScroll so the primary selection head sits at the bottom of the viewport.
center-view-on-cursorz zScroll so the primary selection head sits at the vertical center of the viewport.
half-page-downCtrl+dScroll down by half a viewport height.
half-page-upCtrl+uScroll up by half a viewport height.
page-downPageDownScroll down by one viewport height.
page-upPageUpScroll up by one viewport height.
top-view-on-cursorz kScroll so the primary selection head sits at the top of the viewport.

Panes and buffers

Split, focus, and close panes; switch buffers.

CommandDefault keyEffect
goto-alternate-bufferSwitch to the most-recently-focused other buffer.
goto-next-bufferSwitch to the next buffer in open-order.
goto-prev-bufferSwitch to the previous buffer in open-order.
pane-closeCtrl+p cClose the focused pane.
pane-focus-downCtrl+p jFocus the pane below.
pane-focus-leftCtrl+p hFocus the pane to the left.
pane-focus-nextTab / Ctrl+p pFocus the next pane.
pane-focus-rightCtrl+p lFocus the pane to the right.
pane-focus-upCtrl+p kFocus the pane above.
pane-splitCtrl+p sSplit the focused pane, stacking the new pane below it.
pane-vsplitCtrl+p vSplit the focused pane side by side.

Released under the MIT License.