Editor reference

Every editor command, with its keys, its mouse action and its name in the command palette.

How keys combine

Some commands are an action key followed by what it acts on.

KeysDoes
ccChange the label of the cursor’s item
ceChange the label of one of its edges, chosen by code
ddDelete the cursor’s item
deDelete one of its edges, chosen by code
digDelete the group the cursor is in, with its contents
>Connect to the node the next move ends on
zzCentre the view on the cursor

In Visual mode, c, d and > act at once on the selection.

Commands that start with : are typed in the bar at the bottom. Type the command and its choice together, such as :shape dia, then press Enter. Tab completes a choice, and Esc closes the line.

On Windows, read Ctrl for ⌘.

Every command

The command palette is a search box for every command on the diagram page. Press ⌘K, type part of a command’s name and press Enter. The editor’s commands start with Editor:.

Entering and leaving

CommandKeysMouseIn the palette
Editor⌘E enters or leaves; Enter entersDouble-click a node, or choose EDIT on the mode buttonView: Editor
Leave the editor:q or ⌘EChoose VIEW or SOURCE on the mode buttonNot in the palette

Move

CommandKeysMouseIn the palette
Moveh j k l or the arrow keys; n N after a searchClick an itemEditor: Move left, down, up or right
Find by codef, then a codeNot in the palette
Search/ or ⌘F, then type part of a labelEditor: Search
Edgee, then a codeClick an edgeEditor: Edges between, in Visual mode
Centre on cursorzzEditor: Centre on cursor

Change

CommandKeysMouseIn the palette
Edit labelF2, i or aDouble-click the itemEditor: Edit label
Change labelcc, or ce for an edgeRight-click, Change labelEditor: Change label
New node afteroRight-click, New node afterEditor: New node after
New node beforeORight-click, New node beforeEditor: New node before
Connect>, then a moveSelect two nodes, right-click, ConnectEditor: Connect
Connect the other way<, then a moveSelect two nodes, right-click, Connect the other wayEditor: Connect the other way
Deletedd, de, dig, Delete or BackspaceRight-click, DeleteEditor: Delete

i starts typing at the beginning of the label, and a at the end. cc starts from an empty label.

Select

CommandKeysMouseIn the palette
Visual modevShift-click or ⌘-click an itemEditor: Visual mode
Inside a groupig, in Visual modeRight-click, Select group contentsEditor: Select group contents

In Visual mode, e selects the edges between the selected items (Editor: Edges between), and d deletes the selection.

The : line

CommandKeysMouseIn the palette
Command line:Editor: Command line
Shape:shape for a node, :line for an edgeRight-click, Shape… or Line…Editor: Shape: Diamond, Editor: Line: Dotted, and so on
Group:groupRight-click, Group…Editor: Group: and the group’s title, No group or New group…
Class:class or :styleEditor: Class: and the class name, No class or New class…
Revert editor changes:e!Editor: Revert editor changes

:group with a title that doesn’t exist yet makes a new group. :class works on nodes, edges and groups. A space in a class name becomes -.

:title followed by a name renames the diagram.

More

CommandKeysMouseIn the palette
Context menuEnterRight-click an itemEditor: Context menu
UndouEdit ▸ UndoNot in the palette

Press ?, or click ? keyboard hints in the bar, to list every key that works at that moment.

Shapes and line styles

:shape lists every shape with a picture and what it usually means. Type part of a name, or a meaning such as decision, to narrow the list.

The :shape list open in the bar: Rectangle, Rounded rectangle, Stadium, Framed rectangle, Notched rectangle, Lined rectangle and Divided rectangle, each with a picture and a meaning.

GroupShapes
RectanglesRectangle · Rounded rectangle · Stadium · Framed rectangle · Notched rectangle · Lined rectangle · Divided rectangle · Stacked rectangle · Tagged rectangle · Sloped rectangle · Window pane · Bow-tie rectangle · Half-rounded rectangle
Diamonds and other polygonsDiamond · Hexagon · Lean right · Lean left · Trapezoid, wide at the bottom · Trapezoid, wide at the top · Odd · Triangle · Flipped triangle · Notched pentagon · Hourglass · Curved trapezoid
CirclesCircle · Double circle · Small circle · Framed circle · Filled circle · Crossed circle
CylindersCylinder · Horizontal cylinder · Lined cylinder
DocumentsDocument · Stacked document · Lined document · Tagged document
Braces and other shapesCurly brace, left · Curly brace, right · Curly braces · Lightning bolt · Flag · Cloud · Bang · Fork or join bar
Notes: sit outside the flowComment · Text block

Hourglass, Small circle, Framed circle, Filled circle, Crossed circle, Lightning bolt, Bang and Fork or join bar don’t show their label.

:line lists the line styles: Solid, Dotted and Thick.

Undo and starting over

  • u or ⌘Z undoes the last change. The bar at the bottom says what was undone.
  • ⇧⌘Z redoes it. On Windows, Ctrl+Y also redoes.
  • :e! puts the diagram back as it was when you entered the editor.

In the editor, Publish, Export and Copy don’t run: Line9 asks you to leave the editor first, with :q.

Next

  • Keys: every key on the diagram page and in the editor.
  • Editor tutorial: build a flowchart step by step.