# Move through the text with the keyboard

> Navigate rows, fold blocks, find text and follow type links in the text view using Vim-style keyboard shortcuts.

Page: https://structure.fi/tools/market-data-visualizer/guides/text-view-keys/

Open in the Market Data Visualizer: https://structure.fi/tools/market-data-visualizer/app/#open?article=text-view-keys

The text view displays schemas, messages, and types as read-only code lines, so it supports Vim-style motion keys to move the selected row, fold blocks, and follow links. Keys work whenever the text view has focus (click any row); inputs such as search keep their own keys.

## 1. Open a message as text

Open `TradesStreamEvent` from the bundled Binance Spot Streams sample and click its first line to focus the text view.

[Open TradesStreamEvent as text](https://structure.fi/tools/market-data-visualizer/app/#open?sample=binance-stream&node=m10000&place=text&guide=text-view-keys&section=block-3)

## 2. Move by rows and screens

- `j` / `k` (or `Down` / `Up`): select next / previous row.
- `gg` / `G` (or `Home` / `End`): jump to first / last row.
- `Ctrl+D` / `Ctrl+U`: scroll half a screen down / up with the selection.
- `Ctrl+F` / `Ctrl+B` (or `Page Down` / `Page Up`): scroll a full screen down / up.
- `zz`: center the selected row on screen without moving selection.

Motions reach every row in the declaration, including rows scrolled off screen.

## 3. Move in blocks

Messages, groups, composites, and enums are blocks bounded by `{` and `}`:

- `h` (or `Left`): collapse the selected open block, or jump to its enclosing block if already collapsed or on a leaf line.
- `l` (or `Right`): expand a collapsed block, or select its first child row if already open.
- `%`: toggle between the first line and last row (just before `}`) of an open block.
- `}` / `{`: step to the next / previous sibling row in the same block, skipping inner block lines (header comments count as their own rows).

## 4. Follow links and go back

- `gd` (or `Enter`): open the selected row's type definition.
- `gr` (or `Shift+F12`): find usages of the selected node.
- `Ctrl+O` / `Ctrl+I` (or `Cmd+[` / `Cmd+]` on macOS, `Ctrl+[` / `Ctrl+]` on Windows and Linux): navigate back / forward.
- `yy` (or `Cmd+C` / `Ctrl+C`): copy the selected row.

`Tab` continues to move focus to the next control. On Windows and Linux, global shortcuts `Ctrl+B` (toggle side panel) and `Ctrl+O` (add files) take precedence—use `Page Up` and `Ctrl+[` there instead.

## 5. Find in the text

- `/`: open the find row under the text and type what to find. Every match in the whole text is marked, not only the lines on screen, and the row counts them (`2 of 5`). Words match as the guide's search matches them: a word of the text whole, at its start, inside it from three letters, or, when no word of the text matches whole or at its start, with a typo (two in a word of nine letters or more), so `varstirng` finds `varString8`. Each word you type marks its own matches. Case is ignored unless what you type holds a capital letter, as Vim's `smartcase` does; a typo ignores case. Type any character other than letters, digits and spaces (`@100`, `varString8;`) to find the text exactly as written.
- `Down` / `Up` in the find row: select the line of the next / previous match, wrapping, and stay in the row to type on.
- `Enter` in the find row: select the line of the match the row is on and return to the text.
- `n` / `N`: go to the next / previous match, wrapping at the end and the start of the text.
- `Escape`: close the find row and its marks.

The palette's Find command opens the same row. The symbols view has it too: click a row, then `/` finds in the names, types and notes of every row, offsets and sizes left out, and a match inside a closed row opens the rows around it when you go to it.

## 6. Counts and sequences

Prefix any motion with a repeat count (`5j`, `3}`). Before `G` or `gg`, a number jumps to that 1-based line (`20G` selects line 20). Two-key sequences (`gg`, `zz`) and pending counts cancel on `Escape`, an invalid next key, or a 1-second timeout (matching Vim's default).

## Sources

- https://vimhelp.org/motion.txt.html
- https://vimhelp.org/pattern.txt.html

Reviewed by Structure on 2026-11-11. Last changed 2026-11-24.
