Dotdown™ · editor

Keys and tools in the Dotdown™ box

The box is a plain text field with a few editor habits added. They work while your cursor is in the box, so they never get in the way of the rest of the page.

All the keys

Windows / LinuxMacDoes
..Open the command menu at the start of a line.
Enter / TabEnter / TabPick the highlighted command in the menu.
TabTabAfter a sample line appears, jump to the next part to rename.
Ctrl + Enter⌘ EnterApply the text to the builder now.
Ctrl + F⌘ FFind.
Ctrl + H⌘ Option FFind and replace.
Enter / Shift + EnterEnter / Shift EnterNext / previous match, while the find box is focused.
Ctrl + G⌘ GGo to line.
Ctrl + /⌘ /Comment or uncomment the selected lines.
Ctrl + Z⌘ ZUndo, including a replace or a comment toggle.
EscEscClose the find bar, or the command menu.

Typing a command

Type . at the start of a line and a menu appears with .sect, .input, .list, .constant, .module and the next step (.r1, .r2 …). It narrows as you type. Pick one with Enter, Tab or a tap.

  • Type a whole name like .input at the end of a line and a full sample line appears. Tab selects the name so you can rename it, Tab again selects the rest.
  • Chain commands on one line: the menu also opens after a space for a second .input, .list or .constant.
  • Press Ctrl + Enter (⌘ Enter) to send the text to the builder.
  • Esc closes the menu if you want a plain line.

Find

Press Ctrl + F (⌘ F) with the cursor in the box. A bar opens at the top of the box.

  • Every match is highlighted, the current one in a stronger colour, and the bar shows a count such as “3 of 12”.
  • Enter goes to the next match and Shift + Enter to the previous one. The arrows in the bar do the same.
  • Aa turns on match case. It is off by default, so qty also finds Qty.
  • Press Ctrl + F outside the box and you get the browser’s own find, which is what you want for the rest of the page.

Replace

Press Ctrl + H, or ⌘ Option F on a Mac (⌘ H hides the window on a Mac, so it is not used). A second row appears under the find box.

  • Replace changes the current match and moves to the next. All changes every match and tells you how many (“Replaced 12”).
  • Both go through the browser’s own typing, so Ctrl + Z undoes them. Replace all is one undo step.
  • It is plain text, not patterns. A . or * in the find box just means that character.
  • Handy for renaming a variable: replace qty with quantity everywhere.

Go to line

Press Ctrl + G (⌘ G), type a number and press Enter. The line is selected and scrolled into view.

Errors use it too. An error that begins with Line 4 has that number as a button, and it jumps to the line. The numbers in the left margin match.

Comment toggle

Ctrl + / (⌘ /) adds // to every line the selection touches, or removes it if they are all comments already. With nothing selected it does the line the cursor is on.

Handy for trying a calculator without a step, without deleting it. Select the last two lines and press the key:

.input qty: Quantity
.r1 Subtotal: qty × 12
.r2 Tax: r1 × 0.06

and they become comments:

.input qty: Quantity
// .r1 Subtotal: qty × 12
// .r2 Tax: r1 × 0.06

Comments are not saved in the calculator, so they are gone after “To text” or when the box is reopened. Steps numbered after a commented-out one will need renumbering.

The buttons

  • To calculator ⤵ turns the text into the builder below.
  • To text ⤴ writes the current calculator back as text. Comments you typed are not kept.
  • Magnifier opens find and replace without a key. Copy copies all the text.

On a phone

There are no keyboard shortcuts on a phone, but the same things are there. Tap the magnifier for find and replace, and tap a command in the menu to pick it. A phone keyboard has no Tab, so edit the sample line by hand after picking. The “Line N” in an error is still tappable.

What is not included

The box is plain text, not a code editor, to keep it small and to keep typing on phones reliable. There is no regex search, no multiple cursors, no moving lines with a key and no Vim keys.

Open the builder