Aa 0.14.1

Selecting and moving

Words are selected along the lines and on across blocks; whole blocks are selected with Shift-Up or Shift-Down and moved by hand or from the keys.

Words across blocks

Press in the first paragraph and drag down into the list: the selection runs over every block between. Then press ⌘B.

What it stores

Each block is its own editable element, and a browser keeps a selection dragged in one inside it. Aa carries it on: once a mouse press that is selecting words reaches another block, the selection runs from where the press began to the pointer, over every block between. It is one selection, and typing, Backspace and Delete, the marks (⌘B, ⌘I, ⌘U, ⌘E, ⌘⇧S), copy and cut act on all of it.

  • A press that first moves along a line selects words. One that first moves up or down lifts its block instead: see Moving blocks by hand.
  • A double or triple press and a drag go on from the start of the word or the line it selected.
  • Shift and a click in another block extend the selection to it.
  • Near the window’s top or bottom edge the page scrolls on, and the selection with it.
  • ⌘A selects the words of the block the caret is in (a table cell’s first), and pressed again, all the writing.
  • Copy puts the selected Markdown on the clipboard, syntax and all.

On touch the selection is the system’s own, by a long press. See On a phone.

Blocks selected

Press Shift-Down to select blocks, then ⌘D, ⌘⇧↑ or Backspace. Escape clears the selection and leaves editing.

What it stores

Shift-↑ and Shift-↓ select whole blocks: from the caret’s block to the one above or below, and further with each press. Escape leaves editing: it clears the selection and blinking caret without changing the words.

KeyWith blocks selected
↑, ↓Select the block above or below instead.
Shift-↑, Shift-↓Take in one more block, or one fewer.
←, EnterBack to writing, at the start of the block.
→Back to writing, at the end of the block.
Backspace, DeleteDelete the blocks.
⌘DDuplicate them: the copies stand after them, selected.
⌘⇧↑, ⌘⇧↓Move them up or down; they stay selected.
⌘⌥0 to ⌘⌥8Turn them into another kind.
⌘C, ⌘XCopy them as Markdown; cut takes them away.
TypingWrites in their place.

A click in the writing puts the caret back and lets the blocks go. Escape also closes Aa’s formatting controls and an open comment, and clears an AI answer’s temporary marks. During IME composition, Escape stays with the input method.

Moving blocks by hand

Rest the pointer on a block until it turns into a hand, then drag it up or down. A press held still for a moment lifts it too.

What it stores

There is no handle. A block is moved with the mouse, on the Drag library’s sortable engine: it lifts, the blocks it passes step aside by its whole height, and it lands where the press is let go.

PressWhat it does
Held still for a momentLifts the block.
Moving up or down firstLifts the block at once.
Moving along the line firstSelects words, as it always has.
On a picture, moving any wayLifts it at once: a picture has no words to select.
On a block the pointer rested onThe cursor has turned into a hand: the press lifts the block whichever way it moves.
On selected blocksDrags them at once. The one pressed is carried, the others wait dimmed in their places, and they land together.
A second or third pressSelects a word or a line; it never lifts.

Let go where it began, a lifted block stays and the caret goes where the press was. A block carried to another block’s side, its first or last fifth and four squares at most, shows a line down that side; let go there, the two stand side by side as columns. Moved blocks stay selected, so ⌘⇧↑, Backspace or another drag act on them next.

Touch keeps its long press for selecting words: there the block menu’s Move up and Move down move blocks. Files dropped from outside land between blocks, on a line drawn where they will go.

⌘D duplicates the block the caret is in, or the blocks selected, and selects the copies. Backspace or Delete deletes selected blocks, and the block menu, ⌘/, holds Duplicate, Delete, Move up and Move down for the block the caret is in. Each is one step to undo. A document with every block deleted keeps one empty paragraph.

editor.selectBlocks(2, 4)            // blocks 2 to 4, selected as blockseditor.selectRange(120, 168)         // words, as offsets into the Markdowneditor.blockAction('duplicate')      // 'delete', 'duplicate', 'up' or 'down', on the selected blocks or the caret'seditor.moveBlock(5, 1, 2)            // two blocks from 5 to 1; they stay selectededitor.selection()                   // { start, end } in the Markdown, or null

See Methods and events.

OptionDefaultWhat it does
menustruefalse also turns off moving blocks by hand.
readOnlyfalseNothing is moved, duplicated or deleted.

Slash and block menus · Undo · Keyboard