Skip to content

The editor

mdai shows you a formatted document and writes plain Markdown to disk. There is no preview pane to keep in sync, because there is nothing to sync: what you see is the file.

Type **bold** and the text turns bold as you close the second *. Put the cursor back inside that word and the ** markers reappear, so you can see what formatting is there. Move away and they hide again.

This is why the file on disk never surprises you. Write this:

# Notes from the call
The client wants **two** things:
1. A shorter form
2. A [link](https://example.com) to the price list
> "Ship the form first."

…and that is exactly what is stored — no wrapper, no HTML, no hidden block.

Action macOS Windows / Linux
New tab ⌘T Ctrl+T
Close tab ⌘W Ctrl+W
Next tab ⌃Tab Ctrl+Tab
Previous tab ⌃⇧Tab Ctrl+Shift+Tab

Note the tab-switching keys use Control on every platform, including macOS — ⌘Tab belongs to the operating system, not to us.

Your open tabs come back the next time you start mdai, with the same tab in front.

  • Drag a tab left or right to change the order. The order stays after a restart.
  • When the tabs don’t fit, the ‹ › arrows and the mouse wheel scroll the tab bar. The + for a new tab stays at the right end, always in view.
  • View → Show Tab Bar hides or shows the tab bar.
  • View → Show All Tabs (⇧⌘\ / Ctrl+Shift+\) lists your open tabs.
  • Right-click a tab for Close, Rename… and Open in Split. Right-clicking in the text also offers Close Tab, next to the usual Copy, Paste and spelling entries.

View → Split Right or View → Split Down opens a second editor next to or below the first. Each pane has its own tabs; there are at most two panes.

  • Right-click a tab and choose Open in Split to move it to the other pane.
  • To move a tab, drag it onto the tab bar or into the text of the other pane. Dropping it in the right or bottom quarter of its own pane makes a new split. Dragging a tab along its own tab bar only changes the order.
  • ⌥-click a file in Files or a [[wikilink]] (Alt-click on Windows and Linux), or press ⌥Enter / Alt+Enter in the Quick Switcher (⌘P / Ctrl+P), to open it in the other pane.
  • A file is never open in both panes at once: opening it again takes you to the pane that has it.
  • Drag the divider between the panes to change their sizes; double-click it to make them equal.
  • The menus, Find, the Outline and the status bar follow the pane you are typing in.
  • Closing the last tab of the second pane closes the split.
  • Both panes, their tabs and the divider come back the next time you start mdai. Unsaved tabs in either pane ask Save, Discard or Cancel before mdai quits.

Press ⌃⌘2 / Ctrl+Shift+2 for the Outline panel. It lists the headings of the document you are in, and clicking one jumps to it. It rebuilds as you type, so a heading you just wrote is in the list before you finish the sentence.

Headings are ordinary Markdown — # through ######.

Type / at the start of a block, or after a space, and a small menu appears next to the cursor. Keep typing to narrow it.

You type You get
/table An empty table, ready to fill in
/quote A blockquote
/date Today’s date, written into the text
/columns Two empty columns side by side — see Columns
  • Enter or Tab picks the highlighted entry
  • ↑ ↓ move through the list
  • Escape closes the menu and leaves the / text alone

The /query you typed is removed from the document when the command runs, so nothing is left behind. Inside a code block or inline code, / is just a slash — the menu does not open there.

Every formatting command has a place in three menus — on macOS in the menu bar, on Windows and Linux under ≡ in the title bar. Format works on text: strong, emphasis, underline, code, inline math, strike, highlight, superscript, subscript, comment and Clear Format, which removes formatting and keeps links. Paragraph works on blocks: headings 1–6, paragraph, heading level up and down, code fences, quote, ordered, unordered and task lists, indent and outdent, and insert a paragraph before or after. Insert puts something new into the note: hyperlink, image, table, math block, columns, footnote, horizontal line, table of contents, YAML front matter and the date. A command that can’t be used where the cursor is, is greyed out.

Everything is written as plain Markdown:

Format In the file
Highlight ==text==
Superscript <sup>text</sup>, and ^text^ is read too
Subscript <sub>text</sub>
Underline <u>text</u>
Table of contents [TOC] on its own line — shown as a list of the headings
Comment <!-- text --> — kept in the file, hidden in every export

Undo (⌘Z / Ctrl+Z) takes back any of them, including YAML front matter added from the menu. The shortcuts are listed in Keyboard shortcuts.

Tab at the start of a paragraph indents it. In the middle of a line, Tab inserts a tab character where the cursor is.

A quote that starts with a type in brackets is shown as a coloured box:

> [!tip] Keep it short
> One idea per note.

The types are [!note], [!info], [!tip], [!warning], [!danger] and [!quote]; the text after the type is the box’s title. Add - after the type ([!tip]-) and the callout starts folded, + and it starts open; click the arrow to fold or unfold it. Folding does not change the file. Put the cursor on the title line to see and edit the marker. In Source Code mode a callout is the plain text you see above.

Columns put part of a note side by side. Choose Insert → Columns, Insert Columns in the command palette (⇧⌘P / Ctrl+Shift+P) or type /columns: two empty columns appear and the cursor goes into the first. Text, images and callouts all work inside a column. Tab moves to the start of the next column and Shift+Tab to the previous one.

In the file, columns are plain Markdown lines around ordinary blocks, each on its own line with an empty line before and after — the way Insert Columns writes them:

::: columns
::: column
Left side.
:::
::: column
Right side.
:::
:::

A set can have two to six columns. The ::: lines are hidden while you write; other editors show them as ordinary text, so nothing is lost. In a narrow window the columns stack one under another. Remove Columns in the command palette, with the cursor in the columns, deletes only the ::: lines — every word stays, one block under another. Columns come with you into PDF and HTML export.

A fenced code block with a language, such as ```python, is coloured as code: keywords, strings and numbers each get their own colour in every theme. To set or change the language, type it in the block’s Language field.

The languages are Bash, C, C++, C#, CSS, Diff, Go, HTML, INI, Java, JavaScript, JSON, Kotlin, Markdown, PHP, Python, Ruby, Rust, SQL, Swift, TOML, TypeScript, XML and YAML. A block in any other language is shown without colour, and its text is saved exactly as written.

Hyperlink (⌘K / Ctrl+K) opens a field for the address below the text. A web address without https://, like example.com, becomes a https:// link; a note name like notes.md stays a link to that note.

You can also type a link: [text](address) becomes a link as soon as you type the closing ). Backspace or ⌘Z / Ctrl+Z right after turns it back into text.

Click a link to edit it — the cursor goes into the link and its source, [text](address), shows. ⌘-click (Ctrl-click on Windows and Linux) opens a web or mail address in your browser or mail app; hovering over a link shows which key to use.

Image in the Insert menu lets you pick an image file and copies it next to your document, the same way a pasted image is saved. Image paths with spaces or %20 in them show as they should.

You can also drag images from Finder, File Explorer or Files straight into a note; they are copied the same way. Where pasted and dropped images go is set in Settings → General → Pasted images folder, and large pasted images can be shrunk there too — see Settings.

New images are named image-1, image-2 … unless you choose otherwise in Settings → General → Name of new images: the note’s name (Note, Note-2 …) or the date and time (20261022-143005). A number is added only when the name is already taken; images already in your notes keep their names. To clean up images no note uses any more, see Unused images.

Save As copies the note’s images to the new place with it. If they can’t be copied, mdai tells you, and they stay next to the original note.

mdai opens with the window size you left it at. A maximized or full-screen window is not remembered — the next launch uses your last normal size.

View → Toggle Focus Mode (F8) dims everything except the part you are writing. View → Toggle Typewriter Mode (F9) keeps the line you are typing in the middle of the window.

Focus, Typewriter scrolling and Writing Mode are described together in Writing Mode, Focus and Typewriter.

  • View → Read-only Mode stops any change to your notes, until you turn it off.
  • Source Code mode (⌘/ / Ctrl+/) shows the raw Markdown so you can edit it directly. Press the same keys again to go back.

Saving rewrites only the part you edited. Blank lines and the rest of the file stay exactly as they were.

Action macOS Windows / Linux
Save ⌘S Ctrl+S
Save As… ⌘⌥S Ctrl+Alt+S

Save As uses ⌘⌥S / Ctrl+Alt+S rather than the ⇧⌘S you may know from other editors — that combination never reaches the app on one of our platforms, so it would have been a key that silently does nothing.