Headings and the table of contents
Six levels of heading, the panel that lists them, and the keys that move through it without touching the mouse.
Headings
Type # to ###### at the start of a line, or press Ctrl+1…6⌘1…6 with the number of the level, or pick a level under … on the toolbar. Pressing the same shortcut again turns the heading back into a paragraph.
The table of contents
As soon as the document has a heading, an icon appears at the top right of the window. Click it, or press Ctrl+Alt+A⌥⌘A, and a panel lists every heading, indented by level. Click one to jump to it.

The panel works from the keyboard too: ↓↓ and ↑↑ move through the headings, HomeHome and EndEnd go to the first and the last, EnterEnter jumps, and EscEsc closes the panel and puts the cursor back in the text.
The icon fades out with the tab strip while you type when Hide tabs when typing is on, and comes back when you move the mouse. It is not there at all in a document without headings.
Linking to a heading
A link whose address starts with # followed by the heading’s words in lower case, joined with hyphens (#what-the-sea-leaves), jumps to that heading. That is how a long document can carry its own index at the top.
More in Writing
The Markdown shortcuts that turn into headings, lists and emphasis while you type, and the ones you can turn off.
The small toolbar that appears over selected text, and the reminder of shortcuts that shows when you hold Ctrl or Cmd.
Bulleted, numbered and checklist items, nesting them with Tab, and turning one kind of list into another.
Links to web pages, to other documents on your disk and to headings in the same document, and how to follow them.
Four ways to put a picture in a document, the difference between embedding and linking one, and what the editor does not do with images.
The slash menu that inserts blocks, the toolbar that edits tables, and the rules that keep them compatible with Markdown.
Notes attached to a passage, in three colours, which travel with the document and never print.
Curly quotes, dashes, ellipses and arrows written for you as you type, the quotation marks of your language, and how to turn each one off.
The spell checker and its languages on each system, adding words to the dictionary, and the language of the app itself.
Right-to-left writing for Arabic, Hebrew, Persian and other scripts, per document or for every new document.
Searching the document or every open tab, and a replace that keeps the capitals of what it finds.
What happens to formatting when text comes in from elsewhere or goes out, and the two ways to copy a document as code.
Calmly Writer