Editing
Development reference · View source
The one-key rows in this table are the complete direct-binding inventory for Normal and Select modes. Common prefixed gestures follow for context. Explorer keys are under Directory buffers , and Insert-mode keys under Insert and Replace modes .
| Key | Action |
|---|---|
Shift-Left / Shift-Right | Visit the previous / next running persistent session (mux mode) |
h / j / k / l; Left / Down / Up / Right | Move left, down, up, right |
w / b / e | Next word / previous word / word end |
W / B / E | Long-word variants |
f | Find the next typed character in the buffer |
F / t / T | Find backward, or move until a character forward / backward |
Home / 0; ^; End / $ | Start / first non-whitespace / end of line |
Ctrl-b / Ctrl-f; Ctrl-u / Ctrl-d | Page up / down; half-page up / down |
PageUp / PageDown | Page up / down |
gg / ge or G | Start / end of file |
gp / gP | Next / previous paragraph |
gf | Open the selected path exactly, or infer the complete path under a bare cursor; inferred paths at the end of a sentence ignore trailing punctuation if the literal name does not exist. On a Markdown link to #heading or file.md#heading, land on that heading |
gw | Dim the view, label nearby words with one key and farther words with two, then type a label to jump |
gt / gc / gb; H / M / L | Move to the top / center / bottom of the visible window |
i / a / I / A | Insert before/after cursor or at line boundary |
o / O | Open line below / above |
r / R / ~ | Replace once / enter Replace mode / toggle case |
v | Enter Select mode |
x / X | Grow whole lines below / above, never shrinking |
% | Select the entire buffer |
C / Alt-C | Add a cursor on the nearest line below / above holding a character at the cursor’s column, skipping the ones too short |
V / Alt-V | Add a cursor on the next / previous line, padding short or empty lines with spaces to the same display column |
; / Alt-; | Collapse selections / flip their direction |
, / Space s c / Alt-, | Keep only the primary selection / drop it |
) / ( | Make the next / previous selection primary |
Alt-) / Alt-( | Rotate selection contents forward / backward |
& | Pad until every cursor shares the rightmost display column |
_ | Delete trailing whitespace from every selected line; % then _ strips the buffer |
Alt-_ | Shrink every selection past the whitespace at its ends, without changing the text |
Space p . | Toggle dim ·, →, and ¬ markers for spaces, tabs, and line endings |
d / c | Delete / change selection or cursor character; d after transient x/X cuts whole lines |
y / p / P | Yank selection or cursor character, leaving a caret / replace the selection, or paste after a bare caret / paste before |
Y | Yank every line the selection touches, as whole lines, leaving a caret |
> / < | Indent / unindent |
J | Join the selected lines with a space, or pull the line below up to a single-line selection or caret |
Ctrl-c | Comment or uncomment every line the selection touches, using the buffer language’s line comment; also bound in Insert mode |
u / U | Undo / redo |
Alt-u / Alt-U; Space s u / Space s U | Undo / redo selection changes, back to the last text edit |
s / / | Search with an escaped literal, ignoring case / with a regular expression |
n / N | Step to the next / previous match |
* | Select every occurrence of the word or selection under the caret |
Ctrl-o / Ctrl-i; Alt-o / Alt-i | Jump backward / forward through every navigation point; jump backward / forward to another buffer |
Tab | Open contextual actions for the selection or row under the caret |
Ctrl-s | Save |
Ctrl-v / Alt-v | Paste the system clipboard, storing an image in the workspace and writing a numbered Markdown link to it; also bound in Insert mode |
: | Open the command palette |
| | Shell pipe key (reserved; use :pipe <shell-command>) |
<n> before a command | Repeat a motion or countable command |
<n>gg / <n>G | Go to line <n> |
" then a register | Select a named register; uppercase appends and _ discards |
Space m … | Record, replay, and list macros; see Macros |
mm | Jump to the matching bracket |
m i … / m a … | Select inside / around a word, paragraph, delimiter pair, function, type, or argument; see Text objects |
m s … / m r … … / m d … | Add / replace / delete the pair around each selection; see Surround editing |
z… / Z… | View alignment and scrolling |
Esc / Ctrl-\ (Ctrl-4 on legacy terminals) | Return to Normal mode |
Selecting whole lines
| Key | Command | Effect |
|---|---|---|
x | select-line | Snap to whole lines, then grow downward without dropping lines already selected |
X | extend-line-above | Expand a partial selection to whole lines, then grow upward without dropping lines already selected |
| — | extend-line-below | Same behavior as select-line, for custom bindings |
| — | select-line-up | The former upward edge-walking behavior, for custom bindings |
For example, x x X adds the line above the two selected lines. All four
support counts and multiple selections.
Selection history
Alt-u (selection-undo) brings back a selection lost to a motion, Escape,
a collapse, or removing extra cursors. Alt-U (Alt-Shift-u,
selection-redo) reapplies it. Space s u and Space s U are the same
commands. Like the other selection commands, they are keys rather than :
commands.
- Every range, its direction, the primary range, and the selection mode come
back, including
x/Xwhole-line behavior. Text never changes. - A counted motion, an accepted search, or a mouse drag is one step. Cancelled search previews add none. A new selection change clears redo.
- History is per pane and per buffer, works in read-only buffers, and survives switching buffers.
- Any text change, including undo/redo or an edit in another pane, starts a new history.
- Restoring never enters Insert/Replace mode or reopens a prompt.
- Limits: 128 states and 4,096 total ranges per history, for up to 32 buffers per pane. An oversized selection ends that history.
- Terminal review is not supported.
Selecting motions
In Normal mode, w, b, e, W, B, E, f, t, F, and T select the
text they cross, as in Helix:
| Keys | Result |
|---|---|
w d | Delete a word and the space after it |
e c | Change to the end of the word |
w p | Replace what w selected — the word and the space after it — with the register |
wselects through the whitespace after the word,ethrough the end of the next word, andbback to the start of the previous one.fselects from the caret through the found character,tup to it.- Each press starts a fresh selection, which never contains a line break.
- Anything that reads a selection reads this one:
preplaces it,sand/search inside it, and*searches for it. - Other motions still move a caret, and Select mode still extends.
Set editor.selecting_motions: false to make these motions move a caret too.
A word is then selected with v first: v e d deletes to the end of the word.
Yank and paste
Yank ends the gesture. y and Y return to Normal mode and collapse each
range to a caret on the last character copied, one caret per selection.
- That makes
ythenpa duplicate: the caret pastes past the text just yanked. A range that outlived the yank would be invisible in Normal mode and would makepreplace the yanked text with itself. Space c yis the exception. It is also what a right click does, so it copies without disturbing the selection.
p depends on the selection, as d and c do:
| Selection | p does |
|---|---|
| A bare caret | Paste after the caret |
| A range holding text | Replace that text |
A bare caret, linewise register (from x y or Y) | Paste whole lines |
| A characterwise selection, linewise register | Replace exactly the span, with the register’s final line ending removed; inner line breaks stay |
An x/X or Vim line selection, linewise register | Replace whole lines |
- The register is not used up and the replacement stays selected, so the same content can be pasted over one range after another.
- A multi-selection from a search replaces every match at once.
Pnever replaces. It is the way to paste at the start of a selection without giving it up.Space c pandSpace c Pfollow the same rules from the system clipboard.
Pasting images
Ctrl-v and Alt-v paste from the system clipboard in Normal, Select,
Insert, and Replace modes. When the clipboard holds an image:
- The image is stored under
.runyte/cache/images/in the workspace, named by the hash of its content. - The document gets a numbered Markdown link, such as
[Image 1](.runyte/cache/images/1f0a2b3c4d5e6f70.png).
- Pasting the same screenshot twice stores one file.
- The number continues past the highest
[Image N]already in the document, rather than counting links. ?renders the link as Image 1, without the path.- A path with a space or a parenthesis is written in angle brackets,
[Image 1](<My Notes/a (copy).png>), the only spelling that survives being read back.
When text is pasted instead. A clipboard with no image, a machine with no
helper that can supply one, or an unresponsive display server all paste text,
exactly like Space c p.
A clipboard offering text as well as a picture counts as text. Copying
spreadsheet cells or formatted text attaches a rendered bitmap for “paste as
picture” commands, and taking it would lose the text you selected. A copied
picture has no text beside it, which is what screenshot tools and a browser’s
“Copy Image” produce. If Ctrl-v pastes text where you expected an image, the
source is offering text. Once the clipboard has said it holds an image, failing
to fetch it is reported rather than silently pasting text.
Both keys are unbound in Terminal Insert, where they reach the program if the outer terminal passes them through.
The cache is scratch. .runyte/ is not tracked by Git, so a pasted image
travels with the working copy, not the commit.
- A document read from another clone needs its images moved somewhere the repository carries, and its links updated.
- Nothing promises to keep a file there. A document meant to outlive the session should not point into it.
Storage safety:
- Directories and images are private:
0700and0600on Linux and macOS, owner-only permissions on Windows local NTFS. - Symlinked or reparse-point storage paths, hard-linked entries, and files whose bytes disagree with their content-hash name are refused.
- Writes use exclusively created temporary files and atomic publication.
On Windows:
- Registered PNG data is read directly; supported native bitmap data is converted to PNG. Plain text still takes precedence.
- Clipboard data and converted images are limited to 64 MiB, and bitmap dimensions must fit in 64 MiB of RGBA pixels.
- Unsupported compressed bitmap layouts and custom colour profiles report an error.
- The editor waits at most one second for the clipboard. If Windows takes longer, another request reports the clipboard as busy; retry after the worker finishes.