FeatureFree

A whole snippet stays one item

An outliner splits on Enter. That is right for a list and wrong for a shell command, a config file or twenty lines of TypeScript. Type /code and the item becomes a code block that holds the whole snippet — exactly as you typed or pasted it.

Four lines, one bullet. Enter inserted the newlines and pasting the snippet kept it whole, so the block moves and indents as a single item.

The snippet is one thing, so it stays one item

A code block changes what Enter, paste and the arrow keys do inside that item. The lines you write stay together instead of becoming siblings, indentation and blank lines survive, and the text is set in a monospace face so it reads as code rather than as prose that happens to contain brackets.

Turn an item into a code block

  1. Type /code on the item that should hold the snippet

    It is the same slash menu you use for headings and links, under Basic blocks. The item keeps its place, its children and its position in the tree — only how it edits and displays changes.

  2. Press Enter for a new line, not a new item

    Inside a code block Enter inserts a newline. The block grows downwards and stays one item, so a function, a config file or a stack trace keeps its shape.

  3. Paste the whole snippet at once

    A multi-line paste drops in at the caret as raw text. SpacebarX will not parse its lines into separate bullets or read its dashes as a list, and the paste is a single undo step — one ⌘Z takes the whole block back out.

  4. Move with the arrow keys, and press Esc when you are done

    ArrowUp and ArrowDown walk through the lines of the block and only leave it from its first and last line. Escape drops out of the text into node selection, where the block moves, indents and deletes like any other item.

Use code blocks for

  • A command you will need again, beside the note that explains why
  • The config change that fixed the build, kept with the decision behind it
  • A function or query pasted out of your editor, unsplit
  • Error output dropped into an incident branch while it is still fresh

Code that is still readable a year later

A snippet only helps if it survives the outline around it. Holding it in one item means it moves, indents, collapses and mirrors as a single thing — and reads as code instead of as a run of bullets that happen to start with spaces.

Worth knowing

A code block is a style applied to an ordinary item, not a special kind of document. When you want the block to render as formatted text rather than stay raw, use markdown blocks — same multi-line editing, different display.

Keep the snippet where the reasoning is.

Type /code on any item and paste the block in. It stays one item, exactly as you left it.