# Outlines and folding

> Shortcuts are written for the Mac. On Windows and Linux, use Ctrl where it says Cmd, unless the text names another key.

Indented lines belong to the line above them, and the lines under a heading belong to that heading. Folding, zooming, moving and copying all follow that structure.

## Indent

Tab indents the current line or selection under the line above it. Shift+Tab moves it back out. Only the selected lines move, and the lines around them keep their indentation, so a line's children stay where they are when you indent it.

To take the children along, press Cmd+; (macOS) or Ctrl+; (Windows/Linux): it indents a line together with everything beneath it. Cmd+Shift+; (macOS) or Ctrl+Shift+; (Windows/Linux) moves the whole tree back out. A folded line always takes its hidden lines along.

A line's children come along when you move, fold or copy it.

The editor supports _overindentation_: you can press Tab multiple times to add more indentation.

## Headings own their section

The lines below a heading belong to it until the next heading of the same or a higher level, with no indentation needed. Move or fold a heading and the whole section comes with it. Zoom into a heading and you see just that section.

## Fold

Folding is what outliners call collapsing. Cmd+/ folds or unfolds the current line and its children. Cmd+, folds all children, Cmd+. unfolds them, and the line menu has the fold options too. Folding is per panel, so you can fold a page one way on the left and another way on the right.

Blocks, live queries and transclusions fold too.

## Zoom

Zooming is what some outliners call hoisting or focusing in. Alt+Down zooms into the current line: that line becomes the top of the page, and the rest is hidden. Alt+Up zooms back out. The zoomed-in line stays visible and editable, so you can rename a heading while working inside it.

## Move lines around

Cmd+Shift+Up and Cmd+Shift+Down move a line past its siblings, children included. Drag a line by its handle to put it anywhere, in the same page or in another panel. To select a line with its children, press Cmd+A until they are selected; see [Selecting](writing-and-formatting.md#selecting).

Cmd+Z undoes any of it.
