Dictionary
Every word you can type in a rules block, every piece of kernel syntax, every target and plugin, and the ideas behind them, each with a live example. The editor's hover cards and its Help window (F1) show exactly these entries.
Start here
#What Selfscribe is, in five minutes.
Start here guide
#Plain to write, rich to read: a document is plain text, and its own rules turn it into a page.
A Selfscribe document is a plain text file. A few lines at its top, the rules block, say what its marks mean, and the editor draws the page from them. Change a rule and the whole document follows.
A file with no rules block reads as Markdown, so you can start writing at once and add a rule only when you want a mark Markdown does not have.
Try it: open the example below, change crimson to seagreen in its rules block, and watch the line change colour.
- Alt+M steps through the five ways to see the text: Source (every mark showing), Hybrid (drawn as you type, Hybrid mode), Write (type on the finished page), Preview (to read) and Split (both).
- F1 on any word of the rules block opens its entry here. Hover a word for a short card.
- The Inspector says what the text under the caret is and which rule made it.
- Rules you like can become a rulebook, which any document borrows them with
use NAME.
Everything the editor shows is text you could type. Panels and dialogs only write lines into the .self file.
~~~ selfscribe
use markdown
line // ! _ -> p.urgent { color: crimson; font-weight: 600 }
~~~
# Weekly notes
Markdown works as usual: **bold**, *italic*, `code` and [links](https://example.com).
// ! This line uses the rule defined above.
- plan the week
- write it down
Weekly notes
Markdown works as usual: bold, italic, code and links.
This line uses the rule defined above.
- plan the week
- write it down
How do I…
#Everyday tasks, step by step: print on A4, pictures, fonts, maths, restyle, share rules, recover work.
Print on A4 or Letter guide
#File › Page setup… chooses the paper and margins, and keeps them in the document.
Open File › Page setup…. Pick the paper (A4, Letter, A5, A3, Legal), portrait or landscape, and the margins, then Save to document. It writes one line in the rules block, such as set page Letter landscape.
Printing (Ctrl+P), PDF, Word and the Pages view in Preview all use it, so what you see is what prints.
Change how the whole page looks guide
#Pick a look (paper, newspaper, academic…) from the Look button in the status bar.
The Look button in the status bar (or View › Document look…) shows each look on your own document: paper, newspaper, academic, a dark or light page, wide or compact, serif or sans, numbered headings, a drop cap, two columns. Looks add up.
Each click edits one line, set style …, in the rules block. Your own rules keep their colours. A look only changes the page around them.
Change how one kind of text looks guide
#Put the caret on it, open the Inspector, press Change how it looks…
Put the caret on the text (a heading, a bold word, a line your rules make) and open the Inspector in the side panel. Change how it looks… opens a designer: colours, weight, spacing, borders, with ready-made styles to start from.
It writes CSS into the rule, in braces. If the rule came from a rulebook, it is first copied into your document, so the rulebook stays as it was. The Inspector warns when colours are hard to read on light or dark pages.
Make a mark of my own guide
#Add one rule to the rules block. A rule says where to look, what to look for, what it becomes and how it looks.
Say you want lines starting !! to be red warnings. Add a line to the rules block:
line !! _ -> p.warn { color: crimson; font-weight: 700 }
line looks at whole lines, !! _ is the pattern (_ is any text), p.warn is what it becomes (a paragraph with the class warn), and the braces hold its CSS. Tools › New rule… builds a rule for you from an example of your text.
~~~ selfscribe
use markdown
line !! _ -> p.warn { color: crimson; font-weight: 700 }
~~~
# Ferry notes
!! The last boat leaves at nine.
Ferry notes
The last boat leaves at nine.
Make a checklist guide
#With Markdown: - [ ] for a box, - [x] for a ticked one.
Write - [ ] Pack the tent for a box and - [x] Book the ferry for a ticked one. Click a box in Preview or Hybrid mode to tick it: the text changes with it.
For a list you can sort, filter and count, use a data table with a done:toggle column instead.
Make a table guide
#With Markdown, write each row between bars.
Write each row between bars: | Saturday | 09:40 |. The line of dashes under the first row, |---|---|, stays off the page.
For a table you can sort and total, use a data block instead.
~~~ selfscribe
use markdown
~~~
| Day | Ferry |
|---|---|
| Saturday | 09:40 |
| Sunday | 11:15 |
| Day | Ferry |
| Saturday | 09:40 |
| Sunday | 11:15 |
Add a link guide
#Write the words in square brackets and the address in round ones.
Write [the timetable](https://example.com/ferry). In a folder, link to another document the same way: [the market](market.self), or [parking](getting-there.self#parking) to reach a heading.
~~~ selfscribe
use markdown
~~~
Check [the timetable](https://example.com/ferry) before you go.
Check the timetable before you go.
Leave a comment guide
#Select the words and choose Edit › Comment on selection… (Alt+Shift+C).
Select the words and choose Edit › Comment on selection… (Alt+Shift+C). The Comments panel lists every comment, and you can answer or resolve each one.
Keep a table I can sort and filter guide
#A data block holds CSV. It shows as a table, cards, a board or a calendar.
Add use data to the rules block, then a block of CSV that starts with ```data NAME. The first line names the columns and can give them types: status:choice(todo|doing|done), due:date, hours:number.
The view has buttons to search, sort, filter and switch between table, cards, board and calendar. Edits you make there are written back to the CSV.
Make slides guide
#Choose Slides from Page and view beside the modes, or write set layout slides.
The Page and view button beside the modes shows the document as Slides. A new slide starts at each ---page--- line, else at each ---, else at each heading. F5 presents full screen. O shows every slide.
To keep it, choose Keep slides for this document in the same menu: it writes set layout slides.
Save them as a rulebook, then use NAME in each document.
In the Inspector, More › Save to a rulebook… keeps a rule under a name. Tools › Manage rulebooks… lists them. Any document can then start with use NAME.
In a folder, a file of rules such as house-style.self works too: use ./house-style.self. selfscribe.css at the root of the folder styles every document in it.
Send a document to someone guide
#File › Export… makes a web page, PDF, Word, EPUB or Markdown.
A web page is one .html file with everything inside: it opens in any browser, offline. PDF and Word use the paper of the document (set page). Markdown is the text without its rules. The .self file itself opens in any text editor.
The Export dialog lists what each format cannot keep, and a folder or workbook can be exported whole, as a book or a small website.
Put a website online guide
#Export the folder as a Website, then press Publish… and pick Cloudflare Pages or GitHub Pages.
In File › Export… choose Every document, then Website, and press Publish…. For Cloudflare Pages, paste an API token with Account › Cloudflare Pages › Edit and your account ID, then press Publish. The dialog shows the address, and each later press uploads only the files that changed. Staging publishes to a preview address first.
For GitHub Pages, Save for GitHub Pages… adds a workflow and the steps to the website, and you push it to a repository of yours. The folder remembers where it was published. Publish from the desktop app: browsers block the web app from calling Cloudflare.
Use other files in a document guide
#Name a file of the same folder: a picture, a diagram, a table, a database, another document.
A document in a folder can show what is beside it, by a path from the document. A picture: . A diagram kept in its own file: a flow block holding from orders.flow view checkout, and import parts.flow for its blocks. A table: view: ./contacts.csv as table, or a data block that reads it (```data contacts from ./contacts.csv); what you change in the view is written to the file. Another document's rules: use ./house-style.self. Another document's text: a rule with the include target.
In the desktop app a SQLite database works the same way, table by table: view: shop.sqlite/clients.csv as board by status shows the table clients of shop.sqlite, and edits go into the database. Nothing is read from outside the folder or from the network. A document opened on its own, not from a folder, still reads what is beside it.
Show a diagram on your own website guide
#Point at a drawn block, press Export… and choose For your website. Paste the code into your page.
Point at a diagram, a chart or a TikZ picture and press Export… over it, then choose For your website. The dialog shows a script line and a tag holding the block’s text. Copy the code and paste it into the HTML of a web page, a forum post or a blog that allows scripts. The picture is drawn there from its text, in the reader’s browser. Nothing is uploaded, and there is no image to keep up to date: to change the picture, change the text in the tag.
<self-tikz> draws TikZ with no TeX installed anywhere, <self-flow> a flow diagram (write <self-flow editable> for an Edit button), <self-block type="chart"> any other block, and <self-doc> a whole document with its own rules. They come from the selfscribe-embed package, which is free to use, to build on and to host yourself: copy its dist folder to your own site and point the script line at it. Its README lists the functions for tools that draw things themselves.
Collect answers with a form online guide
#Run Put a table’s form online… from the command palette. Answers come back as records.
In the desktop app, put the caret in a table and run Put a table’s form online…. The table’s columns become a form at a public address on your own Cloudflare account. Paste an API token with Pages › Edit and D1 › Edit and your account ID, then press Put online. The table can be a .csv file the document shows: put the caret on its view: line, and each answer is a line at the end of the file.
Answers wait on your account until the app takes them in, every ten minutes while the document is open or at once with Check now. Each is added to the table once. Take the form down… deletes the form and every answer still on Cloudflare. For people nearby, Share a table’s form on your network… needs no account.
Reach a shared form from anywhere guide
#While a form is shared, run Reach the shared form from anywhere… It goes through a Cloudflare Tunnel.
In the desktop app, share a table’s form on your network, then press Also reach it from anywhere…. Quick, no account gives an address on trycloudflare.com that changes each time. On your own domain gives a name of yours, with an API token for Cloudflare Tunnel › Edit and DNS › Edit. Both need Cloudflare’s cloudflared installed on this computer. The app never downloads it.
Answers arrive only while the app is open, straight into the table, and nothing is kept on a server. Only the form comes through the tunnel, with a hidden field for robots and limits per connection and per day. For a form that stays up while your computer is off, use Put a table’s form online….
Get back work I lost guide
#Unsaved work waits on Home. Each save keeps a version.
If Selfscribe closed before you saved, open it again: Unsaved work from last time on Home has the text. Each time you save, a version is kept (the last 30): File › Earlier versions… shows how each differs and restores one as a single undo step.
All of this stays on your computer.
Turn a photo or a web page into a document guide
#Tools › AI prompt builder… writes the instructions for any AI assistant.
Choose what to make (a document or a workbook) and from what (a photo, a web page, a file, notes), tick the rulebooks and plugins it may use, and copy the prompt into your assistant with the picture or text. Paste its answer back: the builder opens the files it wrote.
Add a picture guide
#Open the document from a folder or a workbook, then paste or drop the picture. It is saved next to the document.
In a document opened from a folder or a workbook, paste a picture (Ctrl+V) or drop the file on the text. It is saved in images/ beside the document and a line like  is written for you. Change the words in the brackets to describe it for people who cannot see it.
Outside a folder, link to a picture on the web: . Audio and video work the same way with the media plugin.
~~~ selfscribe
use markdown
~~~
# Sunset at the beach

In a folder, a pasted picture is a short line instead: ``.
Sunset at the beach
In a folder, a pasted picture is a short line instead: .
Change the font guide
#For this document, File › Page setup…. For every document, Settings › Text and fonts.
For one document, open File › Page setup… and pick a font for the text and one for the headings. It writes set font Literata and set heading-font Inter in the rules block, so the font travels with the file into Preview, the pages and every export.
For every document you open, Settings › Text and fonts › Default document font. A document that names its own font keeps it. Any font installed on your computer works too: set font Garamond. Word files name the font. Word uses it when the computer that opens the file has it.
Switch the app to dark guide
#Choose a dark theme in View › Theme, or in Settings › Appearance.
Choose a dark theme in View › Theme, or in Settings › Appearance. Follow system matches the light or dark setting of your computer.
Your theme stays in the app. To make a document's page dark for everyone, use a look such as set style dark. To have the app switch theme while a document is open, add set theme to it.
Use a plugin in a document guide
#In Tools › Manage plugins…, choose the plugin and press Add to this document.
Open Tools › Manage plugins…, choose the plugin and press Add to this document. It adds the plugin's rules and an example to the document. The plugins that come with the app are already on.
Add a footnote guide
#With Markdown: a mark in the text, the note on its own line.
Write [^1] where the note belongs, and the note on a line of its own anywhere below: [^1]: The ferry was late again. The marks are numbered in order and the notes gather at the end of the document, with links both ways. Words work as names too: [^ferry].
Word export turns them into real Word footnotes.
Write maths guide
#In Tools › Manage plugins…, choose Math (KaTeX) and press Add to this document. Then $…$ sits in a line and $$…$$ is an equation of its own.
Open Tools › Manage plugins…, choose Math (KaTeX) and press Add to this document. It writes two rules. Then $e^{i\pi} + 1 = 0$ sits in a line of text and a block between $$ lines is an equation of its own, drawn with KaTeX.
Word export writes real Word equations. A web page keeps them drawn.
See tasks as a board or a calendar guide
#A data block shows as board by status. A view: line shows the same records again.
Give a data block a choice column and say how to show it: ```data tasks as board by status. Drag a card to another column and its status changes in the text.
Show the same records again anywhere, another way: view: tasks as calendar (by a date column) or view: tasks as table sort due.
Open a Word file or a PDF guide
#File › Import Word or PDF… makes a Selfscribe document of it.
Choose the file: headings, paragraphs, lists, tables, links and pictures come across as Markdown in a new document, which you then save where you like. Check the result: complex layouts (text boxes, columns in a PDF) come across as plain paragraphs.
Put the same block on many pages guide
#Insert › Page blocks adds a block defined once in the folder’s blocks/, like a properties card at the top.
Open Insert, then pick one under Page blocks: Properties puts a card at the top of the page with a name and a value on each line (status:: draft), and it folds away. The first time, the template is copied to the folder’s blocks/properties.self. The page gets use properties in its rules block and the card’s text under it.
To fill in fields like a form, pick Details form. Its fields have types: in Write, click the card and choose a status from its options, pick a date from a calendar or tick a box, then Save. In Properties, click a value on the page and type.
The look lives in that one file. Change blocks/properties.self and every page that uses it follows, while each page keeps its own values. Its rules block says how the block looks, and its text is what a page starts with: {{isodate}}, {{title}} and {{cursor}} are filled in.
Whole pages start from Planning, Notes, Money and Life: a project tracker, a roadmap, goals and key results, meeting notes, book notes, a decision record, a budget and a daily review. Their tables are linked, so the numbers work themselves out. In the budget, each category adds up its own expenses and says what is left. In the project tracker, each person adds up their tasks. On the roadmap, move one milestone and the ones after it follow.
To file your own templates under a heading in Insert, give them set group Recipes, and set summary for the line under the name.
To add a block to new pages by itself, give its template set auto new. Add set for journal/ to keep it to one folder, and set place end to put it at the bottom. set auto empty fills empty pages too, when you open them. A page block of your own… in Insert starts a new template to change.
~~~ selfscribe
use markdown
block ::: properties ... ::: -> details.properties summary=Properties open=open
line _:: _ -> div.prop data-key=_1 group div.props
class properties { padding: 0.5em 0.9em; border: 1px solid color-mix(in srgb, currentColor 14%, transparent); border-radius: 10px }
class props { display: grid; grid-template-columns: max-content 1fr; column-gap: 1.5em }
class prop { display: grid; grid-column: 1 / -1; grid-template-columns: subgrid }
class prop::before { content: attr(data-key); opacity: 0.6 }
~~~
::: properties
status:: draft
route:: Harbour to the island
:::
# The winter timetable
Properties
The winter timetable
Find and replace in every document guide
#Ctrl+Shift+F searches the open folder and every open tab.
The Search side panel (Edit › Find in folder…, Ctrl+Shift+F) finds text in every document of the folder and every open tab, grouped by file. Replace all shows each file it would change, line by line, before it changes anything, and Undo in the panel puts them back.
Search only headings, only rules or only the text of one kind of element with a structure filter: in:heading ferry.
Add a plugin of my own guide
#A plugin is one JavaScript file: a name, the rule a document adds, and a function that draws.
A plugin file exports an object: name (what documents write after ->), rules (the line Add to this document writes, which must end in -> NAME), and hydrate(element), which draws one block from its text. It may also give title, summary, examples, css, version, network (the hosts it contacts) and credits.
Install it from Tools › Manage plugins… › Install a plugin…. Selfscribe reads its name, rules and the sites it contacts first, apart from your documents and without letting it fetch anything, and asks before installing. In the desktop app you can also drop files in the plugins folder. Selfscribe’s source has a small starter (a clock) and a bigger example (a map with a library). The guide is docs/PLUGINS.md there.
Style @mentions, #tags or times guide
#A word rule with _ styles a mark and the word after it: word @_ -> span.mention.
Add a word rule to the rules block with the mark and _. The _ takes one word, and keep shows the mark as well. @ana, @9:30, #groceries, $12 and v1.2 all work this way.
A comma or full stop after the word stays outside it, and the rule never starts inside a word, so an email address stays plain. To make a tag a link, use the word in an attribute: word #_ -> a.tag href="#_1" keep.
~~~ selfscribe
word @_ -> span.mention keep { color: teal; font-weight: 600 }
word #_ -> span.tag keep { color: slateblue }
word @_:_ -> span.time keep { font-variant-numeric: tabular-nums }
~~~
Meet @ana at @9:40, by the ferry. #harbour
Meet @ana at @9:40, by the ferry. #harbour
Find out why a rule does nothing guide
#The status bar and the line of the rule say what is wrong. The Inspector says which rule won.
A number in the status bar counts problems. Click it for the list. A pattern that can never match, or a rule another one always beats, is marked on its line with the reason and often a fix.
Put the caret on the text and open the Inspector: Where it comes from says which rule made it and which rules it won over. Inline patterns need something you type at both ends (==_==, not _!), and the CSS of a rule goes to its as name when it has one.
Write in one document with other people guide
#File › Share this document live… gives you a code. Others join with it and type alongside you.
In the open document, choose File › Share this document live… and a bar at the bottom shows a code. Send it to the others, and they choose File › Join a live document… and paste it. Each person sees the others type, and where their carets are.
Choose what guests may do when you share. Change everything suits writing a plan together. Fill in the tables only suits a sign-up sheet or a shared budget: guests add and change records in the data blocks, and the text around them stays yours. Only read suits a talk or a lesson.
The document stays one plain file, on your computer. Nothing goes through our servers: in the desktop app the others connect to your computer over your network.
To write with people anywhere, in the web app too, put the address of a relay of your own in Settings › Sync › Relay. Share live then gives a Link for anywhere to send. The relay passes what you type encrypted, with a key that is only in the link, and keeps nothing.
To review rather than write, select the words and choose Edit › Comment on selection… (Alt+Shift+C). Comments are written into the document, so they travel with the file and anyone can answer them.
Note: a table can name who may change it. Write editors ana, tom at the end of the data block's first line, and only those guests change it during a live session.
Keep my computers in step guide
#Settings › Sync keeps a folder in step with storage you choose. Link another computer with a QR code.
There are three kinds of sync. Live together is one document, as you type, between computers: File › Share this document live…. Your own storage keeps a folder in step with a disk, WebDAV, S3, SFTP, git or Google Drive, in the desktop app. A folder another app syncs is a folder inside Dropbox, OneDrive, iCloud Drive or Syncthing, and that app does the syncing. None of them stores your documents on our servers.
For your own storage, open the folder, then Settings › Sync. The quickest way is Sync through your own Cloudflare account: a private bucket in your account, about five minutes to set up, and free for most people. Your files are encrypted before they leave, so Cloudflare cannot read them.
To add another computer, open the place and choose Link a device…. It shows a QR code and a short code. On the other computer choose Join from another device, paste the link or scan the code, and type the short code. The short code never travels, so a photo of the QR code alone opens nothing.
A second disk, a Nextcloud or a server of your own work too. Each keeps your documents as plain files, unless you encrypt them before upload.
For a folder of your Google Drive, make a Google Cloud OAuth client of type "Desktop app", give the place its client id and secret, save it, and press Sign in with Google on the place. The desktop app opens Google’s own page in your browser and keeps the sign-in in the system keychain. Nothing is pasted.
Note: a sync never removes most of a folder by itself. It stops and asks, because that is what an emptied disk looks like.
Put places on a map guide
#A map block holds places, routes, areas and circles, one a line. Records with lat and lng show as a map too.
Write a map block and one thing a line: Café @ 38.7075, -9.1364 is a place, route Walk: Café -> Market goes through places or coordinates, area Old town: … / … / … goes around them, and circle Delivery @ 38.71, -9.13 2km has a middle and a radius. End a line with a colour (red, #e5484d) and -- a note.
Name a city or a country instead of its numbers: Lunch @ Porto, a line of just Coimbra, route Down: Porto -> Coimbra -> Lisbon, circle Near @ Faro 5km, center: Lisbon. A few hundred places are built in, so nothing is looked up on the network; San José, Costa Rica picks between two of one name. Type in Find a place to go there, and press Ctrl-Enter (or Add) to put it on the map. A place you drag away is written as numbers.
Draw on the map instead of typing: pick Place, Route, Area or Circle and click. Drag a place, or a point of a route, to move it; drag the small dot between two points to add one. Rename, recolour or add a note in the strip under the map. Every change is written into the text.
Records with lat and lng columns (or names like start_lat, or one column of lat, lng values) show as a map with view: places as map by kind: the pins take their colour from kind, and dragging a pin moves the record. It works for a data block, a CSV or TSV file, a table of a database or a query, so a map stays up to date as automations change the records.
Mix your own drawing with records: a layer places.csv by kind line in a map block draws those records among its routes and areas. Dragging one of them writes the record, and picking it picks it in every view of that table.
Note: the map draws on a plain grid until you click Show the street map, because the street pictures come from openstreetmap.org. Save as GeoJSON for other map tools, or drop a GeoJSON file on the map.
Plan who goes where, and when guide
#One table of people, places and dates, shown as a timeline and a map that follow each other.
Keep the plan as one table: a title, who, start and end dates, lat and lng, and, if you like, after (what it waits for) and progress. Then show it twice: view: visits as gantt by start to end group who and view: visits as map by who.
The views are linked. Click a bar, a pin or a row and the same record is picked in every view of the table: the map brings it into sight, the timeline scrolls to it.
Under the map, drag out a few days on the time strip (or press play). Pins outside those days fade, each person’s places are joined in date order, and the timeline shades the same days. Dragging along the timeline’s dates does the same the other way.
Write dates as links and the plan keeps itself: +4wd in an end column is four working days after the start, & in a start column is the day after what it waits for ends (its after, else the row above), &+2d leaves a gap of two days and &-1d overlaps by one. Move one task and everything after it follows. The table shows the date with the link beside it.
&s starts with what it waits for (start to start), &s+2d two days after it starts. Critical path marks the tasks that would delay the end if they slipped, and shows how many working days the others could slip as a dotted tail.
Link two tasks by dragging: hover a bar, drag the dot at its end onto the task that waits for it. Its after gains the name and its start becomes &; drag again to take the link out.
Right-click a bar (or press Shift-F10) for its menu: add a task after it, start it after what it waits for, keep its length when moved, fix its dates, move it a week, delete it. Dragging keeps the links.
On the timeline, after draws arrows. A task that starts before what it follows ends turns red; Move it after moves it, and everything after it. Two tasks of the same person on the same days are marked, with the days listed. progress fills each bar.
See the order of work as a diagram with view: visits as flow group who: a step per task, arrows from after, a lane per person, colours by status (done is green, blocked red). Click a step to pick it everywhere; Join two steps (the first, then the one after it) to write after for you.
A diagram you draw yourself can show the same records: in a flow block, write set data=visits. Each step whose words are a record’s title (or that says record="Fit the kiosks") takes the colour of its status, is marked when the record is picked anywhere, and picks it when clicked. The bar under the diagram sets the status (written into the table) or opens the record.
Keep phases in a table of their own and let tasks wait for them: with after:choice(from phases.name), a task’s & follows the phase it names, so a phase that runs late moves its tasks.
Tables linked by a choice (who:choice(from people.name)) follow each other too: pick a person and their visits are marked in every view of the visits; pick a visit and its person is marked.
Note: zoom with Fit, Weeks and Days; Today goes to today. Every drag writes the dates back into the table, one undo step each.
Ideas
#Documents, rules, rulebooks, folders, workbooks.
Document concept
#One text file: an optional rules block, then the body.
A document is one .self file (any UTF-8 text works). It has two parts: an optional rules block at the very top, and the body, which is everything after it.
The rules decide how the body is read. With no rules block, a document behaves as if it started with use markdown, unless it is inside a folder or a workbook that supplies default rules.
Only three things in the body belong to Selfscribe itself: backslash escapes and the @scope and @end lines. Everything else means what the rules say.
~~~ selfscribe
…rules…
~~~
body text~~~ selfscribe
use markdown
word NOTE: -> strong.note { color: steelblue }
~~~
# A document
NOTE: the rules block above adds one word to Markdown.
A document
NOTE: the rules block above adds one word to Markdown.
# Just Markdown
No rules block, so the built-in **Markdown** rules apply.
Just Markdown
No rules block, so the built-in Markdown rules apply.
Rules block concept
#The lines between ~~~ selfscribe and ~~~ at the top of a document.
The rules block is the first non-blank thing in a file. It opens with a line that is exactly ~~~ selfscribe and closes with the next line that is exactly ~~~. It is never part of the rendered output.
Each line inside is blank, a # comment, a line starting with use, scope, set, off, palette or class, a one-line rule starting with its kind (inline, line, block, word), or a full-form rule.
A mistake on one line is reported and that line is skipped. The rest of the document still renders. set rules hide asks editors to fold the block away.
~~~ selfscribe
# a comment
use markdown
line // ! _ -> p.urgent
~~~~~~ selfscribe
# House style for meeting notes
use markdown
line ? _ -> p.question { color: #2f80ed }
word DONE -> strong.done { color: seagreen }
~~~
? Who owns the budget?
Budget review DONE
Who owns the budget?
Budget review DONE
Rule concept
#A rule says where to look, what to look for, what it becomes and how it looks.
A rule is one line of the rules block: its kind, a pattern, an arrow ->, and what it becomes. line # _ -> h1 means: a whole line that looks like # something becomes an h1 heading.
After what it becomes come optional attributes (href=_2), options (group ul, nest), a { css } style and a name (as critical). Long rules can be written in full form instead, one key per line. Both forms mean exactly the same.
The rules drive everything the editor does: highlighting, folding, the formatting toolbar, the slash menu and smart lists all come from the document's rules, not from a built-in grammar.
A later rule with the same kind and pattern replaces an earlier one, including one that came from use. When two different rules could match at the same place, the longest pattern wins.
KIND PATTERN -> BECOMES [attr=value …] [options …] [{ css }] [as NAME]~~~ selfscribe
inline **_** -> strong
line # _ -> h1
block ::: tip ... ::: -> aside.tip { border-left: 3px solid seagreen; padding-left: 0.8em }
word TODO: -> span.todo { color: darkorange; font-weight: 600 }
~~~
# Rules at work
Some **strong** text. TODO: more.
::: tip
A tip box from a block rule.
:::
Rules at work
Some strong text. TODO: more.
Rulebook concept
#A reusable set of rules you bring in with use NAME.
A rulebook is an ordinary .self file whose rules block you want in more than one document. use NAME reads its rules block (its body is ignored) and applies the rules in place, as if you had typed them there.
Six rulebooks are built in: markdown, bbcode, comments, form, plain and workbook. Rulebooks you save yourself live in your library and are used by name in the same way. A built-in name always means the built-in. A saved rulebook cannot shadow it.
Inside a folder, any document can also borrow another file's rules by path: use ./house-style.self.
Your own rules come after the use line and win over the rulebook's, so you can override or switch off (off) any rule you do not like.
use NAME
use ./path/to/file.self~~~ selfscribe
use comments
line // ! _ -> p.critical { color: darkred; text-decoration: underline }
~~~
// ! Critical, now dark red and underlined
// ? A question, unchanged
// - Done and struck through
TODO: the built-in keywords still work
Critical, now dark red and underlined
A question, unchanged
Done and struck through
TODO: the built-in keywords still work
Library concept
#Your saved rulebooks, available to every document by name.
The library holds the rulebooks you save. Once a rulebook called my-notes is saved, use my-notes works in any document, just like use markdown.
Where the files live depends on the app: the web editor keeps them in the browser's storage, the desktop app in its app data folder, and the self command line in ~/.selfscribe/rulebooks (or --library DIR). Each rulebook is a plain NAME.self file you can export, edit and import.
The engine asks the host for the key lib:NAME. If there is no such rulebook the use line reports unknown template 'NAME'. A library rulebook may use built-ins and other library rulebooks by name, but not relative paths, because it has no folder.
One library rulebook can be the default for new documents: set default-rulebook NAME in preferences.self.
~~~ selfscribe
use markdown
use comments
~~~
# Two rulebooks
// ~ Markdown and the comment colours together.
Two rulebooks
Markdown and the comment colours together.
Folder of documents concept
#A folder of documents that share rules through use and selfscribe.self.
A folder is simply a folder you open in the editor. Every .self file in it is a document, and documents can share rules: use ./house-style.self pulls in the rules block of a sibling file, and paths are relative to the file that writes them.
A file named selfscribe.self at the root of the folder holds the folder rules: they apply to every document in the folder, before the document's own rules, unless it says set project off. They replace the built-in Markdown default, so selfscribe.self usually starts with use markdown.
The editor keeps its own state (open tabs, folds) in a .selfscribe/ folder that is safe to delete and never holds rules. Paths that climb out of the folder with .. are refused.
~~~ selfscribe
# selfscribe.self: applies to every document in this folder
use markdown
word DRAFT -> mark
~~~
# Project defaults
Every document here gets Markdown plus the DRAFT keyword.
Project defaults
Every document here gets Markdown plus the DRAFT keyword.
Workbook concept
#Many documents and their rulebooks bundled as one .zip or .gz file.
A workbook is a folder or a zip file with a workbook.self at its root. It is the easiest way to share a set of documents: send one file and everything, rulebooks included, travels together. A .gz workbook holds a single document.
workbook.self is itself a Selfscribe document. Its body lists the documents in order, one per line, nested by indentation and grouped under headings. The editor's Workbook panel is a view over exactly those lines: dragging a document rewrites the file.
The rules in workbook.self are the workbook defaults: they apply to every document in the workbook, the way selfscribe.self does for a folder.
~~~ selfscribe
line # _ -> section fold 1
line - _ -> doc nest
set title Q3 Planning
~~~
# Planning
- intro.self
- goals.self
- goals/engineering.self
# Appendix
- glossary.self
Scope concept
#A named set of extra rules used only between @scope NAME and @end.
Rules normally apply to the whole body. A scope lets some rules apply only to a region: write scope NAME in the rules block, then the rules for that region, then scope alone to go back.
In the body, @scope NAME on its own line switches those rules on until @end. Inside the region the active rules are the default rules plus the scope's rules (a scope rule with the same pattern replaces the default one there).
Scopes are flat: @scope b inside @scope a uses the default rules plus b, not a plus b. Forms are the classic use: questions and checkboxes only where you ask for them.
~~~ selfscribe
use markdown
scope form
line ? _ -> label input=text
line [ ] _ -> label input=checkbox
scope
~~~
# Sign-up
? Outside the region this is just text.
@scope form
? Your name
[ ] Send me the newsletter
@end
Sign-up
? Outside the region this is just text.
Plugin concept
#Something the app knows how to draw: diagrams, maths, charts, music…
A document can only name a plugin, as what a rule becomes: block ``` mermaid ... ``` -> mermaid verbatim. The drawing is done by code the app installed. Documents never carry code.
Some plugins are built into the engine (emoji, csv, tsv, var, include, mermaid, math). Others are client plugins from the app's catalog, switched on and off in Settings › Plugins. Switching is app state, kept in preferences.self as set plugin-NAME on|off. A plugin's options are set plugin-NAME-KEY VALUE lines.
Without the plugin the document still reads well: a chart is still its data, a diagram still its text. A plugin that is switched off shows its blocks with a dashed outline and a note, and the editor offers to switch it on.
No document can make the app fetch anything by itself. Only embed reaches the network, and only after a click or for sites you allowed.
~~~ selfscribe
inline :_: -> emoji
block ``` csv ... ``` -> csv verbatim
~~~
Launch day :rocket: :tada:
``` csv
Planet, Moons
Earth, 1
Mars, 2
```
Launch day 🚀 🎉
| Planet | Moons |
|---|---|
| Earth | 1 |
| Mars | 2 |
Writing rules
#The rules block, rule lines, the four kinds, the long form.
~~~ selfscribe kernel
#Opens the rules block. A line of ~~~ closes it.
The opening fence is a line that is exactly ~~~, one or more spaces, and selfscribe (any case), with no indentation. It must be the first non-blank line of the file (a UTF-8 byte order mark is skipped). ~~~selfscribe without a space is not a fence.
The closing fence is the next line that is exactly ~~~. Trailing spaces are allowed on both. Later ~~~ lines in the body are ordinary text.
If the block is never closed, there is no rules block: the whole file is body under the default rules, with the warning unclosed rules block. While you type, you see text and a squiggle instead of an empty page.
~~~ selfscribe
…
~~~~~~ selfscribe
use markdown
~~~
# Hello
Hello
# kernel
#A comment in the rules block.
A line whose first non-blank character is # is a comment.
A comment can also follow a rule: a # preceded by two or more spaces and followed by a space (or the end of the line) starts a trailing comment, unless it is the first token after the keyword (so line # _ -> h1 is a heading rule), or inside quotes or { }.
Some comments fold in the editor: # region NAME down to # endregion (regions may nest), and a section comment that starts with ---, such as # ---- Headings ----, down to the next one. Use them to tidy a long rules block. To the rules they are still comments.
# comment
RULE # trailing comment
# region NAME … # endregion~~~ selfscribe
# Headings first
line # _ -> h1 # one hash, a heading
line ## _ -> h2
~~~
# Title
## Section
Title
Section
@scope kernel
#In the body: switch to a named scope's rules until @end.
@scope NAME alone on a body line (after indentation) switches the active rules to the default rules plus the rules of scope NAME, until @end or the end of the enclosing region. The line itself produces no output.
A name with no rules declared gives the warning unknown scope 'NAME' and still opens, so @end pairs correctly. An @scope still open at the end of its region closes silently. Inside verbatim content these lines are just text.
@scope NAME
…
@end~~~ selfscribe
scope loud
line _ -> p { font-weight: 700; text-transform: uppercase }
~~~
A normal line.
@scope loud
This region shouts.
@end
Back to normal.
A normal line.
This region shouts.
Back to normal.
@end kernel
#Closes the innermost @scope.
@end alone on a body line closes the innermost open @scope and returns to the enclosing rules. An @end with nothing open gives the warning @end without @scope and is dropped. Other lines that start with @ are ordinary text.
@end~~~ selfscribe
scope quiet
line _ -> p { opacity: 0.6 }
~~~
@scope quiet
Dimmed.
@end
Full strength again.
Dimmed.
Full strength again.
\ (escape) kernel
#In the body, a backslash makes the next punctuation character literal.
In the body, \ followed by ASCII punctuation makes that character literal: it is shown without the backslash and can never start, end or form part of a pattern match. So \*not emphasis\* stays as typed.
Before anything else a backslash is an ordinary character, so C:\Users is left alone. Inside verbatim content (code) the backslash is kept, as in Markdown code spans.
\* \_ \# \\~~~ selfscribe
use markdown
~~~
\*These stars\* are literal, and so is this \# hash.
A path like C:\Users\me is untouched.
*These stars* are literal, and so is this # hash.
A path like C:\Users\me is untouched.
Indentation kernel
#Leading spaces or tabs of a body line: its nesting level.
Selfscribe measures the indentation of each body line and keeps it on the node. Rules match against the line after its indentation. A tab always counts as one level. Spaces count in steps of set indent (2 by default).
Indentation only matters to rules with nest: more-indented lines after such a line become its children. Elsewhere a more-indented line is simply the next line.
~~~ selfscribe
use markdown
~~~
- fruit
- apples
- pears
- vegetables
- fruit
- apples
- pears
- vegetables
Short form syntax
#A whole rule on one line: kind, pattern, ->, what it becomes.
Columns are separated by spaces. The first word is its kind (inline, line, block, word). The pattern runs up to the first -> that stands on its own. It may contain single spaces (// ! _).
After what it becomes, attributes (href=_2), bare slots (_1), options, one { css } block and as NAME may come in any order.
Mistakes are reported and the line is skipped: a missing ->, nothing after it, an empty pattern. An unknown option is only a warning. The rule is kept without it.
KIND PATTERN -> BECOMES [attr=value …] [slot …] [options …] [{ css }] [as NAME]~~~ selfscribe
line // ! _ -> p.critical { color: crimson; font-weight: 600 } as critical
inline [_](_) -> a href=_2
~~~
// ! Ship on Friday, see [the plan](https://example.com).
Ship on Friday, see the plan.
-> syntax
#Separates the pattern from what it becomes.
The first -> with spaces on both sides ends the pattern. Everything after it is the output: what it becomes, its attributes, options, style and name. To match a literal arrow in a pattern, write \->.
PATTERN -> BECOMES~~~ selfscribe
word \-> -> span.arrow { color: seagreen; font-weight: 700 }
~~~
parse -> render -> html
parse -> render -> html
name=value syntax
#Attributes on the output element, filled from slots or written out.
An attribute is name=value after what the rule becomes. The value can be a slot (href=_2), a quoted string (class="a b"), or a bare word (rel=noopener). Inside quotes, a slot character followed by a digit is replaced by that slot's text: style="color: _1".
A slot used in an attribute is consumed: it is not also shown as content. To show it too, list the content slots after it as bare tokens: -> a href=_1 _1 shows the URL as the link text.
Names are checked: they must be lower case, must not start with on, and srcdoc, formaction, action, http-equiv and xmlns are refused. URL attributes (href, src, cite …) accept http, https, mailto, tel, ftp or relative links, and data:image/… on img src only. Anything refused is dropped with a warning. An attribute whose slot came out empty is left out.
BECOMES name=_N name="text _N" name=word _N~~~ selfscribe
inline [_](_) -> a href=_2 rel=noopener
inline [url]_[/url] -> a href=_1 _1
inline [color=_]_[/color] -> span style="color: _1"
~~~
A [link](https://example.com), a bare [url]https://example.org[/url], and [color=seagreen]green text[/color].
A link, a bare https://example.org, and green text.
{ css } syntax
#Plain CSS for everything the rule produces.
A { … } block after what the rule becomes holds ordinary CSS declarations. The rule gets a class of its own (its as name, or self-rN for rule N) and the document's one <style> block gets a line for it, with a comment saying which file and line it came from.
There are no shorthand tokens: it is just CSS. Anything that could fetch or escape is dropped with the warning unsafe css dropped: url(, image(, image-set(, expression(, javascript:, @, \, <, >, { and }. No document can make the browser load something through its styles.
To use one colour in several rules, name it in a palette and write var(--name). To give several rules one look, style a class.
In full form the same declarations go on a style line, without braces.
RULE { property: value; property: value }~~~ selfscribe
line !! _ -> p.callout { background: #fff6e0; border-left: 4px solid darkorange; padding: 0.4em 0.8em; border-radius: 4px }
~~~
!! Styles are plain CSS, scoped to the rule.
Styles are plain CSS, scoped to the rule.
inline WHERE
#A span inside a line of text.
An inline rule matches a stretch of text inside one line: **bold**, [a link](url). The pattern must start and end with a literal (inline pattern must start and end with a literal). Slots take as little text as possible, up to the next literal, and a content slot is never empty.
Inline rules never cross a line break. Text is scanned once from left to right: the match that starts leftmost wins, and at the same start the longest pattern wins. Matched content is scanned again, so inline rules nest: **bold with *italic* inside**.
An inline pattern may have no slots at all ((c)). Its content is then empty unless the rule uses keep.
inline PATTERN -> BECOMES [attr=value …] [options …] [{ css }]~~~ selfscribe
inline **_** -> strong
inline *_* -> em
inline ==_== -> mark
inline [_](_) -> a href=_2
~~~
Some **strong** words, *emphasis*, a ==highlight== and a [link](https://example.com).
***Both at once*** works too.
Some strong words, emphasis, a highlight and a link. Both at once works too.
line WHERE
#A whole line, after its indentation.
A line rule matches an entire line, anchored at both ends. A trailing slot takes the rest of the line (# _). A pattern with no slot matches a line that is exactly that text (---). A lone _ matches every line.
The line is matched after its indentation, with trailing spaces removed. Each space in the pattern matches exactly one space, and captured text is trimmed.
Lines that no rule matches become paragraphs: consecutive plain lines merge into one p, and a blank line ends it.
line PATTERN -> BECOMES [attr=value …] [options …] [{ css }]~~~ selfscribe
line # _ -> h1
line ## _ -> h2
line --- -> hr
line // ! _ -> p.urgent { color: crimson }
~~~
# A title
## A section
Two plain lines
make one paragraph.
---
// ! An urgent line
A title
A section
Two plain lines make one paragraph.
An urgent line
block WHERE
#An opening line, any number of body lines, and a closing line.
A block pattern has three parts separated by ...: the opening line, the body, and the closing line. Both the opening and the closing part need a literal. Each space in them matches zero or more spaces, so ``` _ also matches ```js.
Block rules are tried before line rules. An opener only counts if its closer is found. Otherwise the warning unclosed block is shown and the opening line becomes an ordinary paragraph. A verbatim body ends at the first closing line and is kept as raw text. Other bodies are parsed with the same rules and may nest.
When the opening part has no slot, the one-line form also works: <!-- note --> or $$ x^2 $$. Slots in the opening line can only feed attributes (lang=_1). The body is the content.
Any block can be given a size at the end of its opening line: ``` mermaid maxwidth:800px, width:50%, height:20em, align:center. These words are not part of what the rules match, so the diagram is still a diagram. A length is a number with px, em, rem, ch, %, vw, vh, cm, mm, in or pt (a bare number is pixels), or full.
block OPEN ... CLOSE -> BECOMES [attr=value …] [options …] [{ css }]~~~ selfscribe
use markdown
block ::: tip ... ::: -> aside.tip { border-left: 3px solid seagreen; padding-left: 0.8em }
~~~
```js
const answer = 42;
```
::: tip
Block bodies are parsed with the same rules, so **bold** works here.
:::
<!-- this comment renders nothing -->
const answer = 42;
word WHERE
#A word, or a mark and one word, wherever it appears.
A word rule matches a fixed token wherever it appears in text, outside verbatim content: TODO:, FIXME:, (c). It respects word boundaries on any edge that is a letter, digit or _, so TODO: does not match inside xTODO:.
Add _ to match a mark and one word: word @_ -> span.mention styles @ana and @9:30, word #_ styles #groceries, word _% styles 50%. A word is letters, digits and _, with -, ., : or / allowed between them, so a full stop or comma after it stays outside. A slotted word rule never starts inside a word, so email@host stays plain.
As in inline rules, the mark is dropped and the word is the content. Add keep to show the mark too, or use the word in an attribute: word #_ -> a.tag href="#_1" keep. A word rule has one or two _ (#_/_) and some fixed text. A longer fixed part wins, so word @ana beats word @_.
word TOKEN -> BECOMES [attr=value …] [{ css }]~~~ selfscribe
word TODO: -> span.todo { color: darkorange; font-weight: 600 }
word FIXME: -> span.fixme { color: crimson; font-weight: 600 }
word (c) -> text
~~~
TODO: write the intro. FIXME: the date.
But notTODO: stays plain.
TODO: write the intro. FIXME: the date. But notTODO: stays plain.
~~~ selfscribe
word @_ -> span.mention keep { color: teal; font-weight: 600 }
word #_ -> span.tag keep { color: slateblue }
word $_ -> span.money keep { font-variant-numeric: tabular-nums }
~~~
Ask @ana about the 9:40 ferry, #harbour.
Tickets are $12.50, and email@host stays plain.
Ask @ana about the 9:40 ferry, #harbour. Tickets are $12.50, and email@host stays plain.
where full-form key
#Full form: where the rule matches.
The kind of a full-form rule: inline, line, block or word. Any other value is a warning.
where inline|line|block|word~~~ selfscribe
rule
where line
match => _
out p.arrow
~~~
=> an arrow line
an arrow line
match full-form key
#Full form: the pattern.
The pattern, exactly as in the short form: literals, slots, _#, ... in blocks. A rule has either match or re, never both.
match PATTERN~~~ selfscribe
rule shout
where inline
match !!_!!
out strong
~~~
That is !!loud!!.
That is loud.
out full-form key
#Full form: what the rule becomes, its attributes and content slots.
What the rule becomes: the element with its classes, attributes, and bare slots, as after -> in the short form. Options are keys of their own in the full form, not part of out.
out BECOMES[.class] attr=value … [_N …]~~~ selfscribe
rule link
where inline
match <_|_>
out a href=_2 rel=noopener
~~~
Visit <the site|https://example.com>.
Visit the site.
style full-form key
#Full form: CSS declarations, without braces.
The same declarations as a { css } block in the short form. Several style lines are joined with ; .
style property: value; property: value~~~ selfscribe
rule note
where line
match NB _
out p.nb
style color: steelblue
style font-style: italic
~~~
NB this is a note
this is a note
editor full-form key
#Full form: hints for the source editor.
Comma-separated hints for how the rule's text looks in the editor: colour C, icon "X", bold, italic, hide. They are stored with the rules and never change the HTML.
editor colour C, icon "X", bold, italic, hide~~~ selfscribe
rule
where inline
match !!_!!
out strong.shout
editor colour crimson, bold, hide
~~~
In the editor, !!this!! is red and bold.
In the editor, this is red and bold.
doc full-form key
#Full form: a human description of the rule.
A sentence explaining the rule, shown in the Inspector and the rule wizard. Several doc lines are joined with a space.
doc TEXT~~~ selfscribe
rule aside
where line
match ( _ )
out p.aside
style opacity: 0.7
doc An aside: a quieter paragraph in brackets.
~~~
( a quieter thought )
a quieter thought
colour editor hint
#Editor hint: the colour of the rule's text in the source editor.
colour C colours the text the rule matches in the source editor (any CSS colour). The formatting toolbar also uses it for the rule's button.
editor colour C~~~ selfscribe
rule
where word
match NOTE:
out strong
editor colour steelblue
~~~
NOTE: blue in the editor.
NOTE: blue in the editor.
icon editor hint
#Editor hint: an icon for the rule (stored, not shown yet).
icon "X" records an icon for the rule. It is kept with the rules for editors, but this editor does not show icons yet.
editor icon "X"~~~ selfscribe
rule
where line
match ! _
out p.alert
editor icon "!"
~~~
! An alert line
An alert line
bold editor hint
#Editor hint: bold in the source editor.
Shows the rule's text in bold in the source editor. No effect on the HTML.
editor bold~~~ selfscribe
rule
where word
match IMPORTANT
out strong
editor bold
~~~
IMPORTANT in bold, in both places.
IMPORTANT in bold, in both places.
italic editor hint
#Editor hint: italic in the source editor.
Shows the rule's text in italic in the source editor. No effect on the HTML.
editor italic~~~ selfscribe
rule
where inline
match ~_~
out em
editor italic
~~~
A ~slanted~ word.
A slanted word.
hide editor hint
#Editor hint: hide the rule's delimiters in hybrid mode.
Hides the dropped delimiters of the rule's matches in hybrid mode, except on the lines under the caret, so !!loud!! reads as just loud until you edit it.
editor hide~~~ selfscribe
rule
where inline
match !!_!!
out strong
editor hide
~~~
The !!marks!! disappear while you read.
The marks disappear while you read.
Patterns
#What a rule matches: the _, the text you type, which rule wins.
Literal text pattern
#Everything in a pattern is matched as written, except slots, ... and \.
A pattern is literal text with holes. Only four things are special: slots (_, _1…_9), the digit slot _#, ... in block patterns, and the backslash escape. There are no regular expressions in the short form.
Runs of spaces in a pattern collapse to one space. To match two spaces, write \ \ . A pattern can be at most 256 characters.
A closing literal made of one repeated character, such as **, slides to the end of a run of that character, so ***c*** becomes strong around emphasis.
~~~ selfscribe
inline <<_>> -> q
inline [[_]] -> kbd
~~~
She said <<hello>>. Press [[Ctrl]] + [[K]].
She said hello
. Press Ctrl + K.
_ pattern
#A capture slot: the part of the match that varies.
_ captures text. Slots are numbered left to right. A bare _ takes the next number after the highest so far. A pattern has at most 9 slots, and two slots need a literal between them (adjacent slots in pattern).
By default the slots become the node's content, in order, except slots used by attributes (href=_2). Bare slot tokens after what the rule becomes list the content explicitly.
The slot character can be changed per file with set slot, useful when _ itself is a delimiter: after set slot $, __$__ means double underscores around a slot.
_ _1 … _9~~~ selfscribe
inline [_](_) -> a href=_2
~~~
Read [the spec](https://example.com/spec) first.
Read the spec first.
_1 … _9 pattern
#A slot with an explicit number.
_1 to _9 are numbered slots. The number is how attributes and bare slots refer to it. Writing the numbers lets you reorder: [_2|_1] captures the second part first. A number used twice is an error (duplicate slot N).
_0 is not a slot: it is a literal underscore followed by 0. An attribute or bare token naming a slot that is not in the pattern gets the warning slot N not in pattern and is dropped.
_1 … _9~~~ selfscribe
inline {_1|_2} -> abbr title=_2 _1
~~~
The {WHO|World Health Organization} met today.
The WHO met today.
_# pattern
#One or more digits: never content, but an attribute can read them.
_# matches one or more ASCII digits and is not part of the content, which is exactly what ordered lists need: _#. _ matches 1., 2. and 10..
An attribute can read the first _# of a pattern as _#: value=_#, or group-start=_# so that a list starting at 5. counts from 5 (group).
It counts as one literal character for "longest pattern wins", and as a slot for the rule that two slots need a literal between them.
_#~~~ selfscribe
line _#. _ -> li group ol
~~~
1. first
2. second
10. tenth
- first
- second
- tenth
~~~ selfscribe
line _#. _ -> li group ol group-start=_#
~~~
5. fifth
6. sixth
- fifth
- sixth
... pattern
#In a block pattern: separates the opening line, the body and the closing line.
In a block pattern, a ... standing on its own between spaces splits the pattern into the opening line, the body and the closing line. A block pattern must contain it (block pattern needs '...'), and both sides need a literal.
In inline, line and word patterns ... is ordinary text.
block OPEN ... CLOSE -> BECOMES~~~ selfscribe
use markdown
block ::: note _ ... ::: -> section.note title=_1 { border: 1px solid steelblue; border-radius: 6px; padding: 0.4em 0.8em }
~~~
::: note Remember
Blocks take **any** body.
:::
Blocks take any body.
\ (in a pattern) pattern
#Makes the next pattern character literal.
In a pattern, \ makes the next character literal: \_ matches an underscore instead of opening a slot, \-> matches an arrow, and \ is a space that is never collapsed.
\_ \-> \ ~~~ selfscribe
inline \__\_ -> em
~~~
Some _underscored_ emphasis.
Some underscored emphasis.
Longest pattern wins pattern
#How Selfscribe picks between rules that could match at the same place.
When two rules could match at the same position, the one with more literal characters wins: **_** beats *_*. The digit slot counts as one character. Other slots count zero. A block counts its opening and closing parts.
A tie goes to the rule defined last, so a document overrides what it imported. For inline rules, the match that starts leftmost wins first.
Matching happens in a fixed order: block rules, then line rules, then inline and word rules inside the resulting text.
A rule with exactly the same kind and pattern as an earlier one replaces it. The Inspector shows the replaced rule struck through.
~~~ selfscribe
inline *_* -> em
inline **_** -> strong
~~~
*one star* and **two stars**
one star and two stars
re full-form key
#Full form only: a regular expression instead of a pattern.
In a full-form rule, re replaces match with a regular expression whose numbered groups 1 to 9 are the slots. It works for inline and line rules only. A line regex must match the whole line.
It is an escape hatch and off unless the host enables it (allow_re). This editor leaves it off, so the rule is skipped with the warning regex rules are disabled. A bad expression is the error invalid regex. The short form never has regular expressions.
rule
where inline
re REGEX
out BECOMES~~~ selfscribe
rule ticket
where inline
re #(\d+)
out a href="https://example.com/issues/_1"
~~~
See #42.
See #42.
Shows a warning on purpose: “regex rules are disabled”.
What rules make
#Elements, special words, attributes.
Shows nothing. The text stays in the file.
A reserved name after ->: the match renders nothing, but the node stays in the document for the editor (highlighting, folding). Comments and Markdown's table separator rows use it. Hidden nodes inside a group do not break it.
-> hidden~~~ selfscribe
use markdown
line %% _ -> hidden
~~~
Visible text.
%% a private note
More visible text.
Visible text.
More visible text.
text target
#Renders the content with no element around it.
A reserved name after ->: the content is emitted as is, unwrapped. Use it to drop delimiters without adding markup, or to turn a word into a plain symbol.
-> text~~~ selfscribe
inline <<_>> -> text
~~~
The <<brackets>> vanish, nothing is added.
The brackets vanish, nothing is added.
An unknown name after -> target
#A rule that becomes something that is neither an element nor a plugin that is on.
What a rule becomes is looked up in order: the reserved hidden and text, then registered plugins, then allowed HTML elements. Anything else is unknown: it renders as <div class="self-unknown" data-target="NAME"> (a span for inline rules) around the content, and the rule gets one warning unknown target 'NAME'.
The most common cause is a plugin that is switched off. The editor offers to switch it on.
~~~ selfscribe
line ! _ -> blink
~~~
! This renders, with a dashed outline and a warning.
Shows a warning on purpose: “unknown target 'blink'”.
Elements Selfscribe refuses target
#script, iframe, style and friends are not allowed.
These names are refused unless the host enables unsafe HTML: script, iframe, object, embed, style, link, meta, base, form. They render like unknown names, with the warning target 'X' is not allowed.
To show a web page, use the embed plugin. For live HTML, use the html plugin. Both run in a sandbox.
~~~ selfscribe
block <js> ... </js> -> script verbatim
~~~
<js>
alert(1)
</js>
Shows a warning on purpose: “target 'script' is not allowed”.
footref target
#A footnote reference: [^key] becomes a numbered link to the note.
A built-in plugin, in the Markdown rules as [^key]. References are numbered in the order their notes are first referenced. The number links to the note, and the note's number links back. A key with no note stays as written, with a warning. See footnote.
inline [^_] -> footrefbibliography target
#The list of works cited, from a .bib file or a records block.
A built-in plugin. The content names a source: a BibTeX file (refs.bib) or a data block of records. It lists the references the document cites (add all to list every one), author-year by default or numbered with set cite-style numeric (cite-style). See citation.
line bibliography: _ -> bibliography~~~ selfscribe
use markdown
inline [@_] -> citation
line bibliography: _ -> bibliography
block ```data\ _ ... ``` -> data info=_1 verbatim
~~~
As Knuth argued [@knuth1984].
```data refs records as hidden
key: knuth1984
author: Donald E. Knuth
title: Literate Programming
year: 1984
```
bibliography: refs
As Knuth argued (Knuth 1984).
- Knuth, D. E. (1984). Literate Programming.
eqref target
#A reference to a numbered equation: [@eq:label] becomes (1).
A built-in plugin. The content is an equation's label (a leading eq: is optional). The result is its number in parentheses, linked to it. An unknown label stays as written, with a warning. See equation.
inline [@eq:_] -> eqref~~~ selfscribe
block $$ {#_} ... $$ -> equation label=_1 verbatim
inline [@eq:_] -> eqref
~~~
See [@eq:area].
$$ {#area}
A = \pi r^2
$$
See (1).
ref target
#A reference by label: [@fig:map] becomes Figure 2, linked, and stays right when things move.
A built-in plugin. The content is a label. Its kind comes from kind= on the rule, else from a prefix as pandoc-crossref writes them (fig:, tbl:, thm:, lem:, def:, eq: and more), else any numbered block with that label. It shows the name and number (Figure 2, or (3) for an equation), links to it, and its caption shows on hover. An unknown label stays as written, with a warning.
In a LaTeX export it becomes Figure~\ref{…}, so LaTeX keeps the numbers.
inline [@fig:_] -> ref kind=figure~~~ selfscribe
use markdown
block ::: table {#_} _ ... ::: -> numbered kind=table label=_1 caption=_2
inline [@tbl:_] -> ref kind=table
~~~
The times are in [@tbl:tides].
::: table {#tides} High water
| Day | Time |
| --- | ---- |
| 1 | 06:10 |
:::
The times are in Table 1.
| Day | Time |
| 1 | 06:10 |
abbreviation target
#Defines a term without showing it: its uses get the meaning on hover.
A built-in plugin, like glossary but the definition renders nothing (as Markdown Extra's *[HTML]: ... lines). Every use of the term in the text becomes an <abbr> with its meaning.
line *[_]: _ -> abbreviation key=_1~~~ selfscribe
use markdown
line *[_]: _ -> abbreviation key=_1
~~~
The W3C writes the standards.
*[W3C]: World Wide Web Consortium
The W3C writes the standards.
csv target
#A table from comma-separated lines.
A built-in plugin: a verbatim body of comma-separated lines becomes a real table. The first row is the header. Fields may be quoted with " ("" is a quote). Cells are plain text, never parsed for rules.
block ``` csv ... ``` -> csv verbatim~~~ selfscribe
block ``` csv ... ``` -> csv verbatim
~~~
``` csv
City, Country, "Population, millions"
Lisbon, Portugal, 0.5
Porto, Portugal, 0.2
```
| City | Country | Population, millions |
|---|---|---|
| Lisbon | Portugal | 0.5 |
| Porto | Portugal | 0.2 |
tsv target
#A table from tab-separated lines.
The same as csv, with tabs between the fields instead of commas.
block ``` tsv ... ``` -> tsv verbatim~~~ selfscribe
block ``` tsv ... ``` -> tsv verbatim
~~~
``` tsv
Name Role
Ada Engineer
Grace Admiral
```
| Name | Role |
|---|---|
| Ada | Engineer |
| Grace | Admiral |
data target
#Typed records (CSV, TSV, JSON, JSON Lines, records or a file of the folder), shown as a view of themselves.
A built-in plugin. The info attribute holds NAME [FORMAT] [from PATH] [VIEW OPTIONS]. The verbatim body holds the records, the first line naming the columns and their types. Views find the block by its name. use data brings the rule (and Markdown).
Unlike csv, cells are typed and checked, and the block can be sorted, filtered, shown as cards or a board, and edited. See Data and views.
block ```data\ _ ... ``` -> data info=_1 verbatim~~~ selfscribe
use data
~~~
```data costs sort amount desc sum amount
item, amount:number, paid:bool
Rent, 900.00, yes
Coffee, 3.20, no
```
| item | amount | paid |
|---|---|---|
| Rent | 900.00 | |
| Coffee | 3.20 | |
| Total | 903.20 |
var target
#Shows the value of a variable by name.
A built-in plugin. The content is a variable name. The result is its value, from the host first, then the document's set lines (including title). A missing variable is empty, with no warning.
inline {{_}} -> var~~~ selfscribe
set event Launch party
set date Friday
inline {{_}} -> var
~~~
You are invited to the {{event}} on {{date}}.
You are invited to the Launch party on Friday.
include target
#Pulls in the body of another file.
A built-in plugin. The content is a path, resolved like use. The other file's body is parsed here with this document's rules. If the other file has a rules block of its own, those rules read its body too, laid over this document's for that body only, so a part written with its own notation can be included as it is. Its links and pictures are read from its own folder. In a folder, !include chapters/one.self stitches chapters together.
It needs a line or block rule. A cycle is cut with a warning, and a file that cannot be found is the error cannot resolve include.
line !include _ -> include~~~ selfscribe
use markdown
line !include _ -> include
~~~
The next line pulls in a body from another file:
!include workbook
The next line pulls in a body from another file:
doc target
#In workbook.self: one document of the workbook.
doc and section are names only a workbook knows: in a workbook.self, doc names one document by path (its order and nesting are recorded) and section groups documents under a heading. Outside a workbook they are not registered, so doc is unknown there.
line - _ -> doc nest~~~ selfscribe
line # _ -> section fold 1
line - _ -> doc nest
~~~
# Part one
- intro.self
- chapter-1.self
Headings target
#h1 to h6 and hgroup.
A target that is an allowed HTML element name makes that element: h1, h2, h3, h4, h5, h6, hgroup. Add classes with dots (p.note, li.task.done).
Heading rules usually carry fold N so the editor can fold each section.
-> h1[.class]~~~ selfscribe
line # _ -> h1 fold 1
line ## _ -> h2 fold 2
line ### _ -> h3 fold 3
~~~
# Book
## Chapter
### Scene
Book
Chapter
Scene
Text elements target
#Inline elements: strong, em, code, mark, span and the rest.
A target that is an allowed HTML element name makes that element: abbr, b, bdi, bdo, br, cite, code, data, del, dfn, em, i, ins, kbd, mark, q, s, samp, small, span, strong, sub, sup, time, u, wbr. Add classes with dots (p.note, li.task.done).
These are what inline and word rules usually become.
-> abbr[.class]~~~ selfscribe
inline **_** -> strong
inline ==_== -> mark
inline ^_^ -> sup
inline ,,_,, -> sub
inline ++_++ -> ins
inline [[_]] -> kbd
~~~
**Strong**, ==marked==, E = mc^2^, H,,2,,O, ++inserted++ and [[Ctrl]]+[[S]].
Strong, marked, E = mc2, H2O, inserted and Ctrl+S.
Block elements target
#Paragraphs, quotes, preformatted text, sections and dividers.
A target that is an allowed HTML element name makes that element: address, article, aside, blockquote, div, figcaption, figure, footer, header, hr, main, nav, p, pre, section. Add classes with dots (p.note, li.task.done).
Lines no rule matches become p paragraphs on their own. Block rules often become aside, section or div with a class and a style for callouts.
-> address[.class]~~~ selfscribe
line > _ -> p group blockquote
line --- -> hr
block ::: aside ... ::: -> aside { border-left: 3px solid gray; padding-left: 0.8em; color: gray }
~~~
> To be read slowly.
---
::: aside
A remark on the side.
:::
To be read slowly.
Lists target
#ul, ol, li and description lists (dl, dt, dd).
A target that is an allowed HTML element name makes that element: dd, dl, dt, li, ol, ul. Add classes with dots (p.note, li.task.done).
List items are grouped into their list with group ul or group ol, and nested with nest. Two rules with the same group dl build one description list.
-> dd[.class]~~~ selfscribe
line - _ -> li group ul nest
line = _ -> dt group dl
line : _ -> dd group dl
~~~
- bread
- rye
- cheese
= Slot
: The part of a match that varies.
- bread
- rye
- cheese
- Slot
- The part of a match that varies.
Tables target
#table, rows, cells and their parts.
A target that is an allowed HTML element name makes that element: caption, col, colgroup, table, tbody, td, tfoot, th, thead, tr. Add classes with dots (p.note, li.task.done).
A row rule with split makes the cells, and group table collects the rows.
-> caption[.class]~~~ selfscribe
line | _ | -> tr group table split "|" td
~~~
| Tea | Coffee |
| Green | Black |
| Tea | Coffee |
| Green | Black |
Links and images target
#a for links and img for pictures.
A target that is an allowed HTML element name makes that element: a, img. Add classes with dots (p.note, li.task.done).
Their URL attributes are checked: http, https, mailto, tel, ftp or relative, and data:image/… on img src only.
-> a[.class]~~~ selfscribe
inline  -> img alt=_1 src=_2
inline [_](_) -> a href=_2
~~~
A [link](https://example.com) and a dot: 
A link and a dot:
Details and form controls target
#details, summary, label and input.
A target that is an allowed HTML element name makes that element: details, input, label, summary. Add classes with dots (p.note, li.task.done).
details makes a disclosure widget. Browsers show a caption only for a summary element inside it, so give the caption line a rule of its own that becomes summary, as in the example. For inputs prefer the input= option, which puts a control in front of the content.
-> details[.class]~~~ selfscribe
block ??? ... ??? -> details
line Q: _ -> summary
~~~
???
Q: What does Selfscribe stand for?
Text that formats itself.
???
What does Selfscribe stand for?
Text that formats itself.
Ruby annotations target
#ruby, rt and rp for pronunciation guides.
A target that is an allowed HTML element name makes that element: rp, rt, ruby. Add classes with dots (p.note, li.task.done).
Ruby annotations put small text above characters. Nest an rt rule inside a ruby rule.
-> rp[.class]~~~ selfscribe
inline {_} -> ruby
inline ^_^ -> rt
~~~
{漢^kan^}{字^ji^}
漢字
href attribute
#The address of a link.
On a. URLs are checked: http, https, mailto, tel, ftp or relative. Anything else (such as javascript:) is dropped with unsafe url dropped.
-> BECOMES href=VALUE~~~ selfscribe
inline [_](_) -> a href=_2
~~~
Read [the guide](https://example.com/guide).
Read the guide.
src attribute
#The source of an image.
On img. Checked like href. data:image/png, gif, jpeg, webp, avif and svg+xml are also allowed here, and only here.
-> BECOMES src=VALUE~~~ selfscribe
inline  -> img alt=_1 src=_2
~~~
 a picture from a data URL.
a picture from a data URL.
alt attribute
#The text description of an image.
On img: read aloud by screen readers and shown when the picture cannot load. An alt slot may be empty ().
-> BECOMES alt=VALUE~~~ selfscribe
inline  -> img alt=_1 src=_2
~~~
A picture with a description: 
A picture with a description:
title attribute
#Tooltip text.
Shown when the pointer rests on the element. Here an abbreviation carries its expansion.
-> BECOMES title=VALUE~~~ selfscribe
inline {_|_} -> abbr title=_2 _1
~~~
Written in {HTML|HyperText Markup Language}.
Written in HTML.
lang attribute
#A language, for example of a code block.
On a code block, lang=_1 records the language written after the opening fence, for highlighters.
-> BECOMES lang=VALUE~~~ selfscribe
block ``` _ ... ``` -> code lang=_1 verbatim
~~~
```python
print("hello")
```
print("hello")
class attribute
#Extra classes for styling.
Classes can also be written with dots after the element (p.note). Quote several: class="a b".
-> BECOMES class=VALUE~~~ selfscribe
inline !!_!! -> span class="loud big"
~~~
This is !!loud!!.
This is loud.
id attribute
#An element id, for links to it.
An id makes a place other links can point to with #id.
-> BECOMES id=VALUE~~~ selfscribe
use markdown
line ## _ (#_) -> h2 id=_2
~~~
## Getting there (#travel)
Jump to [the section](#travel).
Getting there
Jump to the section.
cite attribute
#The source of a quotation (a URL).
On blockquote or q. Checked like other URLs.
-> BECOMES cite=VALUE~~~ selfscribe
block [quote=_] ... [/quote] -> blockquote cite=_1
~~~
[quote=https://example.com/speech]
We choose to go.
[/quote]
We choose to go.
summary attribute
#An attribute on the element, as in the spec's spoiler rule.
The spec's details example keeps the caption in a summary=_1 attribute. It is an ordinary attribute: browsers show a visible caption only for a summary element, which a rule of its own can make (see Details and form controls).
-> BECOMES summary=VALUE~~~ selfscribe
block ::: spoiler _ ... ::: -> details summary=_1
~~~
::: spoiler The ending
They all lived.
:::
The ending
They all lived.
style attribute
#Inline CSS on one element.
Checked like { css } blocks: a value that could fetch or escape drops the whole attribute (unsafe style attribute dropped). Use quotes and slot references: style="color: _1".
-> BECOMES style=VALUE~~~ selfscribe
inline [color=_]_[/color] -> span style="color: _1"
~~~
Some [color=crimson]red[/color] and [color=seagreen]green[/color].
Some red and green.
target attribute
#Where a link opens.
For example target="_blank" (quoted, so the underscore is not a slot).
-> BECOMES target=VALUE~~~ selfscribe
inline [_](_) -> a href=_2 target="_blank" rel=noopener
~~~
Opens [in a new tab](https://example.com).
Opens in a new tab.
rel attribute
#How a link relates to the page it opens.
Commonly rel=noopener or rel=nofollow.
-> BECOMES rel=VALUE~~~ selfscribe
inline [_](_) -> a href=_2 rel=nofollow
~~~
A [sponsored link](https://example.com).
datetime attribute
#A machine-readable date on time.
Lets tools read the date while people read the text.
-> BECOMES datetime=VALUE~~~ selfscribe
inline @_@ -> time datetime=_1 _1
~~~
Due @2026-09-30@.
Due .
Rule options
#group, nest, split, fold, verbatim and friends.
key modifier
#A keyboard shortcut that applies the rule while you write: key Ctrl+B.
Pressing the shortcut wraps the selection in an inline rule (again to unwrap it), or turns the lines you are on into a line or block rule (again for plain text). It changes nothing in the output.
A shortcut is Ctrl, Alt and Shift (any of them, joined with +) and one key: a letter, a digit, a punctuation mark, or F1 to F24. It needs Ctrl or Alt, except F-keys. On a Mac, Ctrl means ⌘. Inside the document it wins over the app's own shortcuts, except save, undo, copy, paste, select all, find, the palette, close and new.
RULE key SHORTCUT~~~ selfscribe
inline ==_== -> mark key Ctrl+Shift+H
~~~
Select a word and press Ctrl+Shift+H: it gets ==marked==.
Select a word and press Ctrl+Shift+H: it gets marked.
verbatim modifier
#The content is not scanned for other rules. Whitespace is kept.
With verbatim, whatever the rule captures is taken exactly as written: no inline rules inside, spaces and line breaks preserved, backslashes kept. Code, maths and diagram blocks use it.
A verbatim block ends at the first closing line. It cannot nest.
RULE verbatim~~~ selfscribe
inline **_** -> strong
inline `_` -> code verbatim
~~~
**bold** but `**not bold**` in code.
bold but **not bold** in code.
group modifier
#Wraps neighbouring matches in one element, such as list items in a ul.
group X wraps a run of neighbouring matches of rules with the same group X in one X element: list items in ul, table rows in table, quote lines in blockquote.
Blank lines and @scope/@end lines do not break the run. A paragraph or any other node does. ul and ol are different groups. The wrapper may have classes: group ul.tasks.
An attribute named group-NAME= goes on the wrapper, from the first match of the run: group-start=_# starts an ol at the number of its first item (left out when it is 1), and group-class=wide adds a class to it.
RULE group ELEMENT[.class]~~~ selfscribe
line - _ -> li group ul
line > _ -> p group blockquote
~~~
- one
- two
- still the same list
> A quote of
> two lines
- one
- two
- still the same list
A quote of
two lines
nest modifier
#More-indented following lines become children of this node.
A node from a nest rule claims every following line that is indented deeper than its own line, until a non-blank line that is not. Claimed lines are parsed with all the rules and become the node's children, after its own text. That is how nested lists work.
Indentation is counted in levels: a tab is one level, spaces count in steps of set indent.
RULE nest~~~ selfscribe
line - _ -> li group ul nest
~~~
- Fruit
- Apples
- Pears
- Conference
- Vegetables
- Fruit
- Apples
- Pears
- Conference
- Vegetables
split modifier
#Splits the content on a separator and wraps each piece.
split "S" T cuts the content at every literal S and wraps each trimmed piece in a T element. Table rows are the usual case: split "|" td.
An escaped separator (\|) never splits. No piece is dropped: empty content gives one empty cell.
RULE split "SEPARATOR" ELEMENT~~~ selfscribe
line | _ | -> tr group table split "|" td
~~~
| Planet | Moons |
| Earth | 1 |
| Mars | 2 |
| Planet | Moons |
| Earth | 1 |
| Mars | 2 |
fold modifier
#Makes a foldable section in the editor.
fold N starts a section that runs until the next node with fold level N or lower, like chapters and sections under headings. The editor shows a fold marker for it.
A bare fold folds the node's own indented children (on a line rule) or its body (on a block rule).
RULE fold N
RULE fold~~~ selfscribe
line # _ -> h1 fold 1
line ## _ -> h2 fold 2
~~~
# Chapter
## Section one
Text.
## Section two
More text.
Chapter
Section one
Text.
Section two
More text.
keep modifier
#Keeps the matched delimiters in the output.
Normally the literal parts of a match (the delimiters) are dropped: **x** renders just x. With keep, the content is the whole matched text, delimiters included as plain text, while slot parts are still scanned for other rules.
Useful for tags and mentions that should stay visible but be styled.
RULE keep~~~ selfscribe
inline {_} -> span.tag keep { color: steelblue; font-weight: 600 }
~~~
Filed under {travel} and {food}.
Filed under {travel} and {food}.
bound modifier
#No matches in the middle of a word.
With bound, a match may not start right after, or end right before, a letter, digit or _. Markdown's _emphasis_ rule uses it so that snake_case_names stay as typed.
Selfscribe has no Markdown "flanking" rules. bound is the simple, explicit replacement. word rules behave this way on their own.
RULE bound~~~ selfscribe
inline +_+ -> ins bound
~~~
a+b+c stays as typed, but +this is inserted+.
a+b+c stays as typed, but this is inserted.
url modifier
#A word rule whose slot takes a whole web address: bare links.
On a word rule, url lets the slot take a whole address instead of one word: query strings (?q=1&r=2), #fragments and brackets inside it (Tide_(sea)) are kept, while a full stop, comma or closing bracket after it stays outside, as in prose.
The Markdown template links bare https://, http:// and www. addresses this way. A URL used as the text of a link is not linked again.
word https://_ -> a href="https://_1" keep url~~~ selfscribe
word https://_ -> a href="https://_1" keep url
~~~
The tides are at https://tides.example/harbour?day=1#high, every day.
The tides are at https://tides.example/harbour?day=1#high, every day.
input modifier
#Puts a checkbox, radio button or text field in front of the content.
input=checkbox, input=radio or input=text prepends a form control to the node. Add checked to start it checked. In full form the key is written without =: input checkbox checked.
Controls are disabled unless the host enables forms. The document stays a static, readable file.
RULE input=checkbox|radio|text [checked]~~~ selfscribe
line - [ ] _ -> li.task group ul input=checkbox
line - [x] _ -> li.task.done group ul input=checkbox checked
line ? _ -> label input=text
~~~
- [x] Buy paint
- [ ] Paint the fence
? Colour
- Buy paint
- Paint the fence
checked modifier
#With input=checkbox or input=radio: start checked.
checked only makes sense after input=checkbox or input=radio. On its own it is an unknown option.
RULE input=checkbox checked~~~ selfscribe
line - [x] _ -> li.done group ul input=checkbox checked
~~~
- [x] Written
- [x] Checked
- Written
- Checked
as modifier
#Gives the rule a name.
as NAME names a rule. The name is used by off NAME, shown in the Inspector, becomes the rule's style class (instead of self-rN), and is the name of a full-form rule.
Names start with a letter and may contain letters, digits, _ and -. If two rules take the same name, the later one keeps it (duplicate rule name).
A rule's style is for its own elements. If another rule writes the name as a class (-> div.critical), the styled rule's class becomes self-rN beside the name, and a note says so. To style every element with the class, write class critical { … }.
RULE as NAME~~~ selfscribe
line // ! _ -> p { color: crimson; font-weight: 600 } as critical
~~~
// ! Rendered as <p class="critical">
Rendered as <p class="critical">
Rules-block lines and settings
#use, scope, set, off and every setting.
use directive
#Brings in another file's rules, right here.
use NAME or use PATH reads another file's rules block (never its body) and applies it in place, as if its lines were written there. Later rules win, so put use lines first if your own rules should override them.
The name can be a built-in rulebook (markdown, bbcode, comments, form, plain, workbook), a rulebook from your library, or a path relative to this file (./house-style.self, ../shared/comments.self). Remote URLs work only if the host allows them.
Imports may import. A cycle is cut with a warning. The imported file's slot and title stay in that file. Its other settings apply unless you set them again.
use NAME
use ./PATH.self~~~ selfscribe
use markdown
use comments
~~~
# Notes
// ! Markdown and colour comments together
Notes
Markdown and colour comments together
scope directive
#The rules that follow belong to a named scope.
scope NAME makes the rules after it belong to scope NAME, until the next scope line or the end of the block. scope with no name returns to the default scope.
Scoped rules only apply between @scope NAME and @end in the body, on top of the default rules.
scope NAME
…rules…
scope~~~ selfscribe
use markdown
scope glossary
line :: _ -> p { margin-left: 1em; font-style: italic }
scope
~~~
:: outside the scope this stays as typed.
@scope glossary
:: Slot, the part of a match that varies
@end
:: outside the scope this stays as typed.
Slot, the part of a match that varies
set directive
#A document setting, or a variable.
set KEY VALUE sets one of the built-in settings: rules, blanklines, linebreaks, indent, title, slot and project. Any other key is a variable that a rule becoming var can show.
An invalid value is a warning and is ignored. Settings from a used file apply too, except slot and title, unless you set them again later.
set KEY VALUE~~~ selfscribe
set title Trip notes
set city Lisbon
inline {{_}} -> var
~~~
{{title}}: three days in {{city}}.
Trip notes: three days in Lisbon.
off directive
#Switches off an earlier rule.
off PATTERN disables every earlier rule in the current scope with that pattern. off KIND PATTERN only the one of that kind (off inline **_**). off NAME the rule named with as NAME. The pattern is compared compiled, so *_* also switches off an imported *$*.
Only rules defined above the off line are affected. If nothing matches you get the warning off: no rule matches.
off PATTERN
off KIND PATTERN
off NAME~~~ selfscribe
use markdown
off inline *_*
~~~
*single stars* stay as typed, **double stars** are still bold.
*single stars* stay as typed, double stars are still bold.
palette directive
#Names a colour once, with a version for dark pages if you like.
To use one colour in several rules, name it once: palette harbour #0b6e8a. Rules then write var(--harbour), so changing the colour means changing one line.
Add dark and a second colour for dark pages: palette harbour #0b6e8a dark #6cc8e0. It is used in a dark theme, with set style dark and in dark exports. A dark page prints light, with the first colour.
An entry can use an earlier one. color-mix() makes a paler or deeper shade, and the shade follows the colour's dark version by itself: tint color-mix(in srgb, var(--harbour) 15%, transparent). A gradient cannot take dark, so build it from palette colours.
Each hex or rgb() colour also gets --on-NAME, near-black or white, whichever reads better on each shade: background: var(--harbour); color: var(--on-harbour) keeps a badge readable on light and dark pages.
Write one entry per palette line, or palette alone with the entries indented under it. A name starts with a lower-case letter, then lower-case letters, digits and -. A later entry with the same name replaces the whole earlier one, dark included, so one line after a use recolours a rulebook. The editor says when a replacement drops a dark shade, and when a rulebook used below your own entry replaces it.
In the rules block, the swatch beside a colour opens a picker with Add a shade for dark pages. The swatch beside var(--harbour) changes the entry, so every rule follows. Make a palette from repeated colours in the command palette names the hex colours your rules repeat.
palette NAME COLOUR [dark COLOUR]
palette
NAME COLOUR [dark COLOUR]~~~ selfscribe
use markdown
palette harbour #0b6e8a dark #6cc8e0
word NOTE: -> strong { color: var(--harbour) }
~~~
NOTE: the ferry leaves at six.
NOTE: the ferry leaves at six.
~~~ selfscribe
use markdown
palette
harbour #0b6e8a dark #6cc8e0
tint color-mix(in srgb, var(--harbour) 15%, transparent)
band linear-gradient(90deg, var(--tint), transparent)
line > _ -> p { background: var(--band); border-left: 3px solid var(--harbour); padding: 0.4em 0.8em }
~~~
> A quote with a fading band behind it.
A quote with a fading band behind it.
class directive
#Styles every element with a class, so several rules can share one look.
Rules that should look alike share a class, styled once: class badge { … }. Each rule names the class in what it becomes (-> span.badge) and adds only what differs.
A rule's own CSS wins over the class:word TODO -> span.badge { background: var(--rust) }.
A class also styles what group and split make: the wrapper around a group, or the pieces of a split line.
To add a mark before or after each one, or style the elements inside it, follow the name with a pseudo or one element: class crumb::after { content: "›" }, class card h3 { … }, class card > p:first-child { … }. The pseudos are ::before, ::after, ::marker, :hover, :first-child, :last-child and :nth-child(2n+1).
A later class with the same name and the same ending replaces the earlier one. A name starts with a letter, then letters, digits, - and _. Names starting self-, cm-, ed- or pg- belong to Selfscribe and the editor, and are refused.
class NAME[::after | :hover …] [[>] ELEMENT] { css }~~~ selfscribe
use markdown
class badge { padding: 0.15em 0.45em; border-radius: 5px; font-size: 0.8em; font-weight: 700; color: white; font-family: var(--doc-font-ui) }
word TODO -> span.badge { background: #c2410c }
word DONE -> span.badge { background: #0b6e8a }
~~~
TODO write the report. DONE book the ferry.
TODO write the report. DONE book the ferry.
~~~ selfscribe
line > _ -> nav.crumbs split "/" span.crumb
class crumb::after { content: " › "; opacity: 0.5 }
class crumb:last-child::after { content: none }
~~~
> Home / Ferries / Timetable
rewrite directive
#Lets you write a block in your own short notation, turned into a plugin's language before it is drawn.
Write rewrite block, the block's pattern and what it becomes, as for a block rule. Under it, indent one line per shortcut: line _1 > _2 -> _1 -> _2 moving. Each line of the block that matches a pattern becomes its template, with _1, _2 … filled in. The block is then drawn as if you had written the long form.
A line no pattern matches stays as written. So you shorten only the lines you write often, and the plugin's own syntax still works for everything else.
first -> TEXT adds a line before the block, once, and last -> TEXT one after it. Use them for a set direction=LR or a \begin{aligned} you would otherwise write every time.
Everything after the -> of a template line is copied as it is, backslashes and # included. Only _1 to _9 and _# are filled in, and only when the pattern has them. If the language uses _ itself, as LaTeX does for subscripts, write set slot @ before the rewrite and use @1, @2.
Put a notation in a rulebook and use it to share it. A later rule with the same block pattern replaces the whole rewrite. A rewritten block is drawn but cannot be edited through the plugin's own editor: edit its lines instead.
rewrite block OPEN ... CLOSE -> TARGET
line PATTERN -> TEMPLATE
first -> TEXT
last -> TEXT~~~ selfscribe
use markdown
rewrite block ``` route ... ``` -> flow
line _1: _2 -> node _1 "_2"
line _1 > _2 -> _1 -> _2 moving
first -> set direction=LR
~~~
``` route
pier: Ferry pier
island: Island quay
pier > island
```
~~~ selfscribe
use markdown
rewrite block ``` shapes ... ``` -> tikz
line box _1 at _2,_3 -> \node[draw, rounded corners] (_1) at (_2,_3) {_1};
line _1 to _2 -> \draw[->] (_1) -- (_2);
~~~
``` shapes
box harbour at 0,0
box island at 4,1
harbour to island
```
~~~ selfscribe
use markdown
set slot @
rewrite block ``` sums ... ``` -> math
line @ over @ -> \frac{@1}{@2}
first -> \begin{aligned}
last -> \end{aligned}
~~~
``` sums
a over b
x_1 + x_2
```
rule directive
#Starts a full-form rule: one key per indented line.
rule [NAME] starts a rule written as keyed lines: where, match (or re), out, style, editor, doc, and the options as keys (group ul, nest, input checkbox checked …). The key lines are the indented lines that follow. A blank or unindented line ends the rule.
It is the same rule as the one-line form, so the editor can convert between them. Only the full form has re, editor and doc. A rule without where, match/re or out is skipped as incomplete rule. An unknown key is a warning.
rule NAME
where KIND
match PATTERN
out BECOMES attr=value
style css: declarations
editor colour C, bold
doc A description~~~ selfscribe
rule critical
where line
match // ! _
out p.critical
style color: crimson; font-weight: 600
editor colour crimson, icon "!"
doc Critical item, shows red in source and preview
~~~
// ! A critical item
A critical item
use markdown directive
#Markdown: headings, emphasis, links, lists, quotes, code, tables, pictures and task lists.
The rules every document without a rules block gets. Headings #, bold, *italic*, code, links, pictures, lists (nested, numbered, task lists - [ ]), quotes >, fenced code, tables with |, rules ---, footnotes and emoji short names.
A built-in rulebook: use markdown in the rules block applies its rules in place; your own rules after it win.
use markdown~~~ selfscribe
use markdown
~~~
# A title
Some **bold** text, a [link](https://example.com) and a list:
- [x] done
- [ ] to do
use data directive
#Data: records in ``data blocks and view:` lines that show them as tables, cards, boards, calendars, timelines and forms.
Everything of Markdown, plus a ```data NAME block for records (CSV, TSV, JSON, records) with a typed header, and view: lines that show a source another way: as board by status, sort due, filter not done, columns, totals. In the editor views are live and write back into the text. See Data and views.
A built-in rulebook: use data in the rules block applies its rules in place; your own rules after it win.
use data~~~ selfscribe
use data
~~~
```data tasks as board by status
title, status:choice(todo|doing|done), due:date
Write the spec, doing, 2026-09-20
Review, todo, 2026-09-24
```
view: tasks as table sort due
todo 1
Review
- due
doing 1
Write the spec
- due
done 0
| title | status | due |
|---|---|---|
| Write the spec | doing | |
| Review | todo |
use workbook directive
#Workbook: the contents file of a workbook, parts (# Part) and documents (- file.self).
For workbook.self: each # heading is a part and each - file.self line a document, nested by indent. The editor shows it as a contents page and the Files panel as Contents. See Workbooks.
A built-in rulebook: use workbook in the rules block applies its rules in place; your own rules after it win.
use workbook~~~ selfscribe
use workbook
~~~
# Start here
- index.self
- first-week.self
# Reference
- glossary.self
Shows a warning on purpose: “unknown target 'doc'”.
use form directive
#Forms: checkboxes, radio buttons and text fields from plain lines.
Between @scope form and @end, a line that starts with ? is a text field, [ ] a checkbox and ( ) a radio button; the rest of the line is its label. Everything of Markdown works around them. Forms can be read back by the host.
A built-in rulebook: use form in the rules block applies its rules in place; your own rules after it win.
use form~~~ selfscribe
use form
~~~
@scope form
? Your name
[ ] Subscribe
( ) Weekly
( ) Monthly
@end
use bbcode directive
#BBCode: [b], [i], [url], [quote] and friends, as on forums.
Square-bracket tags: [b]bold[/b], [i], [u], [s], [url=…], [img], [quote], [code], [list] with [*], [color=…].
A built-in rulebook: use bbcode in the rules block applies its rules in place; your own rules after it win.
use bbcode~~~ selfscribe
use bbcode
~~~
[b]Bold[/b] and [i]italic[/i]
[quote]A quote[/quote]
Bold and italic
A quote
use comments directive
#Colour comments: lines that start with //, // !, // ? and // TODO shown in colour.
For notes in code-like documents: // a quiet comment, // ! an alert, // ? a question, // TODO a task.
A built-in rulebook: use comments in the rules block applies its rules in place; your own rules after it win.
use comments~~~ selfscribe
use comments
~~~
// a note
// ! this matters
// ? is this right
a note
this matters
is this right
use plain directive
#Plain: nothing but paragraphs. Every character stays as written.
No syntax at all: blank lines separate paragraphs. Useful as a base for rules of your own.
A built-in rulebook: use plain in the rules block applies its rules in place; your own rules after it win.
use plain~~~ selfscribe
use plain
~~~
Just text.
Another paragraph, *not* italic.
Just text.
Another paragraph, *not* italic.
rules setting
#set rules hide folds the rules block away in the editor.
show (the default) or hide. With hide, hybrid mode and preview treat the rules block as folded and hidden. Rendered HTML never contains the rules block either way.
set rules show|hide~~~ selfscribe
set rules hide
use markdown
~~~
# Clean
The rules above stay folded in hybrid mode.
Clean
The rules above stay folded in hybrid mode.
cite-style setting
#set cite-style numeric numbers citations. The default is author and year.
author-year (the default: (Knuth 1984, p. 99)) or numeric ([1, p. 99], numbered in the order works are first cited). An ordinary variable (01 §2), read by the citation and bibliography plugins.
set cite-style author-year|numeric~~~ selfscribe
use markdown
inline [@_] -> citation
line bibliography: _ -> bibliography
block ```data\ _ ... ``` -> data info=_1 verbatim
set cite-style numeric
~~~
Programs are essays [@knuth1984].
```data refs records as hidden
key: knuth1984
author: Donald E. Knuth
title: Literate Programming
year: 1984
```
bibliography: refs
Programs are essays [1].
- [1] Knuth, D. E. (1984). Literate Programming.
blanklines setting
#set blanklines keep turns blank lines into line breaks.
collapse (the default) or keep. With keep, each blank line between two top-level blocks renders as a <br>, so extra blank lines add space. Blank lines at the start and end, and inside lists or blocks, still render nothing.
set blanklines collapse|keep~~~ selfscribe
use markdown
set blanklines keep
~~~
A first paragraph.
Three blank lines above this one.
A first paragraph.
Three blank lines above this one.
linebreaks setting
#set linebreaks keep ends each line where you wrote it.
collapse (the default) or keep. Lines next to each other make one paragraph. With keep, each line break inside it stays a line break (<br>), for poems, addresses and lists written as plain lines. The Plain rulebook keeps them.
set linebreaks collapse|keep~~~ selfscribe
use markdown
set linebreaks keep
~~~
12 Harbour Road
Aldery
AL1 2BC
12 Harbour Road
Aldery
AL1 2BC
source-width setting
#set source-width reading keeps Source mode in a reading column.
How wide Source mode shows this document: full (the whole window, the usual default), reading (the reading column) or a length such as 80ch. For the other modes, see width.
It only changes the editor. The width switch in the toolbar still works, and remembers what you choose for each document.
set source-width full|reading|LENGTH~~~ selfscribe
use markdown
set source-width reading
set line-numbers off
~~~
# A letter
Dear Sam, the lighthouse is lit again.
A letter
Dear Sam, the lighthouse is lit again.
line-numbers setting
#set line-numbers off hides line numbers in Source mode for this document.
on or off. Without it, Source follows your Line numbers setting, and Hybrid shows none unless you turn them on. on shows them in Hybrid too. A rulebook can set it for every document that uses it (the Plain rulebook turns them off), and the Line numbers switch remembers what you choose for each document.
set line-numbers on|off~~~ selfscribe
use markdown
set line-numbers off
~~~
Buy bread
Call Ana
Buy bread Call Ana
indent setting
#Spaces per nesting level, 1 to 16 (default 2).
How many spaces make one level of indentation for nest. A tab always counts as one level. Values outside 1 to 16 are a warning and ignored.
set indent N~~~ selfscribe
use markdown
set indent 4
~~~
- top
- four spaces in
- top again
- top
- four spaces in
- top again
title setting
#The document's title.
The title is available to renderers and to rules that become var ({{title}}). Rulebooks set their own title for menus, but a title is never inherited through use, so importing a rulebook never renames your document.
set title TEXT~~~ selfscribe
set title Field notes
inline {{_}} -> var
~~~
This document is called “{{title}}”.
This document is called “Field notes”.
slot setting
#Changes the slot character for the patterns that follow.
set slot $ makes $ the slot character for the rules after it, in this file only: patterns write $, $1, $#, and attributes write href=$2. Handy when _ is itself a delimiter, as in Markdown's __strong__.
Any single character except space, \, . and # works. The choice never leaks into files that use this one.
set slot CHAR~~~ selfscribe
set slot $
inline __$__ -> strong
inline _$_ -> em bound
~~~
__Strong__ and _emphasis_, while snake_case_names stay.
Strong and emphasis, while snake_case_names stay.
folder setting
#set project off ignores the rules of the folder (selfscribe.self) and of the workbook.
on (the default) or off. In a folder or workbook, default rules from selfscribe.self or workbook.self are applied first. set project off in a document opts that document out, leaving only its own rules (and the built-in Markdown default if it has no rules block).
set project on|off~~~ selfscribe
set project off
use comments
~~~
// ~ Only this document's own rules apply.
Only this document's own rules apply.
style setting
#set style dark wide numbered gives the whole document a look.
A look is one line in the rules block: set style and one or more look words. The words add up, so set style paper numbered is a printed sheet with numbered headings. The engine only stores the line (it is a variable). The editor, the site and self render --standalone draw it with one shared stylesheet.
- Page: dark, light, paper.
- Width and spacing: wide, compact.
- Type: serif, sans, mono, justified.
- Structure: numbered, dropcap, columns.
- Looks: newspaper, academic (and paper).
noneswitches off a look that came from an import.
Of dark, light and paper only the last one written counts, and the same for serif, sans and mono. A word written with a look replaces that part of it: newspaper sans is a sans-serif newspaper.
A look set in a rulebook or a folder's selfscribe.self applies to every document that uses it. A document's own set style replaces it. A look never changes your rules' own { css }, only the page around them.
In the editor, Look in the status bar (and Document looks in Settings) shows each look on your document and writes the line for you. The preview shows everything. Hybrid mode shows the colours, type, width and heading numbers.
set style WORD WORD ...~~~ selfscribe
use markdown
set style dark wide numbered
~~~
# Field report
## Findings
The survey found three new nesting sites.
### North shore
Two of them, both on the cliffs.
## Next steps
Return in spring.
Field report
Findings
The survey found three new nesting sites.
North shore
Two of them, both on the cliffs.
Next steps
Return in spring.
font setting
#set font Literata sets the document in a font. set heading-font sets the headings, set code-font the code.
A document can ask for its own typeface: set font NAME for the text, set heading-font NAME for headings and set code-font NAME for code and anything else set at one width. The text font is used inside the document's blocks too (boxes to fill in, tables, pictures of ideas), so a record is set in one face throughout. NAME is a font from the editor's gallery (by name or id, like literata or Atkinson Hyperlegible Next) or any font installed on the computer.
Like set style it is only a line the engine stores. The editor loads the font and uses it in hybrid mode and the preview. Where the font is not available (another computer, the CLI) the look's own font is used instead, and nothing is downloaded to find one.
In a rule's CSS, use the page's fonts rather than naming one: var(--doc-font) for the text, var(--doc-font-heading) for headings, var(--doc-font-ui) for labels and badges, and var(--doc-font-mono) for code. They work in the app, on the web and in every export.
Your own reading font is an editor preference (Settings › Text and fonts, or Choose fonts… in the command palette). A document's set font wins inside that document.
set font NAME
set heading-font NAME
set code-font NAME~~~ selfscribe
use markdown
set style paper
set font EB Garamond
set heading-font Playfair Display
~~~
# The Lighthouse
The lamp was lit at dusk, and the keeper wrote the weather in a small grey book.
The Lighthouse
The lamp was lit at dusk, and the keeper wrote the weather in a small grey book.
page setting
#set page A4 landscape chooses the paper for pages, printing, PDF and Word.
A document can say what paper it is for: set page and a size (A4, A5, A3, Letter or Legal), optionally landscape (or portrait) and margins narrow, normal or wide (12, 20 or 28 mm). The words go in any order.
The editor uses it for the Pages view (the shape of each page and its margins), for printing and PDF, and for Word export. Without it, pages are A4, portrait, with normal margins.
The easiest way to write it is File › Page setup…, which shows the line it writes.
set page SIZE [landscape] [margins narrow|normal|wide]~~~ selfscribe
use markdown
set page A4 landscape margins narrow
set layout pages
~~~
# Timetable
Boats leave every hour from the north quay.
Timetable
Boats leave every hour from the north quay.
width setting
#set width wide or set width 40em makes the reading column that wide (or full for the whole window).
How wide the text runs on screen and in an exported web page: a word, narrow (or compact), normal or wide, which follows your own reading width; a length such as 40em, 70ch, 720px or 16cm; or full for the whole window. It wins over the width a style gives (wide, compact) and over your own reading width in Settings, for this document only.
Pages and slides take their width from the paper and the screen instead.
set width narrow|normal|wide
set width LENGTH
set width full~~~ selfscribe
use markdown
set width 32em
~~~
# Notes
A short column is easier to read on a wide screen: the eye finds the next line without searching for it.
Notes
A short column is easier to read on a wide screen: the eye finds the next line without searching for it.
lang setting
#set lang fr says what language the document is in (spellcheck, hyphenation, screen readers).
A language tag such as en-GB, en-US, fr, de or pt-BR. The editor spellchecks in that language (when your browser has its dictionary), and every export says it, so screen readers pronounce the text properly and justified text breaks words in the right places.
Without it, the browser's own language is used.
set lang TAG~~~ selfscribe
use markdown
set lang fr
~~~
# Horaires
Le bateau part toutes les heures du quai nord.
Horaires
Le bateau part toutes les heures du quai nord.
theme setting
#set theme cyber-dark colours the whole app in that theme while this document is open.
The name of a built-in theme: paper, snow, sepia, dusk, graphite, nord, dracula, cyber-dark, cyber-light, twotone and the others in the theme picker in the status bar. While the document is the one you are looking at, the app takes that theme. Go to another tab or Home and your own theme comes back.
Exports use the theme too. Colours in File › Export… chooses another.
To keep your own theme always, turn off Settings › Appearance › Documents choose the theme. The theme picker in the status bar says when a document is choosing. The look of the page itself is set style.
set theme NAME~~~ selfscribe
use markdown
set theme cyber-dark
set layout slides
~~~
# Night market
Open the Preview to see the deck in its own colours.
Night market
Open the Preview to see the deck in its own colours.
author setting
#set author Ada Lindqvist names who wrote the document, in every export.
An e-book shows the name under its title and on its cover. A Word file has it in its properties, and a web page in its author tag.
Without it, exports use Settings › Your name. Like any setting, {{author}} shows it in the text.
set author NAME~~~ selfscribe
use markdown
set author Ada Lindqvist
set description Where to eat, sleep and swim on the island.
~~~
# The harbour guide
Boats leave every hour from the north quay.
The harbour guide
Boats leave every hour from the north quay.
description setting
#set description … is the one-line summary of the document that e-books, Word and websites show.
An e-book shop or library shows it under the title. A website puts it in each page's description, which search engines and link previews show, and on the contents page.
Keep it to a sentence or two. Without it, a web page uses its first paragraph.
set description TEXT~~~ selfscribe
use markdown
set description Opening hours, prices and the ferry timetable.
~~~
# Visiting the island
The ferry runs every hour from April to October.
Visiting the island
The ferry runs every hour from April to October.
cover setting
#set cover pictures/cover.jpg gives an e-book its cover picture.
A picture in the folder, written as a path from the document. An EPUB shows it as its first page and as the book's thumbnail. A website with an address uses it in link previews.
Without it, an EPUB gets a cover made of its title and author.
set cover PATH~~~ selfscribe
use markdown
set cover pictures/harbour.jpg
set author Ada Lindqvist
~~~
# Island stories
Twelve stories from the north quay.
Island stories
Twelve stories from the north quay.
date setting
#set date 2026-10-28 dates the document in its exports.
Write the date as 2026-10-28 (or 2026-10, or 2026) so e-books, Word and sitemaps can read it. set date today is the day you export. Running headers and footers show it with {date}.
set date YYYY-MM-DD~~~ selfscribe
use markdown
set date 2026-10-28
inline {{_}} -> var
~~~
# Ferry timetable
Valid from {{date}}.
Ferry timetable
Valid from 2026-10-28.
set footer Page {page} of {pages} puts a line at the foot of every printed page.
The footer has three places: left, centre and right, with | between them. One text is the centre; two are the left and the right; write all three to choose (set footer HT-01 | Reproduce only in full | Page {page} of {pages}). Leave a place empty to skip it.
{page}, {pages}, {title} and {date} fill themselves in. {name} shows any other setting of the document, so set record HT-01 can be said once and used in the footer and the text.
It shows in Print, PDF and Word, and it is the document’s own: it wins over the footer in File › Export, and is not carried to the next document. set footer none prints no footer.
set footer LEFT | CENTRE | RIGHT~~~ selfscribe
use markdown
set record HT-01
set header {record} | Harbour Trust | {date}
set footer Reproduce only in full | | Page {page} of {pages}
~~~
# Quay inspection
Walked the north quay at low water.
Quay inspection
Walked the north quay at low water.
header setting
#set header HT-01 | Harbour Trust puts a line at the top of every printed page.
Written like set footer: left, centre and right with | between them, and {title}, {date}, {page}, {pages} or {name} (another setting of the document) filling themselves in.
A header the document sets is on every page, the first too: a record’s number belongs on its first page. (The title that File › Export adds on its own skips the first page.) set header none prints no header.
set header LEFT | CENTRE | RIGHT~~~ selfscribe
use markdown
set header Ref. HT-01 | | {date}
~~~
# Quay inspection
Walked the north quay at low water.
Quay inspection
Walked the north quay at low water.
layout setting
#set layout pages shows the document as pages of a book in Preview. slides makes a deck.
scroll is one long page, pages turns like a book on the paper of set page, and slides is one screen at a time: a new slide at each ---page--- line, else at each ---, else at each heading. F5 presents the slides full screen.
Without it, Preview uses your own choice (the Page and view button, or Settings › Layout and devices). Choosing a layout there lasts for the session. Keep … for this document writes this line.
set layout scroll | pages | slides~~~ selfscribe
use markdown
set layout slides
~~~
# Harbour tour
Three stops, twenty minutes.
## The market
Opens at six.
## The lighthouse
Climb at noon.
Harbour tour
Three stops, twenty minutes.
The market
Opens at six.
The lighthouse
Climb at noon.
Variables setting
#Any other set KEY VALUE is a variable, shown where a rule makes a var.
A set line with a key that is not a built-in setting stores a variable. A rule that becomes var shows its value by name. Host data comes first, then the document's variables. A missing variable is empty.
Inside a block that draws an idea (a fill form, a sheet, facts, a cover and the rest) {{name}} shows the variable too, with no rule needed, so a template filled row by row from a table carries each row's values in its boxes and tables as well as its sentences. A name the document does not set stays as written.
set KEY VALUE~~~ selfscribe
set name Ada
set version 1.2
inline {{_}} -> var
~~~
Hello {{name}}, version {{version}} is out.
Hello Ada, version 1.2 is out.
paper setting
#A printed sheet on a desk: serif type, page margins, prints cleanly.
The document becomes a sheet of paper with margins, a soft shadow and serif type. It is a light page whatever the editor theme, and it prints without the desk or the shadow.
Written as a word of set style. It combines with the other words.
set style paper~~~ selfscribe
use markdown
set style paper
~~~
# The harbour
Fishing boats left before dawn, and the market opened to a crowd that had waited since the first bells.
## Weather
A light westerly breeze with clear skies until the evening.
### Tides
High water at noon.
The harbour
Fishing boats left before dawn, and the market opened to a crowd that had waited since the first bells.
Weather
A light westerly breeze with clear skies until the evening.
Tides
High water at noon.
newspaper setting
#A masthead, two justified serif columns and a drop cap.
A look made of serif, justified, columns, dropcap and compact, plus a masthead: the first h1 spans the columns between two rules. Paragraphs after the first are indented.
Written as a word of set style. It combines with the other words.
set style newspaper~~~ selfscribe
use markdown
set style newspaper
~~~
# The harbour
Fishing boats left before dawn, and the market opened to a crowd that had waited since the first bells.
## Weather
A light westerly breeze with clear skies until the evening.
### Tides
High water at noon.
The harbour
Fishing boats left before dawn, and the market opened to a crowd that had waited since the first bells.
Weather
A light westerly breeze with clear skies until the evening.
Tides
High water at noon.
academic setting
#A centred title, numbered sections, justified serif text.
A look made of serif, justified and numbered, with a centred h1 title, a slightly narrower column, quiet section headings and indented paragraphs.
Written as a word of set style. It combines with the other words.
set style academic~~~ selfscribe
use markdown
set style academic
~~~
# The harbour
Fishing boats left before dawn, and the market opened to a crowd that had waited since the first bells.
## Weather
A light westerly breeze with clear skies until the evening.
### Tides
High water at noon.
The harbour
Fishing boats left before dawn, and the market opened to a crowd that had waited since the first bells.
Weather
A light westerly breeze with clear skies until the evening.
Tides
High water at noon.
dark setting
#Always a dark page, whatever the app theme.
The page is dark. In the editor it takes the colours of your dark theme (theme-dark in preferences.self), or of the current theme when it is dark already. Pages outside the editor use built-in dark colours. A dark page prints light.
Written as a word of set style. It combines with the other words.
set style dark~~~ selfscribe
use markdown
set style dark
~~~
# The harbour
Fishing boats left before dawn, and the market opened to a crowd that had waited since the first bells.
## Weather
A light westerly breeze with clear skies until the evening.
### Tides
High water at noon.
The harbour
Fishing boats left before dawn, and the market opened to a crowd that had waited since the first bells.
Weather
A light westerly breeze with clear skies until the evening.
Tides
High water at noon.
light setting
#Always a light page, whatever the app theme.
The page is light, even when the editor uses a dark theme. In the editor it takes the colours of your light theme (theme-light).
Written as a word of set style. It combines with the other words.
set style light~~~ selfscribe
use markdown
set style light
~~~
# The harbour
Fishing boats left before dawn, and the market opened to a crowd that had waited since the first bells.
## Weather
A light westerly breeze with clear skies until the evening.
### Tides
High water at noon.
The harbour
Fishing boats left before dawn, and the market opened to a crowd that had waited since the first bells.
Weather
A light westerly breeze with clear skies until the evening.
Tides
High water at noon.
wide setting
#A wider column, 1.6 times the reading column.
The text column is 1.6 times as wide as the reading column, for tables, code and wide screens. Hybrid mode widens too.
Written as a word of set style. It combines with the other words.
set style wide~~~ selfscribe
use markdown
set style wide
~~~
# The harbour
Fishing boats left before dawn, and the market opened to a crowd that had waited since the first bells.
## Weather
A light westerly breeze with clear skies until the evening.
### Tides
High water at noon.
The harbour
Fishing boats left before dawn, and the market opened to a crowd that had waited since the first bells.
Weather
A light westerly breeze with clear skies until the evening.
Tides
High water at noon.
compact setting
#Tighter lines and less space between blocks.
Lines sit closer together and blocks and headings have less space around them: more on one screen or page.
Written as a word of set style. It combines with the other words.
set style compact~~~ selfscribe
use markdown
set style compact
~~~
# The harbour
Fishing boats left before dawn, and the market opened to a crowd that had waited since the first bells.
## Weather
A light westerly breeze with clear skies until the evening.
### Tides
High water at noon.
The harbour
Fishing boats left before dawn, and the market opened to a crowd that had waited since the first bells.
Weather
A light westerly breeze with clear skies until the evening.
Tides
High water at noon.
serif setting
#Serif type for text and headings.
Text and headings are set in a serif face (Source Serif in the editor).
Written as a word of set style. It combines with the other words.
set style serif~~~ selfscribe
use markdown
set style serif
~~~
# The harbour
Fishing boats left before dawn, and the market opened to a crowd that had waited since the first bells.
## Weather
A light westerly breeze with clear skies until the evening.
### Tides
High water at noon.
The harbour
Fishing boats left before dawn, and the market opened to a crowd that had waited since the first bells.
Weather
A light westerly breeze with clear skies until the evening.
Tides
High water at noon.
sans setting
#Sans-serif type for text and headings.
Text and headings are set in a sans-serif face (Inter in the editor). With a look, it replaces the look's serif.
Written as a word of set style. It combines with the other words.
set style sans~~~ selfscribe
use markdown
set style sans
~~~
# The harbour
Fishing boats left before dawn, and the market opened to a crowd that had waited since the first bells.
## Weather
A light westerly breeze with clear skies until the evening.
### Tides
High water at noon.
The harbour
Fishing boats left before dawn, and the market opened to a crowd that had waited since the first bells.
Weather
A light westerly breeze with clear skies until the evening.
Tides
High water at noon.
mono setting
#Monospaced type, like a manuscript.
Everything is set in a monospaced face, like a typescript.
Written as a word of set style. It combines with the other words.
set style mono~~~ selfscribe
use markdown
set style mono
~~~
# The harbour
Fishing boats left before dawn, and the market opened to a crowd that had waited since the first bells.
## Weather
A light westerly breeze with clear skies until the evening.
### Tides
High water at noon.
The harbour
Fishing boats left before dawn, and the market opened to a crowd that had waited since the first bells.
Weather
A light westerly breeze with clear skies until the evening.
Tides
High water at noon.
justified setting
#Justified, hyphenated paragraphs.
Paragraphs are justified to both edges and hyphenated where the browser can. A rule's own text-align still wins for its element.
Written as a word of set style. It combines with the other words.
set style justified~~~ selfscribe
use markdown
set style justified
~~~
# The harbour
Fishing boats left before dawn, and the market opened to a crowd that had waited since the first bells.
## Weather
A light westerly breeze with clear skies until the evening.
### Tides
High water at noon.
The harbour
Fishing boats left before dawn, and the market opened to a crowd that had waited since the first bells.
Weather
A light westerly breeze with clear skies until the evening.
Tides
High water at noon.
numbered setting
#Sections numbered 1, 1.1, 1.1.1 (h2 to h4).
Headings are numbered: h2 as 1, h3 as 1.1, h4 as 1.1.1. An h1 is the title: it has no number and starts the numbering again. Only headings at the top level of the document count.
Written as a word of set style. It combines with the other words.
set style numbered~~~ selfscribe
use markdown
set style numbered
~~~
# The harbour
Fishing boats left before dawn, and the market opened to a crowd that had waited since the first bells.
## Weather
A light westerly breeze with clear skies until the evening.
### Tides
High water at noon.
The harbour
Fishing boats left before dawn, and the market opened to a crowd that had waited since the first bells.
Weather
A light westerly breeze with clear skies until the evening.
Tides
High water at noon.
dropcap setting
#A large initial letter on the first paragraph.
The first letter of the first paragraph of the document is set large, across several lines.
Written as a word of set style. It combines with the other words.
set style dropcap~~~ selfscribe
use markdown
set style dropcap
~~~
# The harbour
Fishing boats left before dawn, and the market opened to a crowd that had waited since the first bells.
## Weather
A light westerly breeze with clear skies until the evening.
### Tides
High water at noon.
The harbour
Fishing boats left before dawn, and the market opened to a crowd that had waited since the first bells.
Weather
A light westerly breeze with clear skies until the evening.
Tides
High water at noon.
columns setting
#Text set in two columns.
The text runs in two columns with a rule between them. A first h1 spans both. In the editor, documents of more than 2 000 blocks stay one column.
Written as a word of set style. It combines with the other words.
set style columns~~~ selfscribe
use markdown
set style columns
~~~
# The harbour
Fishing boats left before dawn, and the market opened to a crowd that had waited since the first bells.
## Weather
A light westerly breeze with clear skies until the evening.
### Tides
High water at noon.
The harbour
Fishing boats left before dawn, and the market opened to a crowd that had waited since the first bells.
Weather
A light westerly breeze with clear skies until the evening.
Tides
High water at noon.
Plugins
#Diagrams, maths, charts, music, embeds and more.
mermaid plugin
#Diagrams from text: flowcharts, sequence, class (UML), state, ER, Gantt, pie, mind maps, timelines.
A built-in plugin: a verbatim body becomes a <pre class="mermaid"> that the app draws as a diagram with Mermaid. Without Mermaid it stays readable text.
Mermaid runs in strict mode and its SVG is cleaned before it reaches the page, so a diagram can never fetch anything.
To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-mermaid on in preferences.self). Settings: set plugin-mermaid-theme auto|default|neutral|dark|forest (auto follows light and dark).
block ``` mermaid ... ``` -> mermaid verbatim~~~ selfscribe
block ``` mermaid ... ``` -> mermaid verbatim
~~~
```mermaid
flowchart LR
A[Write] --> B{Rules?}
B -- yes --> C[Render]
B -- no --> D[Plain text]
```
flowchart LR
A[Write] --> B{Rules?}
B -- yes --> C[Render]
B -- no --> D[Plain text]
math plugin
#TeX formulas, inline or displayed, typeset with KaTeX.
A built-in plugin: from an inline rule the formula sits in the text. From a block rule it is centred on its own. The app typesets it with KaTeX. Without KaTeX the TeX source stays readable.
To use it, add these rules to the rules block and switch the plugin on in Settings › Plugins (set plugin-math on in preferences.self).
inline $_$ -> math verbatim
block $$ ... $$ -> math verbatim~~~ selfscribe
inline $_$ -> math verbatim
block $$ ... $$ -> math verbatim
~~~
Euler's identity $e^{i\pi} + 1 = 0$.
$$
\int_0^\infty e^{-x^2}\,dx = \frac{\sqrt{\pi}}{2}
$$
Euler's identity e^{i\pi} + 1 = 0.
equation plugin
#Numbered display equations, referred to by label.
A built-in plugin: a display equation opened with $$ {#label} is numbered (1), (2)… in document order, and eqref ([@eq:label]) refers to it by its number. The formula is typeset by math.
The client half shows the equation when you hover or focus a reference.
To use it, add these rules to the rules block and switch the plugin on in Settings › Plugins (set plugin-equation on in preferences.self).
block $$ {#_} ... $$ -> equation label=_1 verbatim
block $$ ... $$ -> math verbatim
inline $_$ -> math verbatim
inline [@eq:_] -> eqref~~~ selfscribe
block $$ {#_} ... $$ -> equation label=_1 verbatim
block $$ ... $$ -> math verbatim
inline $_$ -> math verbatim
inline [@eq:_] -> eqref
~~~
Euler's identity [@eq:euler]:
$$ {#euler}
e^{i\pi} + 1 = 0
$$
Euler's identity (1):
numbered plugin
#Numbers figures, tables, theorems or any kind you name: Figure 1, Table 1, Theorem 1.
A built-in plugin. kind= says what it numbers (figure when missing; any one word, so kind=recipe numbers recipes), and each kind counts on its own in the order of the document. label= gives it a name to refer to with ref, caption= a caption, and name= what the number is called (name=Satz, else the kind with a capital letter).
Figures, charts, diagrams and maps get their caption underneath (Figure 1. A right-angled triangle); tables and listings above. Any other kind is set as theorems are in print: Theorem 1 (Pythagoras). runs into its first line.
A label used twice in one kind, or with a space in it, gives a warning and no link. Numbered equations are the equation plugin.
To use it, add these rules to the rules block and switch the plugin on in Settings › Plugins (set plugin-numbered on in preferences.self).
block ::: figure {#_} _ ... ::: -> numbered kind=figure label=_1 caption=_2
block ::: table {#_} _ ... ::: -> numbered kind=table label=_1 caption=_2
block ::: theorem {#_} _ ... ::: -> numbered kind=theorem label=_1 caption=_2
inline [@fig:_] -> ref kind=figure
inline [@tbl:_] -> ref kind=table
inline [@thm:_] -> ref kind=theorem~~~ selfscribe
use markdown
block ::: figure {#_} _ ... ::: -> numbered kind=figure label=_1 caption=_2
block ::: table {#_} _ ... ::: -> numbered kind=table label=_1 caption=_2
block ::: theorem {#_} _ ... ::: -> numbered kind=theorem label=_1 caption=_2
inline [@fig:_] -> ref kind=figure
inline [@tbl:_] -> ref kind=table
inline [@thm:_] -> ref kind=theorem
~~~
The triangle in [@fig:triangle] has sides 3, 4 and 5, a row of [@tbl:triples]. [@thm:pythagoras] says why.
::: figure {#triangle} A right-angled triangle

:::
::: table {#triples} Whole-number right triangles
| a | b | c |
| --- | --- | --- |
| 3 | 4 | 5 |
| 5 | 12 | 13 |
:::
::: theorem {#pythagoras} Pythagoras
In a right-angled triangle, the square on the longest side is the sum of the squares on the other two.
:::
calc plugin
#Calculator notes: end a line with = and its result shows after it, with names, percentages and currencies.
A client plugin. In a calc block, a line that ends in = shows its result after the = (rent 900 + bills 120 = reads 1,020). Words before a number are its label and name it, so rent is 900 and bills 120 on the lines below. name = sum names a result too, and a name can be several words (per person = total / 3). Other lines stay as notes.
Operators: + - * / ^, brackets, % for percentages (20% of 80, 80 + 10%) and for the remainder between two numbers (10 % 3). A currency sign before or after a number (£12, 12 €) carries through the sums; two currencies never mix, and the line says so. Numbers are exact decimals, with thousands separators if you like. sum = and avg = add up the results above, back to a blank line. An unknown name or a broken sum gets a quiet note on its line.
Inside a sentence, [calc 4 * £7.50] shows £30, and hovering shows the sum. Nothing is written into the text.
To use it, add these rules to the rules block and switch the plugin on in Settings › Plugins (set plugin-calc on in preferences.self).
block ``` calc ... ``` -> calc verbatim
inline [calc _] -> calc kind=inline verbatim~~~ selfscribe
block ``` calc ... ``` -> calc verbatim
inline [calc _] -> calc kind=inline verbatim
~~~
```calc
rent 900 + bills 120 =
food 45 * 4 =
total = rent + bills + food
per person = total / 3
```
Lunches this month: [calc 4 * 5 * £7.50].
Lunches this month: 4 * 5 * £7.50.
chart plugin
#Bar, line, area and pie charts from a few lines of data.
A client plugin that turns CSV-like text into an SVG chart, with no library and nothing fetched. A few header lines (type:, title: …) come first, then the data: the first row names the series, each following row is one point.
Without the plugin the block is still its data.
To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-chart on in preferences.self). Settings: set plugin-chart-palette theme|vivid|pastel|mono.
block ``` chart ... ``` -> chart verbatim~~~ selfscribe
block ``` chart ... ``` -> chart verbatim
~~~
```chart
type: bar
title: Visitors
Month, 2025, 2026
Jan, 120, 180
Feb, 140, 210
Mar, 165, 260
```
spark plugin
#A tiny line or bar chart inside a sentence: ~[3 5 2 8 6]~.
A client plugin. Numbers between ~[ and ]~, with spaces or commas between them, become a small line as tall as the text, with dots on the lowest and highest values. Start with bar: for bars. Hover over it, or tab to it and use the arrow keys, to read the values. Without the plugin the numbers stay in the sentence.
To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-spark on in preferences.self).
inline ~[_]~ -> spark verbatim~~~ selfscribe
inline ~[_]~ -> spark verbatim
~~~
Visitors this week ~[120 135 128 160 190 240 210]~ and rain by month ~[bar: 80 62 55 40 31 12]~.
Visitors this week 120 135 128 160 190 240 210 and rain by month bar: 80 62 55 40 31 12.
heatmap plugin
#Dates, one per line, as a calendar of weeks with busier days darker.
A client plugin. Each line is a date with an optional number after it (2026-09-14 3). A date alone counts 1, and a date written twice adds up. A # Title line names it. The grid covers the weeks from the first date to the last, up to a year. Hover over a day, or tab to it and use the arrow keys, to see its date and value. Nothing is written back.
To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-heatmap on in preferences.self). Settings: set plugin-heatmap-weekstart mon|sun.
block ``` heatmap ... ``` -> heatmap verbatim~~~ selfscribe
block ``` heatmap ... ``` -> heatmap verbatim
~~~
```heatmap
# Running, kilometres
2026-09-01 5
2026-09-03 8
2026-09-06 12
2026-09-10 5
2026-09-13 21
```
habit plugin
#A habit tracker from one line a day: a row of days per habit, streaks, and a tick for today.
A client plugin. Write one line a day, the date and what you did (2026-09-21 run read). Each habit shows as a row of the last days, with its current streak and its best. habits: run, read fixes the rows and their order, # Title names the tracker and days: 14 shows fewer days. A habit can keep its own line of dates instead (run: 2026-09-01 2026-09-02).
Click the box in front of a habit to mark today done or not: today's line changes (or is written), as one undo step, so the document stays a plain log. Tab to a row and use the arrow keys to read its days. In a read-only view the rows show without boxes.
To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-habit on in preferences.self). Settings: set plugin-habit-days 14|21|28|60|90 (how many days a row shows; days: in the block wins).
block ``` habit ... ``` -> habit verbatim~~~ selfscribe
block ``` habit ... ``` -> habit verbatim
~~~
```habit
# Autumn habits
habits: run, read
2026-09-21 run read
2026-09-22 read
2026-09-23 run read
```
meter plugin
#A small bar inside a sentence: [= 72 / 100 =], [= 3 of 8 =] or [= 45% =].
A client plugin. An amount and its whole between [= and =] become a small bar filled that far, with the numbers beside it. A full bar turns green. Without the plugin the numbers stay in the sentence.
To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-meter on in preferences.self).
inline [=_=] -> meter verbatim~~~ selfscribe
inline [=_=] -> meter verbatim
~~~
Raised so far [= 7200 / 10000 =] for the new lifeboat.
Raised so far 7200 / 10000 for the new lifeboat.
view plugin
#Tables, cards, boards, lists, calendars and forms from records in plain text, editable in place.
A built-in plugin that shows a data source (a data block or a data file). The engine draws a static table, cards or calendar for every renderer. The client half makes it interactive: search, sort, filter chips, pages, editing cells by type, dragging board cards and a form to add records. Each change is written back into the text as one undo step. A view with dates has Add to calendar, which saves its records as an .ics file for any calendar app.
The rules are those of the built-in data rulebook, so use data is all a document needs. See Data and views.
To use it, add these rules to the rules block and switch the plugin on in Settings › Plugins (set plugin-view on in preferences.self).
block ```data\ _ ... ``` -> data info=_1 verbatim
line view: _ -> view verbatim~~~ selfscribe
block ```data\ _ ... ``` -> data info=_1 verbatim
line view: _ -> view verbatim
~~~
```data tasks as board
title, status:choice(todo|doing|done), due:date
Write the spec, doing, 2026-09-20
Review fixtures, todo, 2026-09-24
```
view: tasks as table sort due
todo 1
Review fixtures
- due
doing 1
Write the spec
- due
done 0
| title | status | due |
|---|---|---|
| Write the spec | doing | |
| Review fixtures | todo |
map plugin
#Places, routes, areas and circles, one a line, on a map you can move and draw on.
A client plugin. A place is its name, @ and where it is: Café @ 38.7075, -9.1364. route Walk: Café -> Market -> 38.715, -9.14 goes through places or coordinates; area Old town: … / … / … goes around them; circle Wifi @ 38.71, -9.13 300m has a middle and a radius. End a line with a colour (red, #e5484d) and -- a note. # Title, tiles:, center:, zoom:, height: and units: change how it shows.
The map is the editor too: drag places and points, drag the dot between two points to add one, pick Place, Route, Area or Circle and click to draw, rename and recolour in the strip under the map. Every change is written into the text. Save as GeoJSON, or drop a GeoJSON file on the map. Street pictures load from OpenStreetMap only after you click Show the street map. Records with lat and lng show on the same map with view: places as map.
country Portugal green fills a country, and region Catalonia, state Texas or province Ontario a region. shade Visitors: Portugal 12, Spain 30 colours several by a number, palest for the smallest. Names work in any case, without accents and by their other names. A name the map does not know is listed under it with the nearest ones. The outlines come in a data pack you get once with Get under the map, or in Settings › App › Data packs. A table with a country column shows as shaded countries with view: trips as map. An exported page carries the outlines it draws.
To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-map on in preferences.self). Settings: set plugin-map-tiles ask|always|never (street pictures), set plugin-map-tile-url https://…/{z}/{x}/{y}.png (another tile server), set plugin-map-height 400, set plugin-map-units metric|imperial, set plugin-map-labels auto|on|off.
block ``` map ... ``` -> map verbatim~~~ selfscribe
block ``` map ... ``` -> map verbatim
~~~
```map
# A weekend in Lisbon
Café on the pier @ 38.7075, -9.1364 orange -- best pastéis in town
The market @ 38.7069, -9.1459
route Walk: Café on the pier -> The market blue
```
progress plugin
#A progress bar counting the ticked tasks of its section.
A built-in plugin: progress: Label counts the task items (- [ ] and - [x]) of its section, from the heading above it to the next heading of the same level (the whole document before any heading), and draws a bar. The count is the engine's, so every view shows it.
To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-progress on in preferences.self).
line progress: _ -> progress~~~ selfscribe
use markdown
line progress: _ -> progress
~~~
## Launch
progress: Launch checklist
- [x] Write the announcement
- [ ] Update the website
Launch
- Write the announcement
- Update the website
timeline plugin
#Milestones on a vertical timeline: done, current and planned.
A client plugin. One milestone per line: [x] DATE | Title | details ([x] done, [>] current, [ ] planned). title: and layout: alternate lines at the top set a heading and place milestones on both sides of the line.
To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-timeline on in preferences.self). Settings: set plugin-timeline-layout vertical|alternate.
block ``` timeline ... ``` -> timeline verbatim~~~ selfscribe
block ``` timeline ... ``` -> timeline verbatim
~~~
```timeline
[x] 2025-06 | Planning approved
[>] 2026-09 | Fitting out | Kitchen, stage and lighting
[ ] 2027-04 | Opening day
```
events plugin
#Dated events as an agenda or month grids.
A client plugin. One event per line: 2026-09-14 10:00-11:30 Kick-off @ Room 2 (a date, an optional time or range, the title and @ place). Write DATE..DATE for an event over several days. The agenda groups them by month and marks what is next from the reader's date. view: month draws month grids.
To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-events on in preferences.self). Settings: set plugin-events-view agenda|month and set plugin-events-weekstart mon|sun.
block ``` events ... ``` -> events verbatim~~~ selfscribe
block ``` events ... ``` -> events verbatim
~~~
```events
2026-09-14 10:00 Kick-off @ Room 2
2026-09-30 18:30 Launch party @ Rooftop
```
until plugin
#How far away a date is, inside a sentence: ((2026-12-24 Christmas)) reads “Christmas in 3 days”, then “today”.
A client plugin. A date between (( and )), with an optional name after it, reads “in 12 days”, “tomorrow”, “today” or “3 days ago”, counted from the reader's own date. With a time (2026-12-24 18:00) the last day counts in hours and minutes. It keeps counting while the page is open, and hovering shows the full date. Without the plugin the date stays as written.
To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-until on in preferences.self).
inline ((_)) -> until verbatim~~~ selfscribe
inline ((_)) -> until verbatim
~~~
The winter timetable starts ((2026-11-01)). Next up: ((2027-06-20 Summer fair)).
The winter timetable starts 2026-11-01. Next up: 2027-06-20 Summer fair.
poll plugin
#A question with options drawn as bars of votes. Clicking an option adds a vote to the text.
A client plugin. The first line is the question. Each option starts with -, and its votes follow as tally marks (- Tea |||) or a number (- Tea (3)). Each option shows as a bar with its count and share. Click one to add a vote: that line of the text changes, as one undo step, so the document stays the record. In a read-only view the bars show without buttons.
To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-poll on in preferences.self).
block ``` poll ... ``` -> poll verbatim~~~ selfscribe
block ``` poll ... ``` -> poll verbatim
~~~
```poll
Where shall we eat on Friday?
- The Thai place |||
- Noodle bar (2)
- Bring our own
```
graphviz plugin
#Graphs and architecture diagrams in the DOT language.
A client plugin that lays out DOT graphs with Graphviz compiled to WebAssembly, loaded only when a document uses it.
To use it, add these rules to the rules block and switch the plugin on in Settings › Plugins (set plugin-graphviz on in preferences.self). Settings: set plugin-graphviz-engine dot|neato|fdp|circo|twopi|osage (the layout engine).
block ``` dot ... ``` -> graphviz verbatim
block ``` graphviz ... ``` -> graphviz verbatim~~~ selfscribe
block ``` dot ... ``` -> graphviz verbatim
block ``` graphviz ... ``` -> graphviz verbatim
~~~
```dot
digraph { rankdir=LR; order -> kitchen; kitchen -> pass; pass -> table; pass -> takeaway }
```
uml plugin
#Class and component diagrams from a compact text syntax (nomnoml).
A client plugin that draws UML-style diagrams with nomnoml, loaded only when used.
To use it, add these rules to the rules block and switch the plugin on in Settings › Plugins (set plugin-uml on in preferences.self).
block ``` uml ... ``` -> uml verbatim
block ``` nomnoml ... ``` -> uml verbatim~~~ selfscribe
block ``` uml ... ``` -> uml verbatim
block ``` nomnoml ... ``` -> uml verbatim
~~~
```uml
[Member|name;card number|borrow();renew()]
[Member]->[Loan|due date]
```
mindmap plugin
#An indented list drawn as a map that branches out. Click a node to fold its branch.
A client plugin. Write one idea per line and indent a line to make it a branch of the one above (list bullets are fine). The first line is the middle of the map. With several lines at the left edge, a # Title line names the map that joins them. Click a node or press Enter on it to fold or unfold its branch, and use the arrow keys to move between nodes. Folding changes only the view: the text stays a list.
To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-mindmap on in preferences.self).
block ``` mindmap ... ``` -> mindmap verbatim~~~ selfscribe
block ``` mindmap ... ``` -> mindmap verbatim
~~~
```mindmap
Lisbon in May
Travel
Flights
Stay
Alfama flat
See
Tram 28
Sintra
```
flow plugin
#Boxes and arrows from lines of text, laid out for you: flowcharts, systems, database tables.
A client plugin with no library behind it. Each node ID "Label" :shape line is a box and each a -> b "label" line an arrow; the boxes are laid out in layers (set direction=LR turns the flow sideways) and the arrows go round the boxes in their way. group ID "Name" { a b } draws a box around others, lane a band across the flow. Shapes include :decision, :database, :person, :note and :table (its indented lines are rows, and arrows can join rows: orders.e2 -> users.w1). at X,Y pins a box where you want it. Boxes are coloured by kind from the theme (decisions orange, databases teal, starts and ends green); color= picks another, and set colors=plain draws it all in one colour. A mistake shows the line it is on.
A wide diagram can say which part to open on. Name a part with view front at 0,0 size 300x200, then write set open=front. The page shows that part, and the editor opens there.
To make an arrow move, end its line with moving (or moving=slow, moving=fast); set moving=on moves them all, and a -> b -> c joins several in one line. To show the diagram in stages, add step "The browser asks": web api lines: a bar under it steps through them, and print, export and reduced motion show everything. For a circuit, use the shapes :battery, :resistor, :lamp, :switch, :switch-closed, :led, :diode, :capacitor, :motor, :ground and :junction: they are drawn as schematic symbols joined by wires, one loop is drawn as a rectangle, and current only moves (and a lamp only lights) when the loop is closed. Click a switch to flip it, or hold down a :button; the text does not change.
To keep boxes lined up while you edit, write a keep line: keep web api db in-a-row gap=60, keep a b in-a-column, keep a left-of b, keep a above b, keep a b same-size (or same-width, same-height) or keep a centred-on b. The first name stays and the others follow; names can be boxes, groups or placements. In the editor a drag takes the tied boxes along, "…and keep it" beside the line-up buttons writes the rule, and a selected box lists its rules with a × to take each away.
To make a state machine a reader can run, write set start=idle. Nodes are states and a link's text is the event that moves along it. The events that leave the current state are buttons under the diagram, with Reset and a trail of where it has been. A state with no way out says so.
To drive a packet over a detailed drawing instead (groups, tables and all), add move lines to set start=: move "accepted": filter app is an event and the boxes the packet passes, from the stop it leaves to the stop it reaches (a b c, a, b, c and a -> b -> c alike; speed=fast to hurry it). The events leaving the stop it is on are the buttons; the packet travels the links between, lighting each box, the stop it reaches is lit, and the trail names each stop with its group (INPUT filter). A box no move starts or ends at is only passed. Each path incoming "For this machine": a b c color=green line is a button that lights a way through the diagram and sends a packet round it; the arrows beside it walk it a hop at a time (next, back, the arrow keys), and play lets it go round again.
To edit a diagram by hand, hover over it and press Edit (or double-click an empty part of it). Drag boxes to move them (at X,Y is written), drag from the dot on a box's side to another box to join them, double-click to change words, Delete to take away, and use the toolbar to add shapes, undo, tidy and zoom. Every change is a short line in the block's text, which is still what is saved.
Full editor (or a .flow file) gives the editor the whole page area: a library of shapes on the left, the outline, views and steps on the right. To show one diagram in several places, name it with a first line diagram booking "Booking", save windows onto it with view front "Front" at 0,0 size 300x120 (or Add view), and show one elsewhere with a block that holds only from booking view front (or from orders.flow view checkout for a file). set hidden=on keeps a diagram out of the page except through its views.
To place a part many times, define it once as block pump "Pump {n}" n=1 { … } and place it with use pump as p1 at 0,0 n=2; {n} takes the use line's value or the block's default. Links go to p1 or into it, p1.motor. import parts.flow uses another file's blocks. In the editor, Make a block turns a selection into one, and double-clicking a placement edits the block for every placement.
A state is the same drawing with a few things different, one thing a line: state night { lamp color=yellow / door at 120,40 / guard hidden / sw closed / sign "Closed" }. A line written as a link changes the links between those boxes, either way round: door -> hall color=red dashed moving, hall -> yard hidden, still to stop one that moves, "words" for its text. Long words on a link wrap to three lines (the rest on hover), and boxes placed too close for a link to pass between are joined straight across, with a problem naming them. Show it with set state=night, state=night on a view or a step, or by naming it after a machine state; the boxes glide between states. In the full editor, clicking a state in the States list edits it.
To have a diagram remember what the reader clicked, write set keep=panel and add a data block panel whose first line is name, value. Each switch, the machine's state and the step shown become rows such as kettle.state, boiled (a named diagram puts its name in front, so diagrams can share a block). The diagram opens as it was left, every showing of it agrees, view: panel as table shows the rows, and automations hear each click as a changed record. A missing block shows the three lines to add and Create it; in the editor, Forget takes the rows away.
To show the state of records on your own drawing, write set data=tasks (a data block, a .csv file or a database table) and give steps the titles of the records, or record="Book the ferry" where the words differ. A step takes the colour of its record's status (done green, doing the accent, blocked red), a pick in any view of the records marks it, a click picks the record, and the bar under the diagram sets the status or opens the record.
With nothing picked, that bar says how many records are drawn, and Add records not drawn writes a step for each record that has none (node pack "Pack the bags" record="Pack the bags", with an arrow from each record named in its after column), as one undo step. set data=tasks lane=status puts each step in the lane of its record's value in that column (any column will do), and a step moves lane when its record changes; the lanes are drawn, not written. Give a record a new title and its step follows it.
Draw one part and place it many times with a repeat line: repeat cell as c 4x3 at 0,0 gap 20 n={i*2} places block cell four across and three down, named c1 to c12. 5 across (or just 5) makes a row and 5 down a column. In its values, {i} is the copy's number, {row} and {col} its place, and small sums like {i*2} or {row+1} work them out; joined links each to the next in its row (joined all goes on from the end of each row to the start of the next, so the whole grid is one chain), and join="{this}.out -> {below}.in" writes a link of your own for each ({next} in the row, {below} under it, {after} by number). Link to a copy by its name (tank -> c7, c3.motor). One line makes at most 500 copies, and the copies are kept side by side, gap apart (joined ones at least 40, room for their arrows), however big each is drawn. In the editor, Repeat in a placement's strip writes the line, and the handle at the end of the row adds copies or takes them away. More keep rules: keep b right-of a gap=30, keep b below a, keep a beside b, keep a inside g (a is in group g wherever it is written), alongside in-a-row, in-a-column and same-size; where two rules want the same thing, the earlier line wins and the later one is named as the problem.
To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-flow on in preferences.self).
block ``` flow ... ``` -> flow verbatim~~~ selfscribe
block ``` flow ... ``` -> flow verbatim
~~~
```flow
set direction=LR
node web "Web app" :person
node api "API" :service
node db "Orders" :database
web -> api "HTTPS" moving
api -> db
```
trail plugin
#What happens, step by step, down the page or across it: branches indented, who does it or a time lined up beside each step, ticked as a reader goes.
A client plugin with no library behind it. One step a line, joined down a line with a dot each. Indent a line to put it on a branch of the step above; yes: or no: at its start names the branch, and a step that ends in ? is drawn as a decision. Everything after a | is a side column (who does it, a time, a note): the columns line up across the steps, each only as wide as its widest entry. [x], [>], [ ] and [!] at the start of a step mark it done, now, to do and failed.
With lanes: Customer, Shop, Bank as its first line it draws messages between parties: Customer -> Shop: what is sent, with --> for a reply. Without the plugin the block is its own text, which already reads as an indented list.
A line across (or horizontal) before the first step lays the steps left to right, wrapping to more rows; a branch is listed under its step and the side columns become small lines under each step. Below about 520 pixels wide it goes back down the page; lanes always go down the page. Click a step, or press Enter or Space on it, to tick it done: the tick lasts while the page is open, is never written into the document, and does not print.
To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-trail on in preferences.self).
block ``` trail ... ``` -> trail verbatim~~~ selfscribe
block ``` trail ... ``` -> trail verbatim
~~~
```trail
Basket checked out | customer
Card accepted? | card issuer
yes: Order number sent by email | shop
no: Ask for another card
Packed at the warehouse | | same day
Handed to the courier | warehouse team | ≤4h
Left at the door | courier | 1 day
```
anatomy plugin
#A line or a few taken apart: a command, an address or a piece of code with each part underlined in its own colour and named below it.
A client plugin with no library behind it. The first line is the thing itself. Each line after it is part: name | note: the part is found in the first line as written (the next place it occurs, so a part that occurs twice is named in order), underlined in its own colour, and labelled below with a line joining the two. The labels step down from right to left, so no line crosses another.
Put a part in backticks when it holds a colon and a space. A # Title line first is a caption. Point at a part or its label to light the pair. Without the plugin the block is its own text.
For several lines, such as a short piece of code, end them with a line ---: every line above it is the thing, kept as indented, and the parts below it are found through those lines in order. Each line's labels sit under that line, and the lines below move down to make room.
To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-anatomy on in preferences.self).
block ``` anatomy ... ``` -> anatomy verbatim~~~ selfscribe
block ``` anatomy ... ``` -> anatomy verbatim
~~~
```anatomy
https://shop.example.com:8443/orders/42?expand=items
https: scheme | how to talk to it
shop.example.com: host | which machine
8443: port | which door on it
/orders/42: path | which thing
expand=items: query | how you want it
```
layers plugin
#A stack from the top, one layer a line: its name, what lives in it and a note. Stacks side by side, a path through them, or a pyramid.
A client plugin with no library behind it. Each line is Name | things, in, it | note, drawn as a band in its own colour with the things as small tags. > before a name lights that layer, and a line that says pyramid draws the stack narrowing to its top. A # Title line first is a caption.
A line that is a name and a colon alone (Laptop:) starts a stack drawn beside the one before, bottoms level. path Request: Application > Transport > Link draws a journey through the layers named, with an arrowhead at each and the name in a key below. With stacks side by side it goes down the first and crosses to the next where it turns upward or names a layer twice (Link > Link); path Reply: Server Application > ... starts in the stack named. A layer it cannot find is said in words.
Without the plugin the block is its own text, which already reads as a list from the top.
To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-layers on in preferences.self).
block ``` layers ... ``` -> layers verbatim~~~ selfscribe
block ``` layers ... ``` -> layers verbatim
~~~
```layers
Application | HTTP, DNS, TLS | what programs say to each other
Transport | TCP, UDP | getting it there whole
> Internet | IP | finding the machine
Link | Ethernet, Wi-Fi | the next hop
```
nest plugin
#What is inside what: an indented outline drawn as boxes inside boxes.
A client plugin with no library behind it. Indent a line to put it inside the line above. A thing that holds others is a box with its name on top and its contents side by side; a thing that holds nothing is a tile. Everything after | is a small note. The outermost boxes each take a colour, and contents wrap where the page ends.
Without the plugin the block is its own text: an indented list.
To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-nest on in preferences.self).
block ``` nest ... ``` -> nest verbatim~~~ selfscribe
block ``` nest ... ``` -> nest verbatim
~~~
```nest
Your laptop
Browser
Tab | your page
Extension
Editor
The data centre
Load balancer
App servers | three of them
Database
```
scale plugin
#Amounts placed along one measure, so a nanosecond and a second, or a village and a city, can be seen against each other.
A client plugin with no library behind it. Each line is What: amount, drawn as a row with a dot where the amount falls. Units of one kind are brought to one measure: times (ns us ms s min h d y), sizes (B KB MB GB TB), lengths (nm um mm cm m km) and weights (mg g kg t); 3k, 2M and 1bn are thousands, millions and billions; any other unit works when every line uses the same one.
When the largest is a thousand times the smallest, each step along the line is ten times the one before; a line that says log or linear chooses. > before a name lights its row. A # Title line first is a caption.
To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-scale on in preferences.self).
block ``` scale ... ``` -> scale verbatim~~~ selfscribe
block ``` scale ... ``` -> scale verbatim
~~~
```scale
Read from memory: 100 ns
Read from an SSD: 150 us
Round trip in a data centre: 0.5 ms
> A disk seek: 10 ms
Packet to another continent and back: 150 ms
```
versus plugin
#Two or more choices side by side, point by point, with strengths and weaknesses marked and a verdict under them.
A client plugin with no library behind it. The first line names the choices, each after a bar (| This | That); * before one marks the one chosen and tints its column. Each line after is Point: first | second. A cell that starts with + is a strength, - a weakness and ~ in between; yes and no alone count as + and -. A line that starts => is the verdict.
Without the plugin the block is its own text, which reads as a list of points.
To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-versus on in preferences.self).
block ``` versus ... ``` -> versus verbatim~~~ selfscribe
block ``` versus ... ``` -> versus verbatim
~~~
```versus
| A server database | *One file | Plain files
Setup: - a server to run | + nothing | + nothing
Many writers at once: + yes | ~ one at a time | - no
Backups: a dump or a replica | copy the file | copy the folder
=> One file: the app has one writer, and a backup is a copy.
```
bits plugin
#The fields of a packet header, file format or record, drawn as a ruled strip with the bit or byte numbers above.
Write Name: width, one field a line: Version: 4, Length: 2 bytes. A line that says bytes counts in bytes, and row 16 sets how many go in a row. A field that runs past the end of a row carries on in the next, and variable fills the rest of a row.
Add | note for a small note under the name and put > before a name to light it. Narrow fields get a letter, named in a key under the strip.
To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-bits on in preferences.self).
block ``` bits ... ``` -> bits verbatim~~~ selfscribe
block ``` bits ... ``` -> bits verbatim
~~~
```bits
# IPv4 header
Version: 4
IHL: 4 | header length in words
Type of service: 8
Total length: 16
Identification: 16
Flags: 3
Fragment offset: 13
> Time to live: 8
Protocol: 8
Header checksum: 16
Source address: 32
Destination address: 32
```
split plugin
#One whole divided into named shares, drawn as a single bar with a legend of amounts and percentages.
Write Name: amount, one share a line, and each gets its share of one bar. Write 35% to make a share that much of the whole, and a line of 2400 to state the whole: what is not filled is shown as what is left.
Put > before a name to light that share, and add | note for a small note.
To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-split on in preferences.self).
block ``` split ... ``` -> split verbatim~~~ selfscribe
block ``` split ... ``` -> split verbatim
~~~
```split
# Where the pay goes
Rent: £900
Food: £320
> Travel: £140 | season ticket
Bills: £180
Savings: £400
of £2,400
```
budget plugin
#Parts laid end to end against a limit, with what is left, or what is over and by how much.
Write the limit first, as limit: 200 ms, then Part: amount a line. The parts fill a track as wide as the limit; what is left is said, and what goes past the limit is drawn in red with how much it is over.
Amounts of one kind may mix units (ms and s, kg and lb), and 20% is that much of the limit. Put > before a name to light it, and add | note for a small note.
To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-budget on in preferences.self).
block ``` budget ... ``` -> budget verbatim~~~ selfscribe
block ``` budget ... ``` -> budget verbatim
~~~
```budget
# Loading the page on a phone
limit: 1 s
DNS lookup: 60 ms
Connect and TLS: 180 ms
> Server: 320 ms
Download: 240 ms
Render: 150 ms
```
range plugin
#Values against their bands, such as a blood test against the normal range, with the band each falls in named and coloured.
Write Measure: value | band | band, as Potassium: 5.9 | low < 3.5 | normal 3.5 to 5.1 | high > 5.1. Each measure gets a banded track with a pin at the value, and the band it falls in is named beside it.
Put +, ~ or - and a space before a band to mark it good, a warning or bad; otherwise the middle band is good and the outer ones are warnings. A last cell that is not a band is a note, and > before a name lights that row.
To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-range on in preferences.self).
block ``` range ... ``` -> range verbatim~~~ selfscribe
block ``` range ... ``` -> range verbatim
~~~
```range
# Blood test, 3 March
Potassium: 5.9 mmol/L | low < 3.5 | normal 3.5 to 5.1 | high > 5.1
Sodium: 139 mmol/L | low < 135 | normal 135 to 145 | high > 145
> Glucose, fasting: 6.4 mmol/L | normal 3.9 to 5.5 | ~ raised 5.6 to 6.9 | - diabetic > 7 | before breakfast
```
ledger plugin
#Double-entry bookkeeping: journal entries posted to T-accounts, with totals, balances and a check that the books balance.
Write one entry a line, as Buy stock: Stock 500 / Cash 500: the debit before the slash, the credit after it. Join accounts on one side with +, and leave the amount off one account to take the other side's total.
Each account becomes a T with its debits left and credits right, every amount numbered by its entry. The line under the Ts says whether the books balance; put > before an entry to light it, and add | note for a small note.
To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-ledger on in preferences.self).
block ``` ledger ... ``` -> ledger verbatim~~~ selfscribe
block ``` ledger ... ``` -> ledger verbatim
~~~
```ledger
# The bakery's first week
Owner puts in cash: Cash £5,000 / Capital £5,000
Buy an oven: Equipment 2,400 / Cash 2,400
Buy flour on credit: Stock 300 / Suppliers 300 | invoice 117
> Sell bread for cash: Cash 450 / Sales 450
Pay the flour bill: Suppliers 300 / Cash 300
```
waterfall plugin
#Where an amount starts, the steps that raise or lower it, and where it ends, each step floating from the last.
Write Name: amount one a line. The first is the start; after it, -640 is a fall and +150 a rise, each bar floating from where the last ended. A line = Name is a total at the sum so far, and = Name: 3,190 checks it.
Put > before a name to light it, add | note for a small note, and end with => for a conclusion. A line that says costs draws a fall as good news and a rise as bad. A # Title line first is a caption.
To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-waterfall on in preferences.self).
block ``` waterfall ... ``` -> waterfall verbatim~~~ selfscribe
block ``` waterfall ... ``` -> waterfall verbatim
~~~
```waterfall
# From salary to take-home
Salary: £4,200
Income tax: -640
National insurance: -310
Pension: -210 | 5% of pay
Bonus: +150
= Take-home
```
funnel plugin
#How many are left at each stage, drawn as centred bars narrowing down, with the share that went on from one stage to the next.
Write Stage: how many one a line, from the first stage to the last. Each stage is a centred bar, and between two stages a band says what share went on, such as 15% went on. From the third stage on, each also says its share of the first.
Put > before a name to light it, add | note for a small note, and end with => for a conclusion. A # Title line first is a caption.
To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-funnel on in preferences.self).
block ``` funnel ... ``` -> funnel verbatim~~~ selfscribe
block ``` funnel ... ``` -> funnel verbatim
~~~
```funnel
# From visit to paying customer
Visited the site: 12,000
Signed up: 1,800
> Started a trial: 950 | the week we changed the welcome email
Paid: 240
=> Most people leave before signing up, so the front page comes first.
```
through plugin
#Where an amount comes from and where it goes, drawn as bands as wide as the amount that joins one thing to the next.
Write From -> To: amount one a line. Each thing is a bar as tall as what passes through it, and each flow a band as wide as its amount. A -> B -> C: 2 sends the same amount along each step.
Put > before a line to light its band and end with => for a conclusion. A flow that loops back to where it started is left out and named. A # Title line first is a caption.
To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-through on in preferences.self).
block ``` through ... ``` -> through verbatim~~~ selfscribe
block ``` through ... ``` -> through verbatim
~~~
```through
# Where the month's money goes
Salary -> Rent: £900
Salary -> Food: 320
Salary -> Savings: 300
Freelance -> Savings: 400
> Savings -> Holiday: 250
```
arc plugin
#One smooth curve over named beats, for the shape of something that rises and falls: a story, a season, a week of training.
Write Beat: height one a line, in order. A smooth curve runs through a dot on every beat, scaled from the lowest height to the highest, and each beat is named under the line.
Put > before a name to light it, add | note for a small note under the name, and end with => for a conclusion. A # Title line first is a caption.
To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-arc on in preferences.self).
block ``` arc ... ``` -> arc verbatim~~~ selfscribe
block ``` arc ... ``` -> arc verbatim
~~~
```arc
# The shape of the story
Ordinary world: 2
The call: 4
Trials: 6
> The ordeal: 9 | the darkest hour
The road back: 5
Home, changed: 3
```
quadrant plugin
#Things placed on two axes in a square split into four named corners, such as effort against impact.
Write one thing a line as Name: across, up, each from 0 to 10, as in Dark mode: 2, 8. Percentages (30%, 80%) and the words low, mid and high work too. across: Effort | low | high and up: Impact | low | high name the axes and their ends, and corners: Quick wins | Big bets | Fill-ins | Money pits names the quarters from top left to bottom right.
Put > before a name to light that thing. A line the block cannot place is named under the plot, and the rest is still drawn.
To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-quadrant on in preferences.self).
block ``` quadrant ... ``` -> quadrant verbatim~~~ selfscribe
block ``` quadrant ... ``` -> quadrant verbatim
~~~
```quadrant
# What to build next
across: Effort | low | high
up: Impact | low | high
corners: Quick wins | Big bets | Fill-ins | Money pits
Dark mode: 2, 8
Offline sync: 9, 9
> New onboarding: 4, 7
Export to PDF: 3, 4
A new billing system: 8, 2
```
rubric plugin
#Criteria against levels in a grid, with the level that applies lit in each row and a count or score under it.
Name the levels on the first line, each after a bar: | Starting | Getting there | Secure | Beyond. Then write Criterion: level one | level two | level three | level four, and put * before the cell that applies, as in * a point carried through.
Give each level a number, as in | Starting 1 | Secure 3, and the line under the grid adds up a score. Put > before a criterion to light its row.
To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-rubric on in preferences.self).
block ``` rubric ... ``` -> rubric verbatim~~~ selfscribe
block ``` rubric ... ``` -> rubric verbatim
~~~
```rubric
# Year 9 essay: Sam
| Starting | Getting there | Secure | Beyond
Argument: no clear point | a point, stated once | * a point carried through | answers the other side
Evidence: none | one example | * quotes that fit | quotes weighed against each other
Writing: hard to follow | * clear in places | clear throughout | a voice of its own
```
who plugin
#Tasks against people with each person's part as a lettered badge, flagging tasks no one does or two people sign off.
Name the people on the first line, each after a bar: | Ana | Ben | Chloe. Then write Task: R | A | C, or more readably Task: does | signs off | told, one cell a person. asked (or C) is someone consulted before, and told (or I) someone informed after. A dash or an empty cell is no part.
A cell that starts with a name, as in Ben signs off, goes to that person. A task that no one does, or that two people sign off, is flagged under its name.
To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-who on in preferences.self).
block ``` who ... ``` -> who verbatim~~~ selfscribe
block ``` who ... ``` -> who verbatim
~~~
```who
# Launching the spring menu
| Ana | Ben | Chloe | Dev
Write the dishes: does | signs off | asked | told
Price the menu: asked | does, signs off | - | told
Order the produce: told | signs off | does | -
> Print the menu cards: - | signs off | told | does
Train the floor staff: does | told | asked | does
```
cases plugin
#Which conditions lead to which outcome, one numbered case a row, with yes and no drawn as ticks and crosses.
Name the conditions on the first line, each after a bar, and the outcome after =>: | Member | Order over £40 | => Delivery. Then write one case a line, as in yes | any | free. yes and no become a tick and a cross, and any or - a quiet dash.
A case with too few or too many cells is named under the table, and so are two cases with the same conditions but different outcomes.
To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-cases on in preferences.self).
block ``` cases ... ``` -> cases verbatim~~~ selfscribe
block ``` cases ... ``` -> cases verbatim
~~~
```cases
# Who gets free delivery
| Member | Order over £40 | => Delivery
yes | any | free
no | yes | free
no | no | £3.50
```
cross plugin
#Two parents' genes crossed in a Punnett square, with each child's genes and the share that shows each trait.
Write each parent as Mother: Bb, two letters a gene with the capital dominant, and name what a letter gives with B: brown eyes. Two genes, as in RrYy, give a 4 by 4 square. Bb x Bb on one line gives both parents.
Under the square each outcome is listed with its share, as 3 in 4 brown eyes, then the genotype ratio. Put > before a trait line to light the children that show it.
To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-cross on in preferences.self).
block ``` cross ... ``` -> cross verbatim~~~ selfscribe
block ``` cross ... ``` -> cross verbatim
~~~
```cross
# Eye colour
Mother: Bb
Father: Bb
B: brown eyes
b: blue eyes
```
spans plugin
#Things that last, such as reigns, lifetimes, leases or project phases, laid over one time line so overlaps show.
Write Name: 1837 to 1901, one thing a line, and each gets a bar on one shared time line. Dates can be years, months (2024-03, Mar 2024) or days (15 Mar 2024), and now ends a thing today. A line with one date is a moment, drawn as a diamond.
End a line with a colon and indent the lines under it to group them under a heading. > before a name lights it, | adds a note, and # Title on the first line is a caption.
To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-spans on in preferences.self).
block ``` spans ... ``` -> spans verbatim~~~ selfscribe
block ``` spans ... ``` -> spans verbatim
~~~
```spans
# Who was on the throne
Victoria: 1837 to 1901
Edward VII: 1901 to 1910
George V: 1910 to 1936
Edward VIII: 1936
George VI: 1936 to 1952
> Elizabeth II: 1952 to 2022
Charles III: 2022 to now
```
seasons plugin
#What happens in which months: sowing and harvest, a financial calendar, a busy season, as rows across twelve months.
Write Harvest: Jul to Oct, one thing a line, and each gets a row across twelve months with its months filled. A range may wrap the year end (Nov to Feb), several go with commas (Mar to Apr, Sep), and all year fills the row.
| adds a note at the row's end and > before a name lights it. A line that says from Apr starts the year at April. # Title on the first line is a caption.
To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-seasons on in preferences.self).
block ``` seasons ... ``` -> seasons verbatim~~~ selfscribe
block ``` seasons ... ``` -> seasons verbatim
~~~
```seasons
# Tomatoes
Sow indoors: Feb to Apr
Plant out: May to Jun
> Harvest: Jul to Oct | earlier under glass
Feed weekly: Jun to Sep
Clear the beds: Nov
```
hours plugin
#A day as a ring: shifts, sleep, medicine or a routine as arcs on a 24-hour dial, with how long each lasts.
Write Sleep: 23:00 to 07:00, one thing a line, and each becomes an arc on a 24-hour dial with midnight at the top. A time alone, or several with commas (Pills: 08:00, 20:00), are dots. Things that overlap sit on separate rings, and the legend says how long each lasts.
A line that says 12 hours draws a twelve-hour face. Name days (Work: Mon to Fri 09:00 to 17:30) or write week to get seven rows instead. > lights a thing and | adds a note.
To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-hours on in preferences.self).
block ``` hours ... ``` -> hours verbatim~~~ selfscribe
block ``` hours ... ``` -> hours verbatim
~~~
```hours
# A nurse on days
Sleep: 22:30 to 06:30
> Shift: 07:00 to 19:30
Break: 12:00 to 12:45
Pills: 8am, 8pm | with food
Walk the dog: 20:00 to 20:30
```
timezones plugin
#One moment in several places, for a meeting or a handover: each place's local time, its day, and whether it is working hours, evening or night.
The line with a time is the moment: Tuesday 3 March 2026, 15:00 London, or 17:00 Berlin for today. Other lines name the places, separated by commas: cities, countries with one clock, short names such as ET, or zones such as Europe/Lisbon. Each place gets a row with its local time, +1 when it is the next day, and whether that is working hours, evening or night, with a strip of the day around it. The reader's own time zone comes last.
hours 8-18 sets the working hours and 12-hour writes 3:00 pm. > before a place lights its row, and a # Title line first is a caption. Summer time is right for the date written, from the browser's own data.
To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-timezones on in preferences.self).
block ``` timezones ... ``` -> timezones verbatim~~~ selfscribe
block ``` timezones ... ``` -> timezones verbatim
~~~
```timezones
Tuesday 3 March 2026, 15:00 London
New York, Toronto, São Paulo, Lagos, Delhi, Sydney
```
loop plugin
#A cycle that comes back to its start, such as the water cycle or plan, do, check, act, or a cause loop that grows or settles.
Write one stage a line, Name | note, and they go round a ring clockwise from the top, the last leading back to the first. The # Title sits in the middle, or write centre: words to put something else there. > before a name lights it.
For a cause loop write links such as More roads -> more driving +, with + or - at the end. Each arrow gets its sign, and the middle says whether the loop reinforces itself (an even number of -) or balances itself (an odd number).
To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-loop on in preferences.self).
block ``` loop ... ``` -> loop verbatim~~~ selfscribe
block ``` loop ... ``` -> loop verbatim
~~~
```loop
# The water cycle
Evaporation | the sun lifts water from the sea
Condensation | it cools into cloud
> Rain | it falls on the hills
Run-off | rivers carry it back to the sea
```
formula plugin
#A formula with each name given a value, worked out on the page, with a field for each value to try others.
Write the formula as revenue = visitors × conversion × price, then one value a line as visitors: 12,000 | people a month. Amounts can be 2.5%, £40 or 12k, and a later formula can use an earlier result: profit = revenue - costs.
Each value gets a field: change it and the result is worked out again, without touching the text. As written puts the values back. Put > before a name to light it.
To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-formula on in preferences.self).
block ``` formula ... ``` -> formula verbatim~~~ selfscribe
block ``` formula ... ``` -> formula verbatim
~~~
```formula
# What the shop takes in a month
revenue = visitors × conversion × price
visitors: 12,000 | people a month
conversion: 2.5% | of visitors buy
price: £40 | the average order
```
odds plugin
#Choices, what may happen on each with its chance and payoff, and what each choice is worth on average.
Write each choice at the left and what may happen under it, indented, as Sells well 30%: +400k. A chance can be 30%, 0.3 or 3 in 10, and one outcome with no chance takes what the others leave. Outcomes can have outcomes of their own under them.
Each choice shows what it is worth on average, and the best is marked and named underneath. Chances that do not add up to 100% are named in plain words. Do nothing: 0 is a sure payoff, and a line starting => is your own verdict.
To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-odds on in preferences.self).
block ``` odds ... ``` -> odds verbatim~~~ selfscribe
block ``` odds ... ``` -> odds verbatim
~~~
```odds
# Launch the cider now, or wait a year
Launch now
Sells well 30%: +400k
Sells poorly 70%: -100k
Wait a year
Sells well 60%: +250k
Sells poorly: -50k
```
argument plugin
#A claim with the reasons for it and against it, the answers to each, and what follows, in two columns.
Write the claim first, then because: for a reason for it, but: for a reason against and so: for what follows. +, - and => work too, and a note goes after |.
Indent a line under a reason to answer it: however: sets it against the reason, because: backs it up. Each column counts the reasons that still stand unanswered.
To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-argument on in preferences.self).
block ``` argument ... ``` -> argument verbatim~~~ selfscribe
block ``` argument ... ``` -> argument verbatim
~~~
```argument
# Should the launch move?
We should move the launch to May
because: The payments work will not be done in April | two engineers are out
because: May has the trade fair
but: Marketing has booked April
however: the booking can be moved for £2k
so: Move it, and pay the fee
```
causes plugin
#One effect and its causes in groups, drawn as a fishbone with a bone for each group.
Write the effect first, then one group a line as People: new starters not trained, one packer on Mondays. A group's name can stand alone with its causes indented under it, one a line, and ; splits a line whose causes have commas.
It is drawn as a fishbone with the effect at the right. With more than six groups or long causes it becomes cards around the effect, and on a phone it is always cards. Put > before a group or a cause to light it.
To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-causes on in preferences.self).
block ``` causes ... ``` -> causes verbatim~~~ selfscribe
block ``` causes ... ``` -> causes verbatim
~~~
```causes
# Why orders ship late
Orders ship late
People: new starters not trained, one packer on Mondays
Process: orders printed twice a day
Supplier: boxes arrive Thursday
Systems: stock count wrong
```
truth plugin
#A truth table worked out from a logic expression, with a row for every way its inputs can be.
Write a logic expression a line, as alarm = door and not key or A and (B or not C). and or not xor, && || !, ∧ ∨ ¬, -> and <-> work, and the other names are the inputs, up to six.
Each expression gets a result column. A line steps adds a column for each bracketed part and a line bits writes 1 and 0. Under the table it says in how many rows each is true, and which agree in every row.
To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-truth on in preferences.self).
block ``` truth ... ``` -> truth verbatim~~~ selfscribe
block ``` truth ... ``` -> truth verbatim
~~~
```truth
# When the alarm sounds
alarm = door and not key
siren = alarm or test
```
bracket plugin
#A knockout tournament drawn round by round, each match joined to the next, with the champion at the end.
Write a round's name, then one match a line under it: Ravens 3 - 1 Otters, or Swifts v Stoats when not yet played. A round left empty, such as a lone Final, is filled in from the winners, and a side not yet known shows as winner of Swifts v Stoats. A draw needs a note naming who went through: Swifts 1 - 1 Badgers | Swifts on penalties.
Put > before a team's name to follow it through the bracket. Each round needs half the matches of the one before it. A wide bracket scrolls sideways inside its frame.
To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-bracket on in preferences.self).
block ``` bracket ... ``` -> bracket verbatim~~~ selfscribe
block ``` bracket ... ``` -> bracket verbatim
~~~
```bracket
# Spring cup
Quarter-finals
Ravens 3 - 1 Otters
Herons 0 - 2 Foxes
Swifts 1 - 1 Badgers | Swifts on penalties
Stoats 2 - 0 Wrens
Semi-finals
Ravens 1 - 2 > Foxes
Swifts v Stoats
Final
```
league plugin
#A league or group table worked out from the results: points, goals and form for each team, and the matches still to play.
Write one match a line: Ravens 3 - 1 Otters once played, Herons - Ravens or Herons v Ravens before, with a note after a bar if you like (| 4 Dec). The table works out played, won, drawn, lost, goals, the difference, points and the last five results, and lists the matches still to play under it.
points 3 1 0 sets the points for a win, a draw and a loss. top 2 marks the places that go through and bottom 1 the places that go down. Level teams are split by goal difference, goals for, the matches between them and then their names. Write tie-break head-to-head, goal difference to change the order. A # line starts a group, and > before a team lights its row.
To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-league on in preferences.self).
block ``` league ... ``` -> league verbatim~~~ selfscribe
block ``` league ... ``` -> league verbatim
~~~
```league
# Thursday five-a-side
Ravens 3 - 1 Otters
Foxes 2 - 2 Herons
Ravens 1 - 0 Foxes
Otters 4 - 2 > Herons
Herons - Ravens | 4 Dec
Otters - Foxes | 4 Dec
top 2
```
family plugin
#A family tree drawn top down: couples side by side, each generation in a row under its parents.
Write one person or couple a line, as Jean (1946) + Tom, and indent their children under them. Details go in brackets after a name. > before a name lights that person, and a name ending in † or details like (1921 to 2004) show someone who has died.
A line that says pedigree draws squares for (m), circles for (f) and fills those marked *. Someone who married twice is written twice, once with each partner; the second card has a dashed edge. A wide tree scrolls sideways inside its frame.
To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-family on in preferences.self).
block ``` family ... ``` -> family verbatim~~~ selfscribe
block ``` family ... ``` -> family verbatim
~~~
```family
# The Hendersons
Margaret (1921 to 2004) + Arthur (1919 to 1988)
Jean (1946) + Tom
Sarah (1972)
> David (1975) + Priya
Anil (2003)
Robert (1949)
```
railroad plugin
#A command's syntax or a grammar drawn as a track: follow it from left to right, taking any branch or loop.
Write a command as a manual prints it, as git commit [-a] [-m <message>], or one grammar rule a line, as digits = digit { digit }. Words sit in rounded boxes; <name> or the name of another rule sits in a square box.
[ ] may be left out, { } or * repeat any number of times, ... or + repeat once or more, a | b is a choice and ( ) groups. A line that will not read says where, and a wide track scrolls sideways inside its frame.
To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-railroad on in preferences.self).
block ``` railroad ... ``` -> railroad verbatim~~~ selfscribe
block ``` railroad ... ``` -> railroad verbatim
~~~
```railroad
git commit [-a] [-m <message>] [<file>...]
```
formation plugin
#Players placed on a pitch or court, line by line from the goal to the front, numbered and named.
Name the sport and the shape on the first line, as football 4-3-3, then one line of players a line from the goalkeeper forwards, split by bars: 8 Nakata | 4 Silva | 10 Rowe. Football, basketball and hockey have their markings drawn; other sports use a plain ground.
> before a player lights them. A line against Rovers 4-4-2 starts the other side, drawn in the other half. The pitch stands upright with your goal at the bottom, on a phone and on a page alike.
To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-formation on in preferences.self).
block ``` formation ... ``` -> formation verbatim~~~ selfscribe
block ``` formation ... ``` -> formation verbatim
~~~
```formation
# How we line up
football 4-3-3
1 Okafor
2 Lindqvist | 3 Marsh | 5 Adeyemi | 6 Barros
8 Nakata | 4 Silva | 10 Rowe
7 Ito | > 9 Hartmann | 11 Diallo
```
cover plugin
#The title block at the head of a report or proposal: title, subtitle, details such as author, date and version, and a marking.
The first line is the title and a second line with no colon is the subtitle. Then Label: value lines are the details: Prepared by: Okafor & Lind, Date: 3 March 2026, Version: 1.2 | draft for comment. A short line such as Confidential or Draft for comment is a marking, shown as a small ruled label.
A line that says centred makes a title page, which in print takes the whole first page. A line that says banner sets the title on a tinted band with the details in a row beneath.
To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-cover on in preferences.self).
block ``` cover ... ``` -> cover verbatim~~~ selfscribe
block ``` cover ... ``` -> cover verbatim
~~~
```cover
Harbour footbridge
A proposal for the Harbour Trust
Prepared by: Okafor & Lind
Date: 3 March 2026
Version: 1.2 | draft for comment
Reference: HT-2026-014
Confidential
```
facts plugin
#A panel of key facts, labels beside values, like the box at the side of an encyclopaedia page or atop a proposal.
Write one fact a line, Client: Harbour Trust, with | note after a value for a small note. A line with no colon, such as Team, is a heading for the facts under it. The # Title line is the panel's head, and > before a label lights that fact.
A line across lays the facts out as a strip of label-over-value cells for the top of a page. A line aside makes the panel narrow and sets it to the right of the text on a wide page.
To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-facts on in preferences.self).
block ``` facts ... ``` -> facts verbatim~~~ selfscribe
block ``` facts ... ``` -> facts verbatim
~~~
```facts
# Harbour footbridge
Client: Harbour Trust
Location: Old Quay, Port Maren
> Value: £1.8M
Start: March 2026
Finish: November 2026 | weather permitting
Team
Engineer: Okafor & Lind
Contractor: Bexley Civil
Project lead: Sara Quinn, sara.quinn@harbourtrust.example
```
stats plugin
#A few headline numbers as tiles, each with how it moved since last time and a small line of where it has been.
Write Name: value one a line, and after it | +12% for a change, | 3 4 6 5 8 for a trend and | note for a note, in any order. A rise is green and a fall red; write -0.4 good when a fall is the good news.
Put > before a name to light its tile. A # Title line first is a caption, and a line => is a conclusion under the tiles.
To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-stats on in preferences.self).
block ``` stats ... ``` -> stats verbatim~~~ selfscribe
block ``` stats ... ``` -> stats verbatim
~~~
```stats
# The quarter in four numbers
Revenue: £1.24M | +12% | against last quarter | 0.98 1.05 1.11 1.24
New customers: 318 | +41
Churn: 2.1% | -0.4 good | lower is better
> Cash in the bank: £860k | 14 months of runway
```
status plugin
#Workstreams marked red, amber or green, with a trend, what is going on and who owns each, under a bar counting each state.
Write Workstream: state | what is going on | owner one a line. A state is green, amber or red (or on track, at risk, off track), done, not started or paused, and after a comma a trend: improving, slipping or steady.
A bar above the rows counts each state. A bare line worst first puts red at the top, > before a name lights its row, and a line => is a conclusion.
To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-status on in preferences.self).
block ``` status ... ``` -> status verbatim~~~ selfscribe
block ``` status ... ``` -> status verbatim
~~~
```status
# Programme status, week 12
Payments: green | on track for the March release | Ana
Mobile app: amber, slipping | two weeks behind after the design change | Ben
Data migration: red | blocked on the supplier's export | Chloe
Training: green, improving | first sessions done
Website: done
```
okr plugin
#Objectives with the key results that measure them, each with a bar showing how far along it is, and the average for each objective.
Write an objective with no indent and its key results indented under it as Name: progress. Progress is 140 of 300, 7/10, 65%, 0.7, done or not started, and a result that counts down is from 40 to 10, now 12.
A result at its target is done and one under 30% is at risk. Each objective shows its average, and the whole block an overall figure. Add | note to any line, > before a line to light it, and => for a conclusion.
To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-okr on in preferences.self).
block ``` okr ... ``` -> okr verbatim~~~ selfscribe
block ``` okr ... ``` -> okr verbatim
~~~
```okr
# Goals for the spring quarter
Make sign-up effortless
Time to sign up: from 3 min to 1 min, now 1.4 min
Completion rate: 61% of 75%
Support tickets about sign-up: from 40 to 10, now 12
Grow in Germany
Paying customers: 140 of 300
German help pages: 22/30
Local payment methods: not started | waiting on the bank
```
score plugin
#Options scored against criteria that matter differently, with each option's weighted total and the top one marked.
Name the options on the first line, each after a bar: | Northgate | Harrow & Co | Bexley. Then write Criterion (weight 3): 4 | 3 | 5 one a line; x3 and [3] also give a weight, and no weight counts once. A bare line out of 5 sets the scale.
The total row gives each option's weighted sum and its share of the most possible, and the top column is tinted. Put * before the option chosen, > before a criterion to light it, and end with => for the conclusion.
To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-score on in preferences.self).
block ``` score ... ``` -> score verbatim~~~ selfscribe
block ``` score ... ``` -> score verbatim
~~~
```score
# Which supplier
| Northgate | Harrow & Co | Bexley
Price (weight 3): 4 | 3 | 5
Quality (weight 5): 5 | 4 | 3
Delivery time (weight 2): 3 | 5 | 4
Support: 4 | 4 | 2
=> Northgate: the best quality, at a fair price.
```
risks plugin
#A risk register with its heat map: how likely each risk is, how bad it would be, what is being done and who owns it.
Write one risk a line as Risk: likelihood, impact | what is being done | owner, as in Flooding in March: likely, severe | pumps on site | Ana. Likelihood runs rare, unlikely, possible, likely, almost certain; impact runs negligible, minor, moderate, major, severe; low, medium, high and the numbers 1 to 5 work for either. Add -> unlikely, major for where the risk stands after the work, and its dot moves there with an arrow.
The grid is banded by score (likelihood times impact) and the register is sorted highest first; a line as written keeps your order and a line 3 by 3 uses a three-step grid. Put > before a risk to light it.
To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-risks on in preferences.self).
block ``` risks ... ``` -> risks verbatim~~~ selfscribe
block ``` risks ... ``` -> risks verbatim
~~~
```risks
# Risks to the bridge works
Flooding in March: likely, severe | pumps on site from February | Ana
Steel arrives late: possible, major -> unlikely, major | second supplier agreed | Ben
Crane failure: rare, severe | weekly inspection | Ben
Complaints about the road closure: likely, minor | a letter to every house on the route | Chloe
A cable struck while digging: possible, major -> rare, major | ground scan before each dig | Ana
```
swot plugin
#Strengths, weaknesses, opportunities and threats in the usual two by two, with a conclusion under it if you give one.
Write Strengths, Weaknesses, Opportunities and Threats each on a line of its own, with the points under each one a line. The points may also follow the heading on its line, as Weaknesses: one oven; no parking. The four are drawn as a two by two: strengths and weaknesses on top, opportunities and threats below.
Put | a note after a point for a small note, > before a point to light it, and a line => what follows for the conclusion under the grid. A heading left out is an empty panel.
To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-swot on in preferences.self).
block ``` swot ... ``` -> swot verbatim~~~ selfscribe
block ``` swot ... ``` -> swot verbatim
~~~
```swot
# The bakery on Mill Street
Strengths
A loyal local customer base
The only bakery open before seven
Weaknesses
One oven, no spare
No parking outside
Opportunities
> The new estate, 400 homes | first families move in this spring
Wholesale to the two cafés on the square
Threats
A supermarket bakery counter | opening in June
Flour prices up a fifth this year
=> Open the second oven before the estate fills, and sell on mornings the supermarket cannot match.
```
horizons plugin
#A roadmap in columns, such as now, next and later, or quarters, or phases, with a card for each piece of work.
Write a heading for each column, such as Now, Next and Later, Q1 2027, Phase 2 or any line ending in a colon, and the cards under it one a line as Name | note or owner. Put [x] before a card that is done and [>] before one under way, and > before a card to light it.
The columns sit side by side and stack on a phone. A line lanes makes each card Theme: name, set in rows by theme across the columns.
To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-horizons on in preferences.self).
block ``` horizons ... ``` -> horizons verbatim~~~ selfscribe
block ``` horizons ... ``` -> horizons verbatim
~~~
```horizons
# Where the product is going
Now
[>] Faster search | Ana
[x] New sign-up flow
> [>] Invoices in the app | Ben
Next
Offline mode | needs the sync work first
Team accounts
Later
A phone app
Open data export
```
steps plugin
#A process in a few numbered stages drawn across the page, with what happens at each and how far along it is.
Write one stage a line as Name | what happens, with a third cell for a time if you want one: Design | two directions | 2 weeks. The stages are drawn across the page as numbered discs joined by a line.
Put [x] before a stage that is done and > or [>] before the one under way; once any stage is marked, the rest are drawn quietly as still to come. More than five stages, or a phone, set the stages down the page.
To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-steps on in preferences.self).
block ``` steps ... ``` -> steps verbatim~~~ selfscribe
block ``` steps ... ``` -> steps verbatim
~~~
```steps
# How we work with you
[x] Brief | we agree what is wanted and what it costs | 1 week
[x] Design | two directions, one round of changes | 2 weeks
> Build | weekly previews | 6 weeks
Launch | we stay for a month after | 1 month
```
org plugin
#An organisation chart drawn top down from an indented list: a card a person, lines from each head to their reports.
Write one person a line, as Priya Nair | Operations, and indent the people who report to someone under them. Each becomes a card, joined to their head by an elbow line, and each department takes its own colour.
> before a name lights that person. A post in brackets, (Head of marketing), or with a cell vacant is still to fill and is drawn dashed. Lines at the left edge make separate charts side by side. A wide chart scrolls sideways, and on a phone it becomes an indented list.
To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-org on in preferences.self).
block ``` org ... ``` -> org verbatim~~~ selfscribe
block ``` org ... ``` -> org verbatim
~~~
```org
# Who reports to whom
Maria Okafor | Chief executive
James Lindqvist | Finance
Accounts | 3 people
Payroll
> Priya Nair | Operations
Warehouse | Leeds
Delivery
Tom Hale | Sales
(Head of marketing)
```
pricing plugin
#Plans side by side as cards: each with its price, who it is for and what it includes, the recommended one raised.
Name the plans after bars, | Starter | *Team | Company, with * on the one you recommend. Then one row a line, Storage: 1 GB | 50 GB | 1 TB. A Price: row is drawn large at the head of each card and a For: row under the plan's name; yes and no become a tick and a dash.
The recommended card is raised with a ribbon; label: Most popular changes its word. > before a row lights it, and => starts a note under the cards. On a phone the cards stack, the recommended one first.
To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-pricing on in preferences.self).
block ``` pricing ... ``` -> pricing verbatim~~~ selfscribe
block ``` pricing ... ``` -> pricing verbatim
~~~
```pricing
# Plans for Harbour Books
| Starter | *Team | Company
Price: Free | £8 a user a month | Talk to us
For: one person | a team of up to 50 | everyone
Projects: 3 | unlimited | unlimited
Storage: 1 GB | 50 GB | as much as you need
Single sign-on: no | no | yes
Priority support: no | yes | yes
=> Every plan starts with a month free.
```
agenda plugin
#A meeting's items with who leads each and how long, the start of every item worked out, and the end time and total.
Write starts 09:30, then one item a line: Finance report | Ana Ruiz | 25 min | paper 3. A cell that reads as a length (25 min, 1h 30, 45) is the length, one that reads as a clock time (12:30) sets the item's time, and the others are who and a note. Each item's start is worked out, with the end time and the total under the agenda.
Items called Break, Lunch or Coffee are drawn quieter and not numbered. A gap before a set time is shown as free time, and a set time the items before it run past is flagged. > before a title lights it. A line approximate shows only the times written (10:30 | Site walk) and works out no end or total.
A cell in square brackets, [Training], is a small label saying what kind of item it is, and a line no numbers leaves the items unnumbered.
To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-agenda on in preferences.self).
block ``` agenda ... ``` -> agenda verbatim~~~ selfscribe
block ``` agenda ... ``` -> agenda verbatim
~~~
```agenda
# Board meeting, 12 March
starts 09:30
Welcome and apologies | Chair | 5 min
Minutes of the last meeting | Chair | 10 min
> Finance report | Ana Ruiz | 25 min | paper 3
Break | 15 min
Strategy for next year | Ben Marsh | 45 min | paper 4
Any other business | 10 min
```
approvals plugin
#Who prepared, reviewed and approved a document: signed with a date, awaiting with a line to sign on, or an open slot.
Write Approved by: Chloe Adeyemi | Managing director | 9 March 2026, one role a line. With a date it is signed, with no date it is awaiting a signature, and with no name (Approved by: | Chair of the board) it is an open slot with lines to fill in by hand.
declined or withdrawn in place of the date is shown in red. A line that says stacked sets the sign-offs as a table. The lines are thin and unshaded, so the block prints and can be signed.
To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-approvals on in preferences.self).
block ``` approvals ... ``` -> approvals verbatim~~~ selfscribe
block ``` approvals ... ``` -> approvals verbatim
~~~
```approvals
Prepared by: Ana Ruiz | Finance lead | 3 March 2026
Reviewed by: Ben Marsh | Operations | 5 March 2026
Approved by: Chloe Adeyemi | Managing director
Approved by: | Chair of the board
```
fill plugin
#Labelled boxes to write in by hand, some already filled, with tick boxes: the head of a printed record or form.
Write one box a line: Serial no.: is a blank box, Rated load: 3,500 kg a box with its value printed in it, and Date of visit: | dd / mm / yyyy a blank with a grey hint. One colon shares the row with other boxes, two colons (Client and site::) is the full width, and | 3 lines makes a box taller.
[ ] Fine to keep using [ ] Not to be used prints empty tick boxes with their words, and [x] a ticked one. A line with no colon is a heading, 3 across sets how many boxes share a row, and > before a label lights that box.
A label in quotes may hold a colon of its own ("Repair: what was done":: | 3 lines), and colons with no label make a box with none. ___ in a label, a heading or a tick option is a blank to write on, as in [ ] Other: ___. A line right or centre places boxes that do not fill the row, such as one box for initials, and stacked sets tick options one under another with each question in full-size type.
A line indented two spaces or more is a note to the line above it, in small type: under a box it sits under the label, and under a tick line, a question or an option it sits under that. Lines next to each other make a paragraph, a blank line starts another, and lines that start with - or 1. make a list. With stacked, a question that ends in ? or : takes the lines under it that are only [ ] words as its options, each with notes of its own. A line landscape prints the form on a page turned sideways.
To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-fill on in preferences.self).
block ``` fill ... ``` -> fill verbatim~~~ selfscribe
block ``` fill ... ``` -> fill verbatim
~~~
```fill
# Visit details
Record no.: THJ-IVR-01
> Date of visit: | dd / mm / yyyy
Last examination: | dd / mm / yyyy
Client and site:: Northgate Storage, Mill Road
Serial no.:
Rated load: 3,500 kg
Notes:: | 3 lines
Outcome: [ ] Fine to keep using [ ] Fine to use, with actions [ ] Not to be used until fixed
```
sheet plugin
#A ruled table to fill in by hand: a log, a checklist or a set of readings, with blanks, hints, tick boxes and rows to carry on.
Name the columns first: | Reading | Value | OK. Then one row a line: Gap at the top | (mm) | [ ]. An empty cell is a blank to write in, (mm) is a blank with a small hint, and [ ] is a printed tick box. + 10 rows adds blank rows to carry on by hand.
== Safety stops starts a group of rows under a heading, tall makes every row tall, widths: 50% 25% wide sets the column widths, and > before a row lights it. The header repeats on each printed page.
+ 6 rows like above repeats the row before it, tick boxes and all. A cell < joins the cell to its left across both columns. In the header 1..31 is thirty-one columns, and a line dense sets the sheet small and tight for such a grid.
In a cell, **bold**, a link [words](https://…) and ___ (a blank to write on) are drawn, and // starts a small second line. A row that starts with a bar has an empty first cell, unless every row starts with one.
+ rows for: Area clear · No oil leaks · Locks adds a row for each item of a list, the item in the first cell; end it with like above to copy the other cells from the row above. A header cell each: Mon · Tue · Wed is a column for each item. Items are split by ·, or by ; when there is no middle dot. When the document keeps the list in a setting (set checks Area clear · Locks), write {{checks}} in its place: an empty list, or one never filled in, is shown as a problem. A line landscape prints the sheet on a page turned sideways.
To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-sheet on in preferences.self).
block ``` sheet ... ``` -> sheet verbatim~~~ selfscribe
block ``` sheet ... ``` -> sheet verbatim
~~~
```sheet
# Key readings
| Reading | From | Value | OK
widths: 50% 10% 25% 15%
== Empty
Smallest gap at the top | 2.1 | (mm) | [ ]
> Platform level, worst corner | 2.2 | (mm) | [ ]
== With the car loaded
Smallest gap at the top | 2.1 | (mm) | [ ]
Touched in the forced test? | 3.13 | [ ] No [ ] Yes |
== Safety stops
Stop button at the top landing | 4.1 | [ ] Works [ ] Faulty |
Stop button in the car | 4.2 | [ ] Works [ ] Faulty |
```
sketch plugin
#A drawing by hand: pen, lines, arrows, boxes, sticky notes and words. With set mode=signature, a line to sign on.
A client plugin. Press Draw on the block and use the pen, the line, the arrow, the box, the oval, a sticky note or words. The rubber takes a stroke away, and the pointer picks a thing to move, recolour or delete. On a phone the tools open over the whole screen and a finger draws. Every stroke is written as one line of the text and one undo step, so the document is always the drawing.
One thing per line: pen blue 4: 40,60 52,58 (a colour, a width, then the places), line 40,200 300,200, arrow 300,120 420,160 red, box 40,40 160x80 "Draft" yellow, oval 300,40 120x70, note 440,40 "Call the yard", text 40,300 "Deck plan". The colours are ink, red, orange, yellow, green, blue, purple and grey. size 640x360 sets the size; dragging the bar under the sketch changes its height.
For a signature, start with set mode=signature. The block is then a line to sign on directly, with name "Ada Lovelace" under it. Signing writes the strokes and signed 2026-11-21 14:05; Clear takes them away. In a read-only view a sketch is a picture.
To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-sketch on in preferences.self).
block ``` sketch ... ``` -> sketch verbatim~~~ selfscribe
block ``` sketch ... ``` -> sketch verbatim
~~~
```sketch
size 560x200
box 30,40 150x70 "Quay" blue
box 380,40 150x70 "Island" green
arrow 180,75 380,75
note 210,110 "Two sailings a day"
```
tikz plugin
#TikZ drawings as sharp SVG in the page, with no TeX installed.
A client plugin. Write TikZ commands (\draw, \node, \fill, each ending in ;), or paste a whole \begin{tikzpicture} or even a full LaTeX document: only the picture is drawn. Nodes, arrows, shapes, arcs, grids, plots, anchors, |- corners, bends, relative and polar coordinates, \tikzset styles and xcolor mixes such as blue!80!black work. What it does not draw (\foreach, \matrix) is named in a note under the picture. Black follows the text colour, so pictures read in dark themes; the Theme setting recolours a picture. For TeX itself (pgfplots, packages), use the latex plugin.
To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-tikz on in preferences.self). Settings: set plugin-tikz-theme auto|tex|dark|mocha|nord|solarized-light|solarized-dark|blueprint|mono (auto follows the page: black is the text colour, and dark colours are lightened on a dark page).
block ``` tikz ... ``` -> tikz verbatim~~~ selfscribe
block ``` tikz ... ``` -> tikz verbatim
~~~
```tikz
\filldraw[fill=blue!15, draw=blue!70!black] (0,0) -- (4,0) -- (1,3) -- cycle;
\node[below] at (2,0) {base};
```
highlight plugin
#Colours for code blocks in 30 languages, with a copy button and line numbers.
A client plugin that claims ordinary code blocks (pre > code) instead of a name of its own: the language after the fence (```ahk, ```python) picks the colours, which come from your theme. More words on the fence line: lines or nolines, {2,4-6} to mark lines, title=script.ahk. Unknown languages stay plain. Every block gets a Copy button.
Languages: AutoHotkey, JavaScript, TypeScript, Python, Rust, C, C++, C#, Go, Java, Kotlin, Swift, PHP, Ruby, Lua, shell, PowerShell, batch, SQL, JSON, YAML, TOML, INI, HTML and XML, CSS, Markdown, diff, regular expressions and Selfscribe.
Nothing to add to a Markdown document: its rules already have it. Switch the plugin on in Settings › Plugins (set plugin-highlight on in preferences.self). Settings: set plugin-highlight-numbers off|on|long (line numbers, and long for blocks of 12 lines or more) and set plugin-highlight-copy on|off.
~~~ selfscribe
use markdown
~~~
```ahk
#n::Run "notepad" ; Win+N
MsgBox "Hello, " A_UserName
```
#n::Run "notepad" ; Win+N
MsgBox "Hello, " A_UserName
callout plugin
#Notes, tips and warnings with an icon, in Selfscribe or GitHub style.
A client plugin. ::: tip Title … ::: sets a passage apart with an icon and a tint: note, info, tip, success, question, important, example, warning, caution, danger, bug or quote. ::: warning- Title starts folded. GitHub alerts (> [!NOTE] as a quote's first line) work too.
To use it, add these rules to the rules block and switch the plugin on in Settings › Plugins (set plugin-callout on in preferences.self).
block ::: _ ... ::: -> callout kind=_1
line > [!_] -> callout group blockquote~~~ selfscribe
use markdown
block ::: _ ... ::: -> callout kind=_1
line > [!_] -> callout group blockquote
~~~
::: tip Save time
Press **Ctrl+K** for the palette.
:::
Press Ctrl+K for the palette.
tab plugin
#Tabbed content: consecutive ::: tab Label blocks become one tab set.
A client plugin. One ::: tab Label block per tab, one after the other (the rule's group div keeps them together). Picking a label picks it in every tab set of the page. Arrow keys move between tabs. Without the plugin every tab shows.
To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-tab on in preferences.self).
block ::: tab _ ... ::: -> tab label=_1 group div~~~ selfscribe
use markdown
block ::: tab _ ... ::: -> tab label=_1 group div
~~~
::: tab Windows
Press **Win+R**.
:::
::: tab macOS
Press **Cmd+Space**.
:::
Press Win+R.
Press Cmd+Space.
spoiler plugin
#Hidden ||text|| revealed on click, and foldable details.
A client plugin for ||hidden text||: covered until the reader clicks it or presses Enter. Its catalog entry also brings ::: details Summary … :::, the details element with a summary, which needs no plugin.
To use it, add these rules to the rules block and switch the plugin on in Settings › Plugins (set plugin-spoiler on in preferences.self).
block ::: details _ ... ::: -> details summary=_1
inline ||_|| -> spoiler~~~ selfscribe
use markdown
block ::: details _ ... ::: -> details summary=_1
inline ||_|| -> spoiler
~~~
It was ||the gardener||.
::: details How do you know?
The rake.
:::
It was the gardener.
How do you know?
The rake.
toc plugin
#A contents list of the document's headings, linked to them, in every export.
A client plugin. An empty ```toc block lists the headings with links to them and follows them as you write. levels: 2-3 chooses the levels (without it, a document with one level-1 title lists 2 and 3), numbered: yes numbers the entries 1, 1.1, 1.2, and title: none leaves the word Contents out.
Web pages, PDF and EPUB keep the list and its links. Word gets a real contents field, which shows page numbers once Word updates it.
To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-toc on in preferences.self).
block ``` toc ... ``` -> toc verbatim~~~ selfscribe
use markdown
block ``` toc ... ``` -> toc verbatim
~~~
# Harbour guide
```toc
numbered: yes
```
## Getting there
The ferry leaves every hour.
## Where to eat
### By the quay
Harbour guide
Getting there
The ferry leaves every hour.
Where to eat
By the quay
secret plugin
#A block locked with a passphrase: ciphertext in the file, its text on screen once you unlock it.
A client plugin. Select text and choose Edit › Encrypt selection…, then type a passphrase twice: the text becomes a ```secret block whose lines are ciphertext, so the file stays plain text and any other editor shows gibberish. Locked, the block asks for the passphrase. Unlocked, it shows its content with the document's rules, and Edit changes it; Save encrypts it again, so the text and the undo history only ever hold ciphertext.
Lock forgets the passphrase, and so does the app after some idle minutes. The passphrase is never stored and cannot be recovered. Exports, find, the outline and the Write view never see the content. Edit › Decrypt block turns the block back into plain text, after asking. The first line names the format (selfscribe-secret v1 aes-256-gcm pbkdf2-sha256 600000), so any tool can open it; the spec shows how.
To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-secret on in preferences.self). Settings: set plugin-secret-idle 1|2|5|10|15|30|60 (minutes without typing or clicking before every block locks again).
block ``` secret ... ``` -> secret verbatim~~~ selfscribe
block ``` secret ... ``` -> secret verbatim
~~~
```secret
selfscribe-secret v1 aes-256-gcm pbkdf2-sha256 600000
salt: DRG2cFh4e3gugyBRzJ3gEg==
iv: VTh2Hs78Iz5vDxzv
Gy7NmVqY0976bd0uMOcRNgAxs04jBygnRGrcvEIj6wD4LR99Uhfojh6CkvIXc5KIj10WLJakKT9d
yRPSWW4jVCIyVMzlKlxlibL/oy8OmP7UaHIHTY7VXvGUBzUiJ+sR9WKCO0/urx4W/1qmKDcIvRXl
mUjRUuteYGDVcGVr9kZ5lt1hvshxgJwD4KEC0TaX6vh89TjsmcZaLsyGdxleLsk=
```
footnote plugin
#Numbered footnotes linked both ways: [^key] and [^key]: text.
A built-in plugin, already in the Markdown rules: [^key] is a reference and a line [^key]: text is the note. Notes are numbered in the order they are first referenced and drawn where you write them (usually under a Footnotes heading at the end). Unknown, unused and repeated keys get a warning.
The client half shows the note when you hover or focus a reference. Other rulebooks add inline [^_] -> footref and line [^_]: _ -> footnote key=_1.
Nothing to add to a Markdown document: its rules already have it. Switch the plugin on in Settings › Plugins (set plugin-footnote on in preferences.self).
citation plugin
#Citations [@key] from a .bib file or a records block.
A built-in plugin. [@key], [@key, p. 12] and [@a; see @b] cite works listed by a bibliography line (a BibTeX file or a data block of records). Author-year by default, numbered with cite-style. The client half previews the reference on hover.
To use it, add these rules to the rules block and switch the plugin on in Settings › Plugins (set plugin-citation on in preferences.self).
inline [@_] -> citation
line bibliography: _ -> bibliography
block ```data\ _ ... ``` -> data info=_1 verbatim~~~ selfscribe
use markdown
inline [@_] -> citation
line bibliography: _ -> bibliography
block ```data\ _ ... ``` -> data info=_1 verbatim
~~~
Programs are essays [@knuth1984, p. 99].
```data refs records as hidden
key: knuth1984
author: Donald E. Knuth
title: Literate Programming
year: 1984
```
bibliography: refs
Programs are essays (Knuth 1984, p. 99).
- Knuth, D. E. (1984). Literate Programming.
sources plugin
#Citations [@key] numbered in the order you make them, and a ```sources block of one reference a line that lists what is cited.
A client plugin. In a ``sources block, write each source on its own line: a key in square brackets, then the reference as it should read ([smith2021] Smith, J. (2021). Street trees. *Urban Ecology* 7.). An indented line carries the one above on. In the text, [@smith2021], [@smith2021, p. 4]and[@lee2019; see @smith2021]` cite them.
Citations are numbered [1], [2] in the order they are first made, and each links to its source. The list shows only what is cited, in that order, with links back to each citation. style author-year cites as (Smith 2021) and sorts the list by name, style superscript raises the numbers, and all lists the sources nobody cites too. A key the list does not have is marked in the text and named under the list.
To use it, add these rules to the rules block and switch the plugin on in Settings › Plugins (set plugin-sources on in preferences.self).
inline [@_] -> sources verbatim
block ``` sources ... ``` -> sources verbatim~~~ selfscribe
use markdown
inline [@_] -> sources verbatim
block ``` sources ... ``` -> sources verbatim
~~~
Shade cools a pavement by 15 °C [@smith2021, p. 4], more in a narrow street [@lee2019; @smith2021].
```sources
[smith2021] Smith, J. (2021). Street trees and summer heat. *Journal of Urban Ecology* 7(2).
[lee2019] Lee, K., & Park, S. (2019). Canyon streets at noon. *Urban Climate* 28.
```
Shade cools a pavement by 15 °C smith2021, p. 4, more in a narrow street lee2019; @smith2021.
glossary plugin
#Terms defined once, marked with their meaning wherever they are used.
A built-in plugin. *[HTML]: HyperText Markup Language defines a term and shows it in a glossary list. Every use of the word in the text (not in code or links) becomes an <abbr> with its meaning. abbreviation defines one without showing it.
To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-glossary on in preferences.self).
line *[_]: _ -> glossary key=_1 group dl~~~ selfscribe
use markdown
line *[_]: _ -> glossary key=_1 group dl
~~~
HTML pages are styled with CSS.
*[HTML]: HyperText Markup Language
*[CSS]: Cascading Style Sheets
HTML pages are styled with CSS.
- HTML
- HyperText Markup Language
- CSS
- Cascading Style Sheets
lint plugin
#A style check for the document it sits in: words to watch, -ing endings, long sentences, passive voice and repeated words, marked in the page with counts.
A client plugin. Each line is a check: words AND OR NOT (any case), exact SHALL MUST (as written), ending ing, starting un, adverbs, long 30, passive and repeats. as LABEL names it. A last word underline, highlight or colour says how hits are drawn. An empty block runs a sensible set. Click a count to go through the hits. The box shows or hides a check. Only the rendered page is marked: the text never changes.
To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-lint on in preferences.self).
block ``` lint ... ``` -> lint verbatim~~~ selfscribe
block ``` lint ... ``` -> lint verbatim
~~~
```lint
```
If the tide is turning AND the wind is rising, we were told that sailing was really quite dangerous.
If the tide is turning AND the wind is rising, we were told that sailing was really quite dangerous.
emoji plugin
#An emoji from its short name, like :tada:.
A built-in plugin. The content is a short name such as smile, heart, +1, rocket, tada or warning. The result is the emoji from a bundled table of about 150 common names. An unknown name leaves the source text as it was. The editor's emoji picker inserts emoji by name.
To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-emoji on in preferences.self).
inline :_: -> emoji~~~ selfscribe
inline :_: -> emoji
~~~
Shipped :rocket: :tada: Thanks :+1: Not a name: :zzzz:
Shipped 🚀 🎉 Thanks 👍 Not a name: :zzzz:
music plugin
#Sheet music from ABC notation.
A client plugin that engraves ABC notation with abcjs, loaded only when used.
To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-music on in preferences.self).
block ``` abc ... ``` -> music verbatim~~~ selfscribe
block ``` abc ... ``` -> music verbatim
~~~
```abc
X:1
T:Scale
M:4/4
K:C
CDEF GABc|
```
chess plugin
#A chess board for a FEN position or a PGN game, with its moves.
A client plugin. A FEN line shows a position. PGN (headers and moves) shows the game with a move list, buttons and arrow keys to replay it. [Orientation "black"] turns the board.
To use it, add these rules to the rules block and switch the plugin on in Settings › Plugins (set plugin-chess on in preferences.self). Settings: set plugin-chess-board theme|green|brown|blue and set plugin-chess-coordinates on|off.
block ``` chess ... ``` -> chess verbatim
block ``` pgn ... ``` -> chess verbatim~~~ selfscribe
block ``` chess ... ``` -> chess verbatim
block ``` pgn ... ``` -> chess verbatim
~~~
```chess
1. e4 e5 2. Nf3 Nc6 3. Bb5 a6
```
cards plugin
#Playing cards from text: hands, a board and notes, with poker hands named and blackjack totals.
A client plugin. A card is a rank and a suit (As, 10h, Q♣). ?? is a card face down. hand NAME: lines give the players, board: the community cards with | between the flop, the turn and the river, title: and pot: say what the hand is. Other lines are notes.
With a board, step through the streets with the buttons or the arrow keys. Each hand is named and the winner marked at the river. game: poker scores five-card hands, game: blackjack counts totals.
To use it, add these rules to the rules block and switch the plugin on in Settings › Plugins (set plugin-cards on in preferences.self). Settings: set plugin-cards-table felt|theme and set plugin-cards-colours two|four.
block ``` cards ... ``` -> cards verbatim
block ``` poker ... ``` -> cards verbatim~~~ selfscribe
block ``` cards ... ``` -> cards verbatim
block ``` poker ... ``` -> cards verbatim
~~~
```cards
board: Ah Kd 7s | 7c | Kh
hand Ana: As Ad
hand Bo: Ks Kc
```
flashcards plugin
#A deck to study with spaced repetition: question :: answer per line, the cards due today, and the next date written back.
A client plugin. One card per line: the question, :: (or |) and the answer. A # line names the deck, and its head says how many cards are due today and how many you have learned. Click a card or press Space to flip it, then grade it Again, Hard, Good or Easy (or press 1 to 4).
The grade writes the card's next date at the end of its line, as one undo step: Portugal :: Lisbon ~ 2026-10-04 6d is due on 4 October, six days after its last review, and a third number (230%) is the card's ease when it is not the usual 250%. The spacing is SM-2, as in Anki. A card without ~ is new, and ten new cards join a day; new: 5 in the block changes that for one deck. You can edit or delete the ~ part by hand.
Practise all goes through every card without writing anything, with the missed ones again at the end of a round (the arrow keys work too). In a read-only view the deck is that practice deck.
To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-flashcards on in preferences.self). Settings: set plugin-flashcards-new 0|5|10|20|30|50 (how many new cards join a day's review; new: in the block wins).
block ``` flashcards ... ``` -> flashcards verbatim~~~ selfscribe
block ``` flashcards ... ``` -> flashcards verbatim
~~~
```flashcards
# European capitals
Portugal :: Lisbon ~ 2026-10-04 6d
Norway :: Oslo
```
timer plugin
#Countdowns written as text: Focus 25m, Break 5m, repeat 4, with a chime between phases. An empty block is a pomodoro.
A client plugin (fences timer and pomodoro). Each line is a phase, a name and a duration in either order (25m, 90s, 1h30m, 1:30). repeat N repeats the phases above it. Lines after it, or starting with then, come once at the end. # Title names it and sound off keeps it quiet. Start, Pause, Skip and Reset. Space starts a focused timer. Nothing is written back.
To use it, add these rules to the rules block and switch the plugin on in Settings › Plugins (set plugin-timer on in preferences.self).
block ``` timer ... ``` -> timer verbatim
block ``` pomodoro ... ``` -> timer verbatim~~~ selfscribe
block ``` timer ... ``` -> timer verbatim
block ``` pomodoro ... ``` -> timer verbatim
~~~
```timer
# Morning
Kettle 4m
Stretch 1:30
repeat 2
then Tea 3m
```
dice plugin
#A die inside a sentence: [roll 2d6] rolls when you click it.
A client plugin. Dice between [roll and ], in tabletop notation: d20, 3d6+2, d%, 4d6kh3 (keep the highest three), 2d20kl1 (the lowest), or several added up (1d8+1d6+3). Words after the dice name the roll ([roll d20 initiative]). Click it, or tab to it and press Enter, to roll again; hovering shows each die. The result is only on your screen, so the text never changes. Without the plugin the dice stay as written.
To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-dice on in preferences.self).
inline [roll _] -> dice verbatim~~~ selfscribe
inline [roll _] -> dice verbatim
~~~
The door is stuck. Roll [roll 1d6] and on 4 or more it opens.
The door is stuck. Roll 1d6 and on 4 or more it opens.
pick plugin
#A list of options and a Pick one button that shuffles and lands on one at random.
A client plugin. List the options one per line, each starting with -, under an optional question or # Title. Pick one shuffles through them for a moment and lands on one; with reduced motion the choice shows at once. The pick is only on your screen, so the text never changes.
To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-pick on in preferences.self).
block ``` pick ... ``` -> pick verbatim~~~ selfscribe
block ``` pick ... ``` -> pick verbatim
~~~
```pick
What's for dinner?
- Pasta
- Fish and chips
- Curry
```
grid plugin
#Other documents side by side or in a grid, each in its own style: a dashboard, a reading desk, a split view.
A client plugin, for documents in a folder or workbook. Draw the grid with file names: each line is a row and | separates its cells, so draft.self | notes.self puts two documents side by side. The same name in neighbouring cells spans them (it must make a rectangle). . is an empty cell. notes.self#Todo shows only the section under that heading.
Lines before the grid set it up: columns 2fr 1fr (plain numbers are shares, and columns 3 is three equal columns), rows auto 1fr, gap 24 (or narrow, wide, none), height 80vh (or screen, and the cells then scroll), look cards|plain|split and title Some words. // starts a comment. Each cell shows its document's title and an Open button and keeps that document's rules and colours. On a narrow screen the cells stack.
To use it, add these rules to the rules block and switch the plugin on in Settings › Plugins (set plugin-layout on in preferences.self).
block ``` grid ... ``` -> grid verbatim
block ``` split ... ``` -> grid verbatim~~~ selfscribe
block ``` grid ... ``` -> grid verbatim
block ``` split ... ``` -> grid verbatim
~~~
```grid
title Monday
columns 2fr 1fr
plan.self | todo.self
plan.self | budget.self#Totals
```
style plugin
#CSS of your own for one document, in a ```style block; selfscribe.css does the same for a whole folder or workbook.
A client plugin. The CSS in a ``style block styles only the document it is in: h1 { color: teal }colours its headings;.self-doc { --doc-link: teal } sets a page colour that every built-in style uses (--doc-bg, --doc-fg, --doc-heading, --doc-link, --doc-quote-bar, --doc-code-bg, --doc-mark-bg, --doc-font, --doc-font-heading`).
As in a rule's { } block, what could load files or escape the page (url(), @import, @font-face, backslash escapes) is left out, and the block's label says how much. The label shows only while writing. Exports keep the style. For every document of a folder or workbook, write the CSS in selfscribe.css at its root. View › Custom CSS… builds either, with looks to start from, colour pickers, touches and a reference of properties in plain words.
To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-style on in preferences.self).
block ``` style ... ``` -> style verbatim~~~ selfscribe
use markdown
block ``` style ... ``` -> style verbatim
~~~
# A teal page
With a [link](https://example.com).
```style
.self-doc { --doc-heading: #0f766e; --doc-link: #0f766e }
```
media plugin
#Audio and video players for files of the folder and https links.
A client plugin. media: clips/demo.mp4 | Caption (or audio: / video:) plays a file of the folder or workbook the document is in, read on your machine, or an https: link that loads only when you press play. See Pictures, audio and video in folders.
To use it, add these rules to the rules block and switch the plugin on in Settings › Plugins (set plugin-media on in preferences.self).
line media: _ -> media
line audio: _ -> media kind=audio
line video: _ -> media kind=video~~~ selfscribe
line media: _ -> media
line audio: _ -> media kind=audio
line video: _ -> media kind=video
~~~
video: media/demo.mp4 | The editor in two minutes
qr plugin
#A QR code for a link or any text.
A client plugin that draws a QR code as SVG from the rest of the line.
To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-qr on in preferences.self). Settings: set plugin-qr-size PX (80 to 480) and set plugin-qr-level L|M|Q|H (error correction).
line qr: _ -> qr~~~ selfscribe
line qr: _ -> qr
~~~
qr: https://example.com
embed plugin
#Videos, maps and pens from https links. Nothing loads until you click.
A client plugin that shows a web page in a sandboxed frame. Only https: links are accepted. It first shows a card with the site and a Load button: nothing is fetched until you click, unless the site is on your allow list. Known sites (YouTube through youtube-nocookie.com, Vimeo, OpenStreetMap, CodePen, Figma, Loom) are rewritten to their embed address.
The frame runs with its own origin, never the editor's, and cannot navigate the editor. A rule that makes a plain iframe is refused. embed is the supported way.
To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-embed on in preferences.self). Settings: set plugin-embed-allow HOST … (host names that load without a click) and set plugin-embed-height PX.
line embed: _ -> embed~~~ selfscribe
line embed: _ -> embed
~~~
embed: https://www.openstreetmap.org/#map=13/51.5074/-0.1278
html plugin
#An HTML fragment in a sandboxed frame: no network, no scripts unless allowed.
A client plugin that renders an HTML fragment inside a sandboxed frame with a unique origin and a strict content security policy: nothing can be fetched, and document scripts and on… handlers do not run.
set plugin-html-scripts on also allows inline scripts. They still run in an isolated origin with no network.
To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-html on in preferences.self). Settings: set plugin-html-scripts on|off.
block <html> ... </html> -> html verbatim~~~ selfscribe
block <html> ... </html> -> html verbatim
~~~
<html>
<div style="padding:12px;border-radius:8px;background:#eef"><b>Open today</b> 8:00 to 18:00 · closed on Sundays</div>
</html>
latex plugin
#Real LaTeX (TikZ, tables, theorems) through your TeX installation.
A client plugin that asks the host to compile LaTeX. The desktop app runs your local TeX installation in a fresh temporary folder, without shell escape, unable to write outside its folder or reach the network, with a 30 second limit. The result is shown as a picture. Results are cached.
Where there is no TeX (the web, or no installation), a body that is only maths is typeset with KaTeX instead, and anything else shows its source with a note. The body can be a fragment or a whole document with \documentclass.
To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-latex on in preferences.self). Settings: set plugin-latex-engine lualatex|pdflatex|xelatex and set plugin-latex-preamble TEXT.
block ``` latex ... ``` -> latex verbatim~~~ selfscribe
block ``` latex ... ``` -> latex verbatim
~~~
```latex
\[ \sum_{k=1}^{n} k = \frac{n(n+1)}{2} \]
```
Data and views
#CSV, JSON and records as tables, cards, boards and forms.
Data and views concept
#Records in plain text (CSV, TSV, JSON, records or a file), shown as tables, cards, boards, calendars and forms.
Write use data in the rules block. A ```data NAME block holds records; its first line names the columns and may type them (due:date, status:choice(todo|doing|done)). A view: line shows a source another way, with options such as as board, sort, filter, columns, page, search and totals.
Every renderer shows a real table or cards. In the editor views are interactive: search, sort, filter chips, editing cells, dragging cards, adding records with a form. Every change goes back into the text as one undo step, so the data stays a plain, human-readable file.
- Formats: CSV, TSV, JSON, JSON Lines, records, and folder files with from.
- Types: the typed header.
- Views: view:, as, filter, button.
~~~ selfscribe
use data
~~~
```data tasks as board
title, status:choice(todo|doing|done), due:date
Write the spec, doing, 2026-09-20
Review fixtures, todo, 2026-09-24
```
view: tasks as table sort due
todo 1
Review fixtures
- due
doing 1
Write the spec
- due
done 0
| title | status | due |
|---|---|---|
| Write the spec | doing | |
| Review fixtures | todo |
view: data
#A line that shows a data source as a table, cards, a board, a list, a calendar or a form.
view: SOURCE OPTIONS names a data block (or a data file path) and says how to show it. Options can come in any order, each at most once, except when and button, which can come again.
In the editor a view is interactive, and every change you make in it is written back into the text.
~~~ selfscribe
use data
~~~
```data tasks as hidden
title, status:choice(todo|doing|done), owner, hours:number, due:date, tags:list
Write the spec, doing, Ada, 5, 2026-09-20, "docs, engine"
Review fixtures, todo, Bo, 3, 2026-09-24, tests
Ship v1.3, todo, Ada, 8, 2026-10-01, release
Draft notes, done, Cy, 1.5, 2026-09-12, docs
```
view: tasks as cards sort due
Draft notes
- status
- done
- owner
- Cy
- hours
- 1.5
- due
- tags
- docs
Write the spec
- status
- doing
- owner
- Ada
- hours
- 5
- due
- tags
- docs engine
Review fixtures
- status
- todo
- owner
- Bo
- hours
- 3
- due
- tags
- tests
Ship v1.3
- status
- todo
- owner
- Ada
- hours
- 8
- due
- tags
- release
from data
#A data block that reads a file of the folder (.csv .tsv .json .jsonl .rec).
```data contacts from ./contacts.csv reads the file through the host, like include: relative to the document, never outside the project, never from the network. The block's body may hold one header line that gives the file's columns types.
A view can also name a file directly: view: ./contacts.csv as table. Edits in the view are written to the file.
~~~ selfscribe
use data
~~~
```data tasks as hidden
title, status:choice(todo|doing|done), owner, hours:number, due:date, tags:list
Write the spec, doing, Ada, 5, 2026-09-20, "docs, engine"
Review fixtures, todo, Bo, 3, 2026-09-24, tests
Ship v1.3, todo, Ada, 8, 2026-10-01, release
Draft notes, done, Cy, 1.5, 2026-09-12, docs
```
view: tasks as list columns title, owner
- Write the spec
- Review fixtures
- Ship v1.3
- Draft notes
csv (format) data
#Comma-separated records: the default format of a data block.
The first line is the header. Each later line is a record. Quote a field that holds a comma: "a, b" ("" is a quote).
~~~ selfscribe
use data
~~~
```data people csv
name, born:date
Ada Lovelace, 1815-12-10
Alan Turing, 1912-06-23
```
| name | born |
|---|---|
| Ada Lovelace | |
| Alan Turing |
tsv (format) data
#Tab-separated records: pasted from a spreadsheet.
Like CSV with tabs between fields. A body whose first line has a tab is read as TSV even without the word.
~~~ selfscribe
use data
~~~
```data people tsv
name born:date
Grace Hopper 1906-12-09
```
| name | born |
|---|---|
| Grace Hopper |
json (format) data
#A JSON array of objects as records.
Keys become columns. Numbers and true/false keep their type. Arrays become lists. An optional first line starting with % is a typed header.
~~~ selfscribe
use data
~~~
```data people json
[
{"name": "Ada", "langs": ["en", "fr"]},
{"name": "Linus", "langs": ["fi"]}
]
```
| name | langs |
|---|---|
| Ada | en fr |
| Linus | fi |
jsonl (format) data
#JSON Lines: one object per line, easy to append to.
Each non-blank line is one JSON object. A bad line is reported and skipped.
~~~ selfscribe
use data
~~~
```data log jsonl
{"at": "2026-09-01T10:00Z", "event": "start"}
{"at": "2026-09-01T10:05Z", "event": "stop"}
```
| at | event |
|---|---|
| start | |
| stop |
records (format) data
#field: value lines, one blank line between records, in the style of GNU recutils.
The most readable format for long fields. # lines are comments. A first line starting with % gives types: % title, rating:number.
~~~ selfscribe
use data
~~~
```data books records as cards
% title, author, rating:number
title: The Dispossessed
author: Ursula K. Le Guin
rating: 5
title: Middlemarch
author: George Eliot
rating: 4
```
The Dispossessed
- author
- Ursula K. Le Guin
- rating
- 5
Middlemarch
- author
- George Eliot
- rating
- 4
Typed header data
#The first line names the columns and may give each a type: due:date.
NAME:TYPE fields. A column without a type is inferred (number, date or yes/no when every value is one, else text). Bad cells get a warning on the cell, and show as written.
~~~ selfscribe
use data
~~~
```data tasks as hidden
title, status:choice(todo|doing|done), owner, hours:number, due:date, tags:list
Write the spec, doing, Ada, 5, 2026-09-20, "docs, engine"
Review fixtures, todo, Bo, 3, 2026-09-24, tests
Ship v1.3, todo, Ada, 8, 2026-10-01, release
Draft notes, done, Cy, 1.5, 2026-09-12, docs
```
view: tasks columns title, hours, due
| title | hours | due |
|---|---|---|
| Write the spec | 5 | |
| Review fixtures | 3 | |
| Ship v1.3 | 8 | |
| Draft notes | 1.5 |
text (type) data
#Any text, sorted ignoring case.
The type of a column with no other type.
~~~ selfscribe
use data
~~~
```data tasks as hidden
title, status:choice(todo|doing|done), owner, hours:number, due:date, tags:list
Write the spec, doing, Ada, 5, 2026-09-20, "docs, engine"
Review fixtures, todo, Bo, 3, 2026-09-24, tests
Ship v1.3, todo, Ada, 8, 2026-10-01, release
Draft notes, done, Cy, 1.5, 2026-09-12, docs
```
view: tasks columns title, owner sort owner
| title | owner |
|---|---|
| Write the spec | Ada |
| Ship v1.3 | Ada |
| Review fixtures | Bo |
| Draft notes | Cy |
number (type) data
#Exact decimal numbers such as 12, -3.50 or 1e3. Totals add up exactly.
At most 15 digits before and after the point. sum keeps the most decimals of its cells.
~~~ selfscribe
use data
~~~
```data tasks as hidden
title, status:choice(todo|doing|done), owner, hours:number, due:date, tags:list
Write the spec, doing, Ada, 5, 2026-09-20, "docs, engine"
Review fixtures, todo, Bo, 3, 2026-09-24, tests
Ship v1.3, todo, Ada, 8, 2026-10-01, release
Draft notes, done, Cy, 1.5, 2026-09-12, docs
```
view: tasks columns title, hours sort hours desc sum hours
| title | hours |
|---|---|
| Ship v1.3 | 8 |
| Write the spec | 5 |
| Review fixtures | 3 |
| Draft notes | 1.5 |
| Total | 17.5 |
date (type) data
#ISO 8601 dates and timestamps: 2026-09-20 or 2026-09-20T15:30+02:00.
Dates sort by the moment they stand for. A calendar puts a record on the day written in the cell. Filters compare dates: due < 2026-10-01.
~~~ selfscribe
use data
~~~
```data tasks as hidden
title, status:choice(todo|doing|done), owner, hours:number, due:date, tags:list
Write the spec, doing, Ada, 5, 2026-09-20, "docs, engine"
Review fixtures, todo, Bo, 3, 2026-09-24, tests
Ship v1.3, todo, Ada, 8, 2026-10-01, release
Draft notes, done, Cy, 1.5, 2026-09-12, docs
```
view: tasks columns title, due sort due
| title | due |
|---|---|
| Draft notes | |
| Write the spec | |
| Review fixtures | |
| Ship v1.3 |
bool (type) data
#Yes or no: yes no true false y n x 1 0.
Shown as a checkbox. In the editor a click toggles it and the text keeps the spelling it used.
~~~ selfscribe
use data
~~~
```data shop
item, bought:bool
Milk, yes
Bread, no
```
| item | bought |
|---|---|
| Milk | |
| Bread |
choice(a|b) (type) data
#One of a fixed list of values, in that order: status:choice(todo|doing|done).
Choices sort in the order written, and a board shows one column per choice.
choice(from clients.name) takes its values from another table instead: the name column of the data block clients (from clients alone uses its first column, and a file works too: from data/clients.csv name). Add a client there and it becomes a choice here, like a relation in a database.
~~~ selfscribe
use data
~~~
```data tasks as hidden
title, status:choice(todo|doing|done), owner, hours:number, due:date, tags:list
Write the spec, doing, Ada, 5, 2026-09-20, "docs, engine"
Review fixtures, todo, Bo, 3, 2026-09-24, tests
Ship v1.3, todo, Ada, 8, 2026-10-01, release
Draft notes, done, Cy, 1.5, 2026-09-12, docs
```
view: tasks as board
todo 2
Review fixtures
- owner
- Bo
- hours
- 3
- due
- tags
- tests
Ship v1.3
- owner
- Ada
- hours
- 8
- due
- tags
- release
doing 1
Write the spec
- owner
- Ada
- hours
- 5
- due
- tags
- docs engine
done 1
Draft notes
- owner
- Cy
- hours
- 1.5
- due
- tags
- docs
rating (type) data
#Stars from 0 to 5 (rating), or to another maximum (rating(10)). stars works too.
A cell holds a whole number, or the stars written out (★★★). Every renderer shows stars. In the editor a click on a star rates, a click on the last lit star takes one away, and the digit keys rate a focused cell. Ratings sort and filter as numbers: filter stars >= 4.
~~~ selfscribe
use data
~~~
```data books as table sort stars desc
title, stars:rating
Piranesi, 5
Middlemarch, 3
```
| title | stars |
|---|---|
| Piranesi | |
| Middlemarch |
toggle (type) data
#Yes or no, drawn as a switch instead of a checkbox.
Everything of bool (the same spellings, the same filters), shown as an on/off switch. A click flips it and the text keeps its spelling.
~~~ selfscribe
use data
~~~
```data lights
room, on:toggle
Kitchen, yes
Hall, no
```
| room | on |
|---|---|
| Kitchen | |
| Hall |
suggest(a|b) (type) data
#Free text with suggestions: the values listed and the ones the column already has.
Unlike choice, any value goes in. The editor offers a searchable list as you type. suggest alone suggests the column's own values, so a list of places or people grows as you use it. A choice with more than twelve values is edited the same way but stays strict.
suggest(from people.name) suggests the values of a column of another table as well (D111).
~~~ selfscribe
use data
~~~
```data trips
place, country:suggest(Portugal|Spain|Italy)
Porto, Portugal
Lyon, France
```
| place | country |
|---|---|
| Porto | Portugal |
| Lyon | France |
list data
#A list type (items separated by commas), and a view kind: one line per record.
As a type, tags:list shows each item as a chip. Quote the cell in CSV. As a view, as list shows the first column and the others after it.
~~~ selfscribe
use data
~~~
```data tasks as hidden
title, status:choice(todo|doing|done), owner, hours:number, due:date, tags:list
Write the spec, doing, Ada, 5, 2026-09-20, "docs, engine"
Review fixtures, todo, Bo, 3, 2026-09-24, tests
Ship v1.3, todo, Ada, 8, 2026-10-01, release
Draft notes, done, Cy, 1.5, 2026-09-12, docs
```
view: tasks as list columns title, tags
- Write the spec
- Review fixtures
- Ship v1.3
- Draft notes
url (type) data
#A link: https:, mailto:, tel: or a relative path (no javascript:).
Shown as a link. Unsafe addresses are flagged and shown as text.
~~~ selfscribe
use data
~~~
```data links
name, site:url
Selfscribe, https://example.com
```
| name | site |
|---|---|
| Selfscribe | https://example.com |
as data
#How a view shows its records: table, cards, board, list, calendar, gantt, chart, form or hidden.
A data block without as shows itself as a table.
~~~ selfscribe
use data
~~~
```data tasks as hidden
title, status:choice(todo|doing|done), owner, hours:number, due:date, tags:list
Write the spec, doing, Ada, 5, 2026-09-20, "docs, engine"
Review fixtures, todo, Bo, 3, 2026-09-24, tests
Ship v1.3, todo, Ada, 8, 2026-10-01, release
Draft notes, done, Cy, 1.5, 2026-09-12, docs
```
view: tasks as table
| title | status | owner | hours | due | tags |
|---|---|---|---|---|---|
| Write the spec | doing | Ada | 5 | docs engine | |
| Review fixtures | todo | Bo | 3 | tests | |
| Ship v1.3 | todo | Ada | 8 | release | |
| Draft notes | done | Cy | 1.5 | docs |
table (view) data
#Rows and typed columns. In the editor sortable, searchable and editable, with virtual scrolling for large sources.
Click a cell (or press Enter on it) to edit it. Arrow keys move between cells.
~~~ selfscribe
use data
~~~
```data tasks as hidden
title, status:choice(todo|doing|done), owner, hours:number, due:date, tags:list
Write the spec, doing, Ada, 5, 2026-09-20, "docs, engine"
Review fixtures, todo, Bo, 3, 2026-09-24, tests
Ship v1.3, todo, Ada, 8, 2026-10-01, release
Draft notes, done, Cy, 1.5, 2026-09-12, docs
```
view: tasks as table sort due
| title | status | owner | hours | due | tags |
|---|---|---|---|---|---|
| Draft notes | done | Cy | 1.5 | docs | |
| Write the spec | doing | Ada | 5 | docs engine | |
| Review fixtures | todo | Bo | 3 | tests | |
| Ship v1.3 | todo | Ada | 8 | release |
cards (view) data
#A gallery of cards, the first column as the title (gallery works too).
Each card shows the other columns that have a value.
~~~ selfscribe
use data
~~~
```data tasks as hidden
title, status:choice(todo|doing|done), owner, hours:number, due:date, tags:list
Write the spec, doing, Ada, 5, 2026-09-20, "docs, engine"
Review fixtures, todo, Bo, 3, 2026-09-24, tests
Ship v1.3, todo, Ada, 8, 2026-10-01, release
Draft notes, done, Cy, 1.5, 2026-09-12, docs
```
view: tasks as cards
Write the spec
- status
- doing
- owner
- Ada
- hours
- 5
- due
- tags
- docs engine
Review fixtures
- status
- todo
- owner
- Bo
- hours
- 3
- due
- tags
- tests
Ship v1.3
- status
- todo
- owner
- Ada
- hours
- 8
- due
- tags
- release
Draft notes
- status
- done
- owner
- Cy
- hours
- 1.5
- due
- tags
- docs
board (view) data
#A kanban board grouped by a column (by status, or the first choice column).
Drag a card with the mouse, or press and hold it with a finger, then drop it in another column: the record's cell changes in the text. A drop between two cards keeps that order. Alt+Left and Alt+Right move a focused card to the next column, Alt+Up and Alt+Down move it up or down.
The order is kept in a number column called order, rank or position when the table has one. Without one, the record's line moves in the text.
group owner puts the cards in lanes, one per owner. limit 3 marks a column that holds more than three cards, tone risk colours each card by its risk. The arrow in a column's head folds it shut.
Where a flow follows the column, the columns a card may not go to are dimmed while you drag it. Dropping it there says why.
~~~ selfscribe
use data
~~~
```data tasks as hidden
title, status:choice(todo|doing|done), owner, hours:number, due:date, tags:list
Write the spec, doing, Ada, 5, 2026-09-20, "docs, engine"
Review fixtures, todo, Bo, 3, 2026-09-24, tests
Ship v1.3, todo, Ada, 8, 2026-10-01, release
Draft notes, done, Cy, 1.5, 2026-09-12, docs
```
view: tasks as board by status group owner limit doing 2
todo 2
Review fixtures
- owner
- Bo
- hours
- 3
- due
- tags
- tests
Ship v1.3
- owner
- Ada
- hours
- 8
- due
- tags
- release
doing 1
Write the spec
- owner
- Ada
- hours
- 5
- due
- tags
- docs engine
done 1
Draft notes
- owner
- Cy
- hours
- 1.5
- due
- tags
- docs
limit (view option) data
#How many cards a board's column should hold: limit 3 for every column, limit doing 2, review 1 for some.
The column's head shows its count against its limit, 3/2, and turns red when it holds more. Cards still go in: the limit is a warning, not a lock.
~~~ selfscribe
use data
~~~
```data tasks as hidden
title, status:choice(todo|doing|done), owner, hours:number, due:date, tags:list
Write the spec, doing, Ada, 5, 2026-09-20, "docs, engine"
Review fixtures, todo, Bo, 3, 2026-09-24, tests
Ship v1.3, todo, Ada, 8, 2026-10-01, release
Draft notes, done, Cy, 1.5, 2026-09-12, docs
```
view: tasks as board by status limit 3, doing 1
todo 2
Review fixtures
- owner
- Bo
- hours
- 3
- due
- tags
- tests
Ship v1.3
- owner
- Ada
- hours
- 8
- due
- tags
- release
doing 1
Write the spec
- owner
- Ada
- hours
- 5
- due
- tags
- docs engine
done 1
Draft notes
- owner
- Cy
- hours
- 1.5
- due
- tags
- docs
tone (view option) data
#The column that colours records in every view: tone status. Without it, the status column does.
A value has one colour everywhere: a card on a board, an event on a calendar, a bar on a timeline, a step of a flow and a pin on a map. Words such as done, blocked or review get their usual colour (green, red, yellow). Other values take a colour each, in the order of the column's choices.
Each view shows the colours in a legend under it. Press a value there to show only those records, and press it again to show them all.
~~~ selfscribe
use data
~~~
```data tasks as hidden
title, status:choice(todo|doing|done), owner, hours:number, due:date, tags:list
Write the spec, doing, Ada, 5, 2026-09-20, "docs, engine"
Review fixtures, todo, Bo, 3, 2026-09-24, tests
Ship v1.3, todo, Ada, 8, 2026-10-01, release
Draft notes, done, Cy, 1.5, 2026-09-12, docs
```
view: tasks as board by owner tone status
Ada 2
Write the spec
- status
- doing
- hours
- 5
- due
- tags
- docs engine
Ship v1.3
- status
- todo
- hours
- 8
- due
- tags
- release
Bo 1
Review fixtures
- status
- todo
- hours
- 3
- due
- tags
- tests
Cy 1
Draft notes
- status
- done
- hours
- 1.5
- due
- tags
- docs
when (view rule) data
#Colours, bolds, fades or marks the records that pass a test: when due < today and status is not done -> red mark.
Write the test as a filter, with is, is not, is empty and is not empty as well. After -> say what it does: a colour (red, green, #e5484d), bold, faded, strike or mark. Add in total to change only that cell of a table. More rules follow, each after a comma: when … -> red, when … -> bold.
Rules apply in every view of the records: a row, a card, an event, a bar, a step and a pin. A column of a linked table is read through its link: when after.end > due -> red marks a task whose phase ends after it is due. Rules in the view's buttons adds and takes out rules for you. A rule that cannot be read is said under the view.
~~~ selfscribe
use data
~~~
```data tasks as hidden
title, status:choice(todo|doing|done), owner, hours:number, due:date, tags:list
Write the spec, doing, Ada, 5, 2026-09-20, "docs, engine"
Review fixtures, todo, Bo, 3, 2026-09-24, tests
Ship v1.3, todo, Ada, 8, 2026-10-01, release
Draft notes, done, Cy, 1.5, 2026-09-12, docs
```
view: tasks as table when due < 2026-09-22 and status is not done -> red mark, when hours > 6 -> bold in hours
| title | status | owner | hours | due | tags |
|---|---|---|---|---|---|
| !Write the spec | doing | Ada | 5 | docs engine | |
| Review fixtures | todo | Bo | 3 | tests | |
| Ship v1.3 | todo | Ada | 8 | release | |
| Draft notes | done | Cy | 1.5 | docs |
button (view option) data
#Puts a button in each record of a view that runs an action for it: button Done runs finish.
Write a label, runs, and the name of an action of the folder (actions/finish.self). A table has its buttons in a column at the end, and cards, a board and a list at the foot of each card or line. A calendar, a timeline, a chart and a form draw none.
Pressing one runs the action with that record: each cell under its column's name ({title}, {owner}; a space in a name is written -), and {record} for every cell. The first time, the app shows what the action will do and asks you to allow it. More buttons follow the first, each after a comma. Quote a label that holds a word of the view: button "Sort it" runs tidy.
A static page and other programs show the records without the buttons.
~~~ selfscribe
use data
~~~
```data tasks as hidden
title, status:choice(todo|doing|done), owner, hours:number, due:date, tags:list
Write the spec, doing, Ada, 5, 2026-09-20, "docs, engine"
Review fixtures, todo, Bo, 3, 2026-09-24, tests
Ship v1.3, todo, Ada, 8, 2026-10-01, release
Draft notes, done, Cy, 1.5, 2026-09-12, docs
```
view: tasks as table columns title, status button Done runs finish, button Later runs snooze
| title | status |
|---|---|
| Write the spec | doing |
| Review fixtures | todo |
| Ship v1.3 | todo |
| Draft notes | done |
flow (view) data
#Records as the steps of a diagram, joined by arrows: as flow, as flow down or as flow across.
The arrows come from a column of names, after unless link names another. link manager draws a staff list as an org chart, and with as flow down each manager sits centred over the people who report to them. link legs draws one arrow per record of the table legs, from its from to its to, with its label on the arrow.
group puts the steps in lanes and by colours them, the first choice column when there is no by. columns name, role shows the role under each name. A name that is in another table becomes a grey step of its own. A name found nowhere is listed under the diagram.
Click a step to pick its record in every view, and double-click to open it. Join writes an arrow: click the first step, then the second.
~~~ selfscribe
use data
~~~
```data people
name, manager, role
Ada, , Owner
Bo, Ada, Chef
Cy, Ada, Host
Di, Bo, Cook
```
view: people as flow down link manager columns name, role
| name | manager | role |
|---|---|---|
| Ada | Owner | |
| Bo | Ada | Chef |
| Cy | Ada | Host |
| Di | Bo | Cook |
| name | role |
|---|---|
| Ada | Owner |
| Bo | Chef |
| Cy | Host |
| Di | Cook |
link (view option) data
#Where a diagram's arrows come from: a column of names (link manager) or a table of links (link legs).
A table of links has a from and a to column (else its first two columns) and may have a label. Its names are the titles of the records the diagram shows.
~~~ selfscribe
use data
~~~
```data stops
name
Harbour
Market
Old town
```
```data legs as hidden
from, to, label
Harbour, Market, ferry
Market, Old town, tram
```
view: stops as flow across link legs
| name |
|---|
| Harbour |
| Market |
| Old town |
| name |
|---|
| Harbour |
| Market |
| Old town |
calendar (view) data
#Records on a calendar by a date column (by due, or the first date column): a month, a week, a day or an agenda.
to end gives each record an end: a record over several days is one bar. A date with a time (2026-09-14T10:00) sits in the hours of the week and the day.
Drag a record to another day or time, or drag its end to change how long it is. Alt and the arrow keys move a picked record. Click an empty day, or an hour, to add a record there. Each change is one step to undo. The week starts on the first day of your week. On a phone the calendar opens as an agenda.
Static pages show every month that has records.
~~~ selfscribe
use data
~~~
```data tasks as hidden
title, status:choice(todo|doing|done), owner, hours:number, due:date, tags:list
Write the spec, doing, Ada, 5, 2026-09-20, "docs, engine"
Review fixtures, todo, Bo, 3, 2026-09-24, tests
Ship v1.3, todo, Ada, 8, 2026-10-01, release
Draft notes, done, Cy, 1.5, 2026-09-12, docs
```
view: tasks as calendar by due
| Mon | Tue | Wed | Thu | Fri | Sat | Sun |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | |
| 7 | 8 | 9 | 10 | 11 | 12Draft notes | 13 |
| 14 | 15 | 16 | 17 | 18 | 19 | 20Write the spec |
| 21 | 22 | 23 | 24Review fixtures | 25 | 26 | 27 |
| 28 | 29 | 30 |
| Mon | Tue | Wed | Thu | Fri | Sat | Sun |
|---|---|---|---|---|---|---|
| 1Ship v1.3 | 2 | 3 | 4 | |||
| 5 | 6 | 7 | 8 | 9 | 10 | 11 |
| 12 | 13 | 14 | 15 | 16 | 17 | 18 |
| 19 | 20 | 21 | 22 | 23 | 24 | 25 |
| 26 | 27 | 28 | 29 | 30 | 31 |
gantt (view) data
#A timeline: a bar per record from its start (by) to its end (to), with group as swimlanes (timeline works too).
A record with only a start is a milestone. In the editor drag a bar to move it, or its ends to change its dates. The text changes with it.
~~~ selfscribe
use data
~~~
```data plan as gantt by start to end group team
task, team, start:date, end:date
Research, design, 2026-09-01, 2026-09-12
Build, engine, 2026-09-10, 2026-10-02
Launch, engine, 2026-10-05,
```
chart (view) data
#A total per category as a chart: as chart by status sum hours. Add line, area, hbar, pie or donut after chart for another type.
by gives the categories. A date column groups by day, week, month, quarter or year written after it (by due month), and by month alone uses the first date column. The view's sum, avg, min, max or count give the values, count when there is none, and group makes a series per value.
Filters and searches apply first. The chart changes as you edit the records. Point at a bar or move to it with Tab to read its value.
~~~ selfscribe
use data
~~~
```data tasks as hidden
title, status:choice(todo|doing|done), owner, hours:number, due:date, tags:list
Write the spec, doing, Ada, 5, 2026-09-20, "docs, engine"
Review fixtures, todo, Bo, 3, 2026-09-24, tests
Ship v1.3, todo, Ada, 8, 2026-10-01, release
Draft notes, done, Cy, 1.5, 2026-09-12, docs
```
view: tasks as chart by status sum hours
Hours 17.5
form (view) data
#A form to add a record, with a field per column and its type.
In the editor it also edits an existing record. The submitted form adds one line to the data.
~~~ selfscribe
use data
~~~
```data tasks as hidden
title, status:choice(todo|doing|done), owner, hours:number, due:date, tags:list
Write the spec, doing, Ada, 5, 2026-09-20, "docs, engine"
Review fixtures, todo, Bo, 3, 2026-09-24, tests
Ship v1.3, todo, Ada, 8, 2026-10-01, release
Draft notes, done, Cy, 1.5, 2026-09-12, docs
```
view: tasks as form
Shows nothing: a data block that only feeds its views.
The records stay in the text and every view can read them.
~~~ selfscribe
use data
~~~
```data tasks as hidden
title, status:choice(todo|doing|done), owner, hours:number, due:date, tags:list
Write the spec, doing, Ada, 5, 2026-09-20, "docs, engine"
Review fixtures, todo, Bo, 3, 2026-09-24, tests
Ship v1.3, todo, Ada, 8, 2026-10-01, release
Draft notes, done, Cy, 1.5, 2026-09-12, docs
```
view: tasks as list columns title
- Write the spec
- Review fixtures
- Ship v1.3
- Draft notes
by data
#The column a board is grouped by, the date a calendar uses, or a chart's categories. For other views, like group.
view: tasks as board by owner.
~~~ selfscribe
use data
~~~
```data tasks as hidden
title, status:choice(todo|doing|done), owner, hours:number, due:date, tags:list
Write the spec, doing, Ada, 5, 2026-09-20, "docs, engine"
Review fixtures, todo, Bo, 3, 2026-09-24, tests
Ship v1.3, todo, Ada, 8, 2026-10-01, release
Draft notes, done, Cy, 1.5, 2026-09-12, docs
```
view: tasks as board by owner
Ada 2
Write the spec
- status
- doing
- hours
- 5
- due
- tags
- docs engine
Ship v1.3
- status
- todo
- hours
- 8
- due
- tags
- release
Bo 1
Review fixtures
- status
- todo
- hours
- 3
- due
- tags
- tests
Cy 1
Draft notes
- status
- done
- hours
- 1.5
- due
- tags
- docs
to (view option) data
#The end date of a range: as calendar by start to end draws a bar across the days. A timeline uses it for its bars.
It must be a date column. A record without an end is one day long.
~~~ selfscribe
use data
~~~
```data plan as calendar by start to end
task, team, start:date, end:date
Research, design, 2026-09-01, 2026-09-12
Build, engine, 2026-09-10, 2026-10-02
Launch, engine, 2026-10-05,
```
| Mon | Tue | Wed | Thu | Fri | Sat | Sun |
|---|---|---|---|---|---|---|
| 1Research | 2 | 3 | 4 | 5 | 6 | |
| 7Research | 8 | 9 | 10Build | 11 | 12 | 13 |
| 14Build | 15 | 16 | 17 | 18 | 19 | 20 |
| 21Build | 22 | 23 | 24 | 25 | 26 | 27 |
| 28Build | 29 | 30 |
| Mon | Tue | Wed | Thu | Fri | Sat | Sun |
|---|---|---|---|---|---|---|
| 1Build | 2 | 3 | 4 | |||
| 5Launch | 6 | 7 | 8 | 9 | 10 | 11 |
| 12 | 13 | 14 | 15 | 16 | 17 | 18 |
| 19 | 20 | 21 | 22 | 23 | 24 | 25 |
| 26 | 27 | 28 | 29 | 30 | 31 |
group (view option) data
#Groups records by a column, with a count per group: line items under their order, tasks under their person.
Choice columns group in their order, other values in order of appearance, and empty cells come last as (none).
In the editor each group of a table shows its subtotals (the view's sum, avg, min and max) and a + Add that adds a record already in that group, so one CSV block holds many small collections: view: lines as table group invoice sum amount.
~~~ selfscribe
use data
~~~
```data tasks as hidden
title, status:choice(todo|doing|done), owner, hours:number, due:date, tags:list
Write the spec, doing, Ada, 5, 2026-09-20, "docs, engine"
Review fixtures, todo, Bo, 3, 2026-09-24, tests
Ship v1.3, todo, Ada, 8, 2026-10-01, release
Draft notes, done, Cy, 1.5, 2026-09-12, docs
```
view: tasks group status
| title | status | owner | hours | due | tags |
|---|---|---|---|---|---|
| todo 2 | |||||
| Review fixtures | todo | Bo | 3 | tests | |
| Ship v1.3 | todo | Ada | 8 | release | |
| doing 1 | |||||
| Write the spec | doing | Ada | 5 | docs engine | |
| done 1 | |||||
| Draft notes | done | Cy | 1.5 | docs | |
sort data
#Orders records by typed values: sort due, hours desc.
Cells that do not fit their type sort after the others, and empty cells last.
~~~ selfscribe
use data
~~~
```data tasks as hidden
title, status:choice(todo|doing|done), owner, hours:number, due:date, tags:list
Write the spec, doing, Ada, 5, 2026-09-20, "docs, engine"
Review fixtures, todo, Bo, 3, 2026-09-24, tests
Ship v1.3, todo, Ada, 8, 2026-10-01, release
Draft notes, done, Cy, 1.5, 2026-09-12, docs
```
view: tasks sort status, hours desc
| title | status | owner | hours | due | tags |
|---|---|---|---|---|---|
| Ship v1.3 | todo | Ada | 8 | release | |
| Review fixtures | todo | Bo | 3 | tests | |
| Write the spec | doing | Ada | 5 | docs engine | |
| Draft notes | done | Cy | 1.5 | docs |
columns data
#Which columns show, in which order: columns title, due.
Cards and lists use the first as the title.
~~~ selfscribe
use data
~~~
```data tasks as hidden
title, status:choice(todo|doing|done), owner, hours:number, due:date, tags:list
Write the spec, doing, Ada, 5, 2026-09-20, "docs, engine"
Review fixtures, todo, Bo, 3, 2026-09-24, tests
Ship v1.3, todo, Ada, 8, 2026-10-01, release
Draft notes, done, Cy, 1.5, 2026-09-12, docs
```
view: tasks columns due, title
| due | title |
|---|---|
| Write the spec | |
| Review fixtures | |
| Ship v1.3 | |
| Draft notes |
page data
#Records per page: page 20.
Static pages show the first page and say how many there are. The editor pages through them.
~~~ selfscribe
use data
~~~
```data tasks as hidden
title, status:choice(todo|doing|done), owner, hours:number, due:date, tags:list
Write the spec, doing, Ada, 5, 2026-09-20, "docs, engine"
Review fixtures, todo, Bo, 3, 2026-09-24, tests
Ship v1.3, todo, Ada, 8, 2026-10-01, release
Draft notes, done, Cy, 1.5, 2026-09-12, docs
```
view: tasks page 2
| title | status | owner | hours | due | tags |
|---|---|---|---|---|---|
| Write the spec | doing | Ada | 5 | docs engine | |
| Review fixtures | todo | Bo | 3 | tests |
Showing 2 of 4 records
search data
#Shows only records containing some text, ignoring case: search spec.
The editor has a search box too.
~~~ selfscribe
use data
~~~
```data tasks as hidden
title, status:choice(todo|doing|done), owner, hours:number, due:date, tags:list
Write the spec, doing, Ada, 5, 2026-09-20, "docs, engine"
Review fixtures, todo, Bo, 3, 2026-09-24, tests
Ship v1.3, todo, Ada, 8, 2026-10-01, release
Draft notes, done, Cy, 1.5, 2026-09-12, docs
```
view: tasks search spec
| title | status | owner | hours | due | tags |
|---|---|---|---|---|---|
| Write the spec | doing | Ada | 5 | docs engine |
filter data
#Shows only records that pass a test: filter status != done and due < 2026-10-01.
Comparisons = != < <= > >= and contains, joined with and, or, not and parentheses. A bare column is true when it has a value (not done). a|b means either.
Put the filter last when a later option could be read as a column.
~~~ selfscribe
use data
~~~
```data tasks as hidden
title, status:choice(todo|doing|done), owner, hours:number, due:date, tags:list
Write the spec, doing, Ada, 5, 2026-09-20, "docs, engine"
Review fixtures, todo, Bo, 3, 2026-09-24, tests
Ship v1.3, todo, Ada, 8, 2026-10-01, release
Draft notes, done, Cy, 1.5, 2026-09-12, docs
```
view: tasks filter status != done and hours > 2
| title | status | owner | hours | due | tags |
|---|---|---|---|---|---|
| Write the spec | doing | Ada | 5 | docs engine | |
| Review fixtures | todo | Bo | 3 | tests | |
| Ship v1.3 | todo | Ada | 8 | release |
title (view option) data
#A caption for the view: title "Open tasks".
Where a column is also called title, the option goes before the filter.
~~~ selfscribe
use data
~~~
```data tasks as hidden
title, status:choice(todo|doing|done), owner, hours:number, due:date, tags:list
Write the spec, doing, Ada, 5, 2026-09-20, "docs, engine"
Review fixtures, todo, Bo, 3, 2026-09-24, tests
Ship v1.3, todo, Ada, 8, 2026-10-01, release
Draft notes, done, Cy, 1.5, 2026-09-12, docs
```
view: tasks as cards title "This week"
This week
Write the spec
- status
- doing
- owner
- Ada
- hours
- 5
- due
- tags
- docs engine
Review fixtures
- status
- todo
- owner
- Bo
- hours
- 3
- due
- tags
- tests
Ship v1.3
- status
- todo
- owner
- Ada
- hours
- 8
- due
- tags
- release
Draft notes
- status
- done
- owner
- Cy
- hours
- 1.5
- due
- tags
- docs
plain (view option) data
#The view as part of the page, like the lines of an invoice: no bar of views, search or buttons, and sums as bare figures.
view: work as table plain sum total. Double-clicking a cell still edits it in the editor.
~~~ selfscribe
use data
~~~
```data tasks as hidden
title, status:choice(todo|doing|done), owner, hours:number, due:date, tags:list
Write the spec, doing, Ada, 5, 2026-09-20, "docs, engine"
Review fixtures, todo, Bo, 3, 2026-09-24, tests
Ship v1.3, todo, Ada, 8, 2026-10-01, release
Draft notes, done, Cy, 1.5, 2026-09-12, docs
```
view: tasks as table plain columns title, hours sum hours
| title | hours |
|---|---|
| Write the spec | 5 |
| Review fixtures | 3 |
| Ship v1.3 | 8 |
| Draft notes | 1.5 |
| Total | 17.5 |
count data
#The number of records shown (after filter and search).
In a table it goes in the footer. Elsewhere it goes in a line under the view.
~~~ selfscribe
use data
~~~
```data tasks as hidden
title, status:choice(todo|doing|done), owner, hours:number, due:date, tags:list
Write the spec, doing, Ada, 5, 2026-09-20, "docs, engine"
Review fixtures, todo, Bo, 3, 2026-09-24, tests
Ship v1.3, todo, Ada, 8, 2026-10-01, release
Draft notes, done, Cy, 1.5, 2026-09-12, docs
```
view: tasks as list count
- Write the spec
- Review fixtures
- Ship v1.3
- Draft notes
4 records
sum data
#The exact sum of a number column: sum hours.
It keeps the most decimals of its cells, so money adds up to the cent.
~~~ selfscribe
use data
~~~
```data tasks as hidden
title, status:choice(todo|doing|done), owner, hours:number, due:date, tags:list
Write the spec, doing, Ada, 5, 2026-09-20, "docs, engine"
Review fixtures, todo, Bo, 3, 2026-09-24, tests
Ship v1.3, todo, Ada, 8, 2026-10-01, release
Draft notes, done, Cy, 1.5, 2026-09-12, docs
```
view: tasks columns title, hours sum hours
| title | hours |
|---|---|
| Write the spec | 5 |
| Review fixtures | 3 |
| Ship v1.3 | 8 |
| Draft notes | 1.5 |
| Total | 17.5 |
avg data
#The average of a number column, two decimals more than its cells.
avg hours.
~~~ selfscribe
use data
~~~
```data tasks as hidden
title, status:choice(todo|doing|done), owner, hours:number, due:date, tags:list
Write the spec, doing, Ada, 5, 2026-09-20, "docs, engine"
Review fixtures, todo, Bo, 3, 2026-09-24, tests
Ship v1.3, todo, Ada, 8, 2026-10-01, release
Draft notes, done, Cy, 1.5, 2026-09-12, docs
```
view: tasks as list avg hours
- Write the spec
- Review fixtures
- Ship v1.3
- Draft notes
Average hours 4.375
min data
#The smallest value of a number or date column, as written.
min due gives the earliest date.
~~~ selfscribe
use data
~~~
```data tasks as hidden
title, status:choice(todo|doing|done), owner, hours:number, due:date, tags:list
Write the spec, doing, Ada, 5, 2026-09-20, "docs, engine"
Review fixtures, todo, Bo, 3, 2026-09-24, tests
Ship v1.3, todo, Ada, 8, 2026-10-01, release
Draft notes, done, Cy, 1.5, 2026-09-12, docs
```
view: tasks as list min due
- Write the spec
- Review fixtures
- Ship v1.3
- Draft notes
Lowest due 2026-09-12
max data
#The largest value of a number or date column, as written.
max hours.
~~~ selfscribe
use data
~~~
```data tasks as hidden
title, status:choice(todo|doing|done), owner, hours:number, due:date, tags:list
Write the spec, doing, Ada, 5, 2026-09-20, "docs, engine"
Review fixtures, todo, Bo, 3, 2026-09-24, tests
Ship v1.3, todo, Ada, 8, 2026-10-01, release
Draft notes, done, Cy, 1.5, 2026-09-12, docs
```
view: tasks as list max hours
- Write the spec
- Review fixtures
- Ship v1.3
- Draft notes
Highest hours 8.0
and (filter) data
#Both tests must pass. Each part is a filter chip in the editor.
filter status = todo and owner = Ada.
~~~ selfscribe
use data
~~~
```data tasks as hidden
title, status:choice(todo|doing|done), owner, hours:number, due:date, tags:list
Write the spec, doing, Ada, 5, 2026-09-20, "docs, engine"
Review fixtures, todo, Bo, 3, 2026-09-24, tests
Ship v1.3, todo, Ada, 8, 2026-10-01, release
Draft notes, done, Cy, 1.5, 2026-09-12, docs
```
view: tasks filter status = todo and owner = Ada
| title | status | owner | hours | due | tags |
|---|---|---|---|---|---|
| Ship v1.3 | todo | Ada | 8 | release |
or (filter) data
#Either test may pass.
filter owner = Ada or owner = Bo (or owner = Ada|Bo).
~~~ selfscribe
use data
~~~
```data tasks as hidden
title, status:choice(todo|doing|done), owner, hours:number, due:date, tags:list
Write the spec, doing, Ada, 5, 2026-09-20, "docs, engine"
Review fixtures, todo, Bo, 3, 2026-09-24, tests
Ship v1.3, todo, Ada, 8, 2026-10-01, release
Draft notes, done, Cy, 1.5, 2026-09-12, docs
```
view: tasks filter owner = Bo or hours > 6
| title | status | owner | hours | due | tags |
|---|---|---|---|---|---|
| Review fixtures | todo | Bo | 3 | tests | |
| Ship v1.3 | todo | Ada | 8 | release |
not (filter) data
#The test must fail: not done, not (tags contains docs).
A bare column is true when it has a value, so not due finds records without a date.
~~~ selfscribe
use data
~~~
```data tasks as hidden
title, status:choice(todo|doing|done), owner, hours:number, due:date, tags:list
Write the spec, doing, Ada, 5, 2026-09-20, "docs, engine"
Review fixtures, todo, Bo, 3, 2026-09-24, tests
Ship v1.3, todo, Ada, 8, 2026-10-01, release
Draft notes, done, Cy, 1.5, 2026-09-12, docs
```
view: tasks filter not (tags contains docs)
| title | status | owner | hours | due | tags |
|---|---|---|---|---|---|
| Review fixtures | todo | Bo | 3 | tests | |
| Ship v1.3 | todo | Ada | 8 | release |
contains (filter) data
#Text containing a value, ignoring case. For a list, an item containing it.
filter tags contains doc.
~~~ selfscribe
use data
~~~
```data tasks as hidden
title, status:choice(todo|doing|done), owner, hours:number, due:date, tags:list
Write the spec, doing, Ada, 5, 2026-09-20, "docs, engine"
Review fixtures, todo, Bo, 3, 2026-09-24, tests
Ship v1.3, todo, Ada, 8, 2026-10-01, release
Draft notes, done, Cy, 1.5, 2026-09-12, docs
```
view: tasks filter title contains review
| title | status | owner | hours | due | tags |
|---|---|---|---|---|---|
| Review fixtures | todo | Bo | 3 | tests |
today (filter) data
#The reader's date in a filter: due < today, due <= today+2w, today+10wd.
Units: d days (the default), w weeks, m months, y years, wd working days (Monday to Friday, less the holidays of set holidays). The editor uses today's date. Static output applies the test only when the host passes a date.
In a date cell you can type the same short forms: 2w, 10wd, tomorrow, fri, and +2d or -1w to move the cell's own date.
~~~ selfscribe
use data
~~~
```data tasks as hidden
title, status:choice(todo|doing|done), owner, hours:number, due:date, tags:list
Write the spec, doing, Ada, 5, 2026-09-20, "docs, engine"
Review fixtures, todo, Bo, 3, 2026-09-24, tests
Ship v1.3, todo, Ada, 8, 2026-10-01, release
Draft notes, done, Cy, 1.5, 2026-09-12, docs
```
view: tasks filter due < today+30
| title | status | owner | hours | due | tags |
|---|---|---|---|---|---|
| Write the spec | doing | Ada | 5 | docs engine | |
| Review fixtures | todo | Bo | 3 | tests | |
| Ship v1.3 | todo | Ada | 8 | release | |
| Draft notes | done | Cy | 1.5 | docs |
calculated column data
#A column worked out from the others: total = hours * rate, due = start + 10wd.
Write = and a sum after a column's name in the header. Numbers take + - * / and brackets, exactly. Dates take amounts (3w, 2m, 10wd working days), and one date minus another is the days between. client.email looks through a choice(from clients.name) column.
Functions take values separated by ;: if(hours > 8; 'long'; 'short'), round(price * 1.2; 2), min(…), max(…), abs(x), concat(first; ' '; last), join(' / '; a; b), days(start; due) and today(). Text goes in single quotes. Comparisons (= != < <= > >=), and, or and not give yes or no.
On a clients table, billed = sum(jobs.total), avg(jobs.hours) and count(jobs) total the rows of jobs whose choice(from clients.name) column names this client. For rows kept in a file, name the file in double quotes: points = sum("data/picks.csv".points), where each pick names its player with choice(from data/players.csv).
The records have no field for it. Views show it, sort and filter by it, and never type into it. To keep a helper column out of views, write hidden after the sum: guess = if(a > b; 'home'; 'away') hidden. readonly, help and if work there too.
~~~ selfscribe
use data
~~~
```data tasks as hidden
title, status:choice(todo|doing|done), owner, hours:number, due:date, tags:list
Write the spec, doing, Ada, 5, 2026-09-20, "docs, engine"
Review fixtures, todo, Bo, 3, 2026-09-24, tests
Ship v1.3, todo, Ada, 8, 2026-10-01, release
Draft notes, done, Cy, 1.5, 2026-09-12, docs
```
view: tasks columns title, hours sum hours
| title | hours |
|---|---|
| Write the spec | 5 |
| Review fixtures | 3 |
| Ship v1.3 | 8 |
| Draft notes | 1.5 |
| Total | 17.5 |
set holidays data
#The days off that working days (wd) skip: set holidays NAME in the rules block.
NAME is a data block of the document, or a data file (set holidays holidays.csv). Its first date column gives the days, one row a day. A date column called to makes a row a span.
A source that cannot be read gives a warning at the set line, and working days then skip weekends only.
~~~ selfscribe
use data
~~~
```data tasks as hidden
title, status:choice(todo|doing|done), owner, hours:number, due:date, tags:list
Write the spec, doing, Ada, 5, 2026-09-20, "docs, engine"
Review fixtures, todo, Bo, 3, 2026-09-24, tests
Ship v1.3, todo, Ada, 8, 2026-10-01, release
Draft notes, done, Cy, 1.5, 2026-09-12, docs
```
view: tasks filter due <= today+10wd
| title | status | owner | hours | due | tags |
|---|---|---|---|---|---|
| Write the spec | doing | Ada | 5 | docs engine | |
| Review fixtures | todo | Bo | 3 | tests | |
| Ship v1.3 | todo | Ada | 8 | release | |
| Draft notes | done | Cy | 1.5 | docs |
set merge data
#Makes the document a template with a copy per row: set merge guests, then {{name}} where a row's value goes.
The rows are a data block of the document (set merge guests), a query or totals (set merge late, set merge bill: a statement per client), a data file (set merge guests.csv), a table of a database (set merge shop.sqlite/clients.csv), or a data block of another document (set merge people.self#guests). The fields need inline {{_}} -> var.
No need to type it: /mail on an empty line opens Mail merge, which asks where the rows are; the Field button over the page, or typing {{, puts a field in.
Arrows over the page step through the rows. File › Export › Mail merge… makes one PDF with a page per row, or a web page, Word file or .self file per row. Outside a merge a field shows the document's own set NAME value.
~~~ selfscribe
use data
set merge tasks
set owner Someone
set hours a few
inline {{_}} -> var
~~~
Dear {{owner}}, {{hours}} hours of work are yours.
```data tasks as hidden
title, status:choice(todo|doing|done), owner, hours:number, due:date, tags:list
Write the spec, doing, Ada, 5, 2026-09-20, "docs, engine"
Review fixtures, todo, Bo, 3, 2026-09-24, tests
Ship v1.3, todo, Ada, 8, 2026-10-01, release
Draft notes, done, Cy, 1.5, 2026-09-12, docs
```
Dear Someone, a few hours of work are yours.
sqlite (reserved) data
#Reserved for a future read-only database connector. It shows a warning today.
view: sqlite PATH "QUERY" will read a database in the desktop app, with Export to CSV as the way back to plain text.
~~~ selfscribe
use data
~~~
```data tasks as hidden
title, status:choice(todo|doing|done), owner, hours:number, due:date, tags:list
Write the spec, doing, Ada, 5, 2026-09-20, "docs, engine"
Review fixtures, todo, Bo, 3, 2026-09-24, tests
Ship v1.3, todo, Ada, 8, 2026-10-01, release
Draft notes, done, Cy, 1.5, 2026-09-12, docs
```
view: sqlite ./crm.db "select * from people"
view: sqlite ./crm.db "select * from people"
Shows a warning on purpose: “reserved for a future read-only connector”.
Editor
#Modes, the inspector, wizards, preferences.
Page break syntax
#A line ---page--- (in Markdown documents) starts a new page when printed or exported to PDF.
Any rule whose output has the class self-pagebreak is a page break: printing and PDF export start a new page after it, and on screen it shows as a dashed line. The Markdown rulebook writes it as a line ---page---. Your own rules can use the class too, for example line === _ === -> hr.self-pagebreak.
Export… (Ctrl+Shift+E) makes a web page or a PDF of the document with its style, colours and fonts. Print or save as PDF (Ctrl+P) prints it with page numbers and the title at the top of each page.
---page---~~~ selfscribe
use markdown
~~~
# Part one
The first page.
---page---
# Part two
The second page.
Part one
The first page.
Part two
The second page.
Pictures, audio and video in folders editor
#Relative picture links show files of the folder. Paste or drop a picture to save it.
In a document of a folder or a workbook,  shows images/cat.png from next to the document (a leading / starts at the folder's root). The file is read from the folder on your machine. Nothing is uploaded or fetched, and web images keep working. An audio or video file linked the same way gets a player. So does a media line.
Paste or drop a picture into the editor and it is saved in an images/ folder beside the document (audio and video in media/), named after the file, and the link is inserted where you are, as one undo step. Outside a folder there is no folder to save into, so the editor says so and inserts nothing.
Emoji picker editor
#Search emoji by name and insert them: toolbar, palette, /emoji or Alt-;.
Open the picker from the toolbar, from the palette (Insert emoji…), with /emoji in the slash menu or with Alt-;. Type to search names and keywords, move with the arrow keys and press Enter. Recent emoji come first.
It inserts the character itself, or the short name (:tada:) when the document has an emoji rule and the name is one the engine knows.
Source mode mode
#Plain text with highlighting derived live from the rules.
Source mode shows exactly what is in the file, with line numbers, fold markers and squiggles for problems. The colours come from the document's own rules: change a rule and the highlighting changes on the next parse. There is no second grammar to keep in sync.
Hybrid mode mode
#Every line renders in place, except the one you are editing.
Hybrid mode, the default, is a live preview inside the editor: each block of the document is shown rendered, and the block under the caret shows its source so you can edit it. Move the caret away and it renders again.
Show syntax keeps every line as styled source instead: headings sized, strong text bold, delimiters visible but muted, and a rendered picture only under blocks that are not text (diagrams, images, tables). The choice is stored as set hybrid-syntax hidden|shown in preferences.self.
set rules hide in a document folds its rules block away in hybrid mode and preview.
Write mode mode
#The rendered page, edited in place like a word processor.
Write mode shows the document rendered and lets you type into it. Click a word and type: the text changes in the source at exactly that place, so delimiters, links and formatting stay as they are. Enter continues a list or starts a new paragraph, Backspace at the start of a heading or list item turns it back into a paragraph, and Ctrl+Z undoes, all following the document's own rules.
Click a link or picture to change where it points or its description. Code blocks, tables, diagrams and other blocks that are not plain text open their source in a small editor over the page.
The ⋮⋮ handle beside each block (or Alt-/) opens the block menu. The source is always the truth: switch to source or hybrid mode at any time to see exactly what was written.
Turn a block into any rule of the document. Move, duplicate or delete it.
Point at a block and click the ⋮⋮ handle beside it (in write, hybrid or source mode), or press Alt-/ at the caret. Turn into lists the document's own line and block rules, grouped like the slash menu, with a rendered sample of each: a paragraph becomes a heading, a list, a quote, a callout or a code block, and back to plain text.
Turning reads the words of each line through the rule that matches it, so ## Title, - Title and // ! Title all turn into each other, and a fenced block is unwrapped when you turn it into lines. Move up and down swap the block with its neighbour. Duplicate and delete keep the blank lines tidy. Every change is plain text and one undo step.
Comments editor
#Comments on a stretch of text, kept in comments.self next to the document.
Select some text and press Alt+Shift+C (or Comment on selection in the Comments panel). A comment is a to-do until you resolve it. A note has nothing to do. Reply, reopen, edit or delete it from the panel. The text is marked in every mode, with a 💬 badge in the margin.
Comments are kept in comments.self in the document's folder, a readable Selfscribe file: one field: value record per comment in a data block, which opens as a board of to-do, done and note cards. A comment remembers the exact text it is on and a few words around it, so it follows the text when lines move or the words are respaced. If its text is deleted it is shown as orphaned until you attach it to a new selection. Your name for comments is set author in preferences.self.
Automations editor
#Buttons, triggers and connectors that make a folder of documents do things, written as files.
To connect a service you already use, open Settings › Automations › Gallery. Stripe payments, Airtable records in and out, a Notion database, a message to a Slack channel, and records sent to Zapier or Make each come ready, with a page that says where to get the key. The key is kept as a secret in this app, never in the folder. Xero invoices, Xero contacts (both ways) and Google Sheets rows sign in instead: see Signing in to a service.
To keep records in step with a service both ways, fetch with {since} and send with tests on steps. {since} is when the connector last fetched everything it asked for, and is empty the first time, so set header If-Modified-Since: {since} asks only for what changed (an empty header is not sent). set step if id is empty then call make-contact and set step if id is set then call update-contact choose by the record; if also takes a test such as total > 500. What a fetch writes is never sent back, and sends that cannot go wait in the log until the service can be reached. Write set write sync id rather than merge: a fetch then goes field by field, so a change made here that is not sent yet is kept, and a field changed on both sides is named in the log. It takes the service’s value, or yours with set write sync id prefer here, and the field waits in Settings › Automations › Run log: Keep mine writes yours back and sends it as a change, Keep theirs keeps the service’s.
A folder can hold actions (actions/NAME.self: steps such as adding a line to a file, a row to a table, or fetching data), connectors (connectors/NAME.self: one web request whose reply is written to a data file) and automations (automations/NAME.self: when something happens, run an action). Each is a Selfscribe file of set KEY VALUE lines with a description under it.
A document runs an action with a button: any rule that gives an element data-self-action=NAME, for example inline [[_|_]] -> span.self-button data-self-action=_2 _1 and then [[Refresh the weather|refresh-weather]]. To run one for a single record, put a button in each row of a view: view: data/plants.csv as table button Watered runs watered, and the action reads the row's cells as {name}, {room}. The first time an action runs you see exactly what it will do and choose to run it once or always allow it. Automations stay off until you switch them on in Settings › Automations, which also has dry runs, the run log, secrets (API keys, kept encrypted outside the folder and used as {secret:NAME}) and ready-made examples such as a home dashboard.
Connector keys: url, method, header Name: value, body, type, field NAME DEFAULT. The reply is read as format json (default), csv, xml (RSS and Atom feeds) or text. pick and map COLUMN PATH choose what becomes a row. where COLUMN OP VALUE (=, !=, >, <, >=, <=, contains, has), sort COLUMN [desc] and limit N shape the rows. output is a .json, .csv, .tsv, .self or .md file, and write append or write merge KEY keep what the file had (a history). A .self or .md output takes row (the line per row, such as - [{title}]({link})) and heading (the lines above them).
Action steps: append FILE TEXT, prepend FILE TEXT, write FILE TEXT (replaces it), create FILE TEXT (only when it is not there yet), add-row FILE a | b | c, call CONNECTOR, copy TEXT, notify TEXT, open FILE. Texts and file names use {today}, {time}, {weekday}, {month-name}, {year} and what the trigger gives (a comment's {body}, a saved {doc} and its {words}, a changed record's cells). \n is a line break. Triggers: when comment added [todo|note], comment resolved, comment replied, file changed FILE, every N minutes, daily at HH:MM, document saved, open, and for a change made in a data view record added [SOURCE], record deleted [SOURCE], record changed [SOURCE [COLUMN [to VALUE]]] (the action gets {source}, {record}, {changed} and each cell by its column name, such as {status}). In the desktop app requests are made by the app itself (any web service works) and secrets live in the system keychain.
Make a flow do the work editor
#Give a flow’s steps an action with do=, its ways a test with if=, and a button or an automation runs it, step by step on the diagram.
Draw the process as a flow, then say what each step does: node send "Send the invoice" do=send-invoice runs the action actions/send-invoice.self there. At a decision, give a way a test: link check -> approve "yes" if="total > 500". The way without a test is the one taken otherwise. Tests are written as in calculated columns: status = 'paid', due < today and not paid.
Name the flow with a line diagram orders. A button whose action is flow:orders runs it, with the button’s data-self-arg-* values as the record: [[Process|flow:orders|900]] with a rule that puts 900 in data-self-arg-total. An automation runs it with set do flow:orders, on the record it heard about: set when record changed data/orders.csv status to placed.
To make a column follow a flow, write set track=orders column=status in it. Its steps are the values a status may have and its links the moves. Change a status in a table to a step the flow can reach, and that step’s do= action runs with the record. Change it to anything else and it is put back, with a notice that says where it can go.
A step can wait. node ok "Approve the leave?" wait=answer stops the run and asks, with one button per way out of the step: the way the person picks is the way the run goes on, and its action gets {answer}. wait=3d (or 30m, 4h, 2w), wait=2026-12-01 (nine in the morning), wait=2026-12-01T14:30 or wait=start (a day in the record’s start column) holds the run until then. Waiting runs are kept for the folder on this computer and go on when their time comes; one due while the app was closed goes on when the folder opens. Settings › Automations › Run log lists them: go on now, or let one go.
A record added with that column set comes in at the flow’s start: added at the start, the start’s action runs; added further along, it is set to the start and you are told why.
A flow kept as a file, flows/orders.flow, runs the same way. Draw it on a page with a flow block from flows/orders.flow and set keep=panel, and that page shows each run moving.
Add set start=in keep=panel to the flow, and a data block panel holds the step it is on: the diagram lights each step as the run reaches it, and its trail shows the way the run went. Each action asks before its first run, as every action does. When a run stops early, the notice says where and why.
What reaches the internet editor
#Nothing connects that you have not looked at: actions ask first and again when they change, and web pictures wait for a click.
An action asks before its first run, and shows every request it will make with secrets hidden. Always allow keeps that answer for what you read. If the action, or a connector it calls, changes later, by hand, by sync or from someone sharing the folder, it asks again and says it has changed. An automation that changed since you turned it on stays off until you look at it in Settings › Automations.
A picture, sound or video from the web waits as a quiet box that names its server, because loading it would tell that server you opened the document. Click it, or run Load pictures from the web, to load the ones in this document. The notice then offers Always in this folder. To undo it, run Stop loading web pictures in this folder.
In the desktop app, the first time anything connects to a server, or sends a secret to one, the app asks in a window of its own, which no document or plugin can draw. Secrets stay in the keychain: the app writes them into a request itself, so nothing on the page can read one.
Secrets live in your computer’s keychain or the browser’s encrypted store, never in the folder. Web pages in documents load only when you click them. Imports from the web are off. CSS in documents cannot fetch anything. The app looks for updates on GitHub unless you turn Look for updates off in Settings.
Signing in to a service editor
#Connectors for Xero, Google and other services that sign you in: press Sign in once, and the app keeps the sign-in fresh.
Some services give no key to copy: you sign in to them. Add set sign-in NAME to the connector, send {secret:NAME} where the service wants its token (usually set header Authorization: Bearer {secret:NAME}), and give set client-id the id of the app you registered with the service.
For xero, google, microsoft, hubspot, quickbooks and github, the name (or set service NAME) is enough: the app knows their addresses. For any other service, add set authorize URL (its sign-in page) and set token-url URL. Services that want a client secret take set client-secret NAME, the name of a secret you saved. set scope, set redirect http://localhost:PORT/callback and set sign-in-param KEY VALUE are there when a service needs them.
In Settings › Automations, the connector’s card shows how the sign-in stands and has a Sign in button, with the return address to register with the service. The app, on a computer or a phone, opens the service’s own page in your browser and keeps what it gets back to itself: in the system keychain on a computer, in the app’s own storage on a phone. It renews the sign-in by itself, and no page ever sees a token. To sign out, remove the secret of that name.
On the web, save an access token from the service as the secret NAME instead. It works until the service lets it run out.
Services often send days as date-times: set map due DueDate|date keeps the day. set first-row names reads a sheet whose first row names its columns.
Preview mode mode
#The rendered document only.
Preview shows the rendered HTML, with plugins drawn. Click a link to open it in your browser. The size of the preview can be changed separately from the editor's font size.
Split mode mode
#Source on the left, preview on the right, scrolled together.
Split mode shows the source and the preview side by side. Scrolling one scrolls the other to the same place, matched through the engine's spans, so the two always line up.
Inspector editor
#Which rule made this, where it came from, and what it replaced.
Put the caret on anything in the body, or click it in the preview, and the Inspector answers in plain words. What it is says whether it is a heading, a list item or a word your rules style, and where it sits. How it looks gives its colours, weight and spacing, and whether they are easy to read. Where it comes from names the document, rulebook or imported file, the other rules it wins over, and any problems at that spot.
Change how it looks… opens the style designer for that rule. More copies a borrowed rule into this document, turns it off here, saves it to a rulebook or opens its line. Details for rule writers shows the exact rule and the CSS it makes.
At the bottom, This document lists what the document says about itself: its rulebooks, look, paper, column, layout, language and plugins, with Page setup and Look buttons to change them.
Rule wizard editor
#Build a rule by example, with a live sample, and get plain rule text.
The rule wizard walks through one rule: the kind (inline, line, block, word), the pattern (type a sample and select the part that varies), what it becomes, options, and a style designer. The sample renders live as you go.
It writes ordinary rule text into your rules block: the short form when the rule fits on one line, the full form otherwise. It keeps no state of its own.
Help while you type editor
#Suggestions, hover cards, colour swatches and inline problems in the rules block.
In the rules block the editor suggests every word you can write there (kinds, what rules become, options, attributes, use names, set settings) and CSS properties as you type (Ctrl+Space asks for them). Hovering a word shows a short card with an Open in dictionary link. F1 opens the word's full entry.
Each colour gets a swatch. Click it to pick a new colour, and the pick edits the text. The swatch beside a palette colour, var(--name), changes the palette entry, so every rule that uses it follows. Typing var(-- offers the palette's names.
Problems appear quietly at the end of their line, such as a colour that is hard to read on a light or a dark page, often with a fix.
preferences.self editor
#The editor's settings, as set lines in an ordinary Selfscribe file.
Everything in Settings is written to preferences.self, a Selfscribe file with a rules block of set KEY VALUE lines. You can open it as text and edit it by hand. Comments and unknown lines are kept.
Keys: theme, theme-light, theme-dark, document-themes (on: the set theme of the open document colours the app), collapse-blocks (on: long code and plugin blocks fold in the middle), collapse-lines (how many lines make a block long), rule-bar (a strip over the editor with the marks and line rules of the document), autocorrect (corrections from snippets.self as you type), vim (Vim keys), key-COMMAND (new keys for a command, or none), prose-font (serif or sans), ui-size, editor-size, preview-scale, line-height, measure, centered (off: Write and Preview full width by default), hybrid-full-width (on: Hybrid uses the whole window), source-full-width (on: Source uses the whole window), update-check (look for new versions, on or off), update-install (close: a downloaded update installs when the app closes, or ask: only when you press Restart), wrap (word wrap on or off), spellcheck (underline misspelt words, on or off), spell-language (auto, en-GB or en-US: the English the right-click menu suggests spellings in), context-menu (app or system: which menu a right click opens), context-menu-layout (grouped or full), context-menu-header and context-menu-quick (on or off: the menu names what was clicked, and has Cut, Copy and Paste as buttons), auto-pair (brackets and quotes close as you type), smart-typography (curly quotes, dashes and the ellipsis as you type), style-check (hints on filler words, wordy phrases and very long sentences),typewriter (in focus mode), typewriter-always (the caret line in the middle all the time), focus-dim, autosave, default-mode (last, source, hybrid, write, preview or split), motion (system, reduced or full), sidebar (left or right), reading-aids (breadcrumbs, time left in the section and a progress line), whole-preview (draw the whole preview at once, for screen readers and find), developer-tools (the Developer panel), outline-auto (open the Outline for long documents), author (the name your comments are signed with), paper (A4 or Letter: the paper of documents that do not choose one), page-layout (scroll, pages or slides: how the preview lays out documents that do not say, see set layout), device (auto, desktop, tablet, phone, eink or eink-colour: the layout of the app itself), daily notes daily-folder (where they go, daily unless you say) and daily-template (default, or the file a new day starts from), quick capture capture-file (the file lines go to, inbox.self unless you say), capture-time (on: each line ends with the date and time) and capture-hotkey (the desktop app's shortcut that works in every app, or none), reminders (on: a notification when a countdown reaches zero, see reminders), hybrid-syntax (hidden or shown), rules-block (shown, collapsed, hidden in hybrid, or auto: a chip until you click into it), ui-style (default, minimal, soft, classic, compact or mono: the shape of the editor, with any theme), app-icon (theme, magenta, blue, teal, green, amber, red or graphite: the colour of the app’s own mark), app-icon-tile (off draws the mark without its tile), illustrations (off hides the small document characters shown where a place is empty), the fonts font-ui, font-editor, font-prose and font-code (default, a font from the gallery such as literata or atkinson-hyperlegible, or custom:NAME for a font installed on the computer), and the view options line-numbers, show-blank-lines, show-whitespace, show-line-endings and indent-guides (on or off).
The toolbar and side rail layout are lines too: set toolbar (items per region, separated by |), set toolbar-hide, set rail and set rail-hide (Customise toolbar… in the ⋯ menu writes them). Other parts of the app keep their keys in the same file: default-rulebook NAME for new documents, and plugin-NAME on|off plus plugin-NAME-KEY VALUE for plugins.
~~~ selfscribe
set theme system
set theme-dark nord
set prose-font sans
set sidebar left
set plugin-chart on
set plugin-mermaid-theme auto
~~~
Only a rules block: nothing to render.
View options editor
#Show blank lines, whitespace, line endings and indentation guides while you write.
The View options button beside word wrap and full width (the eye) switches marks that make the invisible visible, in source and hybrid mode. They are for you, not for the document: they are saved in preferences.self, never in the text.
- Line numbers (
set line-numbers offhides them): the numbers down the side of Source, and of Hybrid when you turn them on for a document. - Show blank lines (
set show-blank-lines on): a faint dotted rule on every empty line. - Show whitespace (
set show-whitespace on): spaces as dots, tabs as arrows, and spaces at the end of a line tinted. - Show line endings (
set show-line-endings on): a¬at the end of each line. - Indentation guides (
set indent-guides on): a thin line for each level of indentation, a tab or the document's indent width.
Each is also a command in the palette and a switch in Settings. They are drawn only for the lines on screen, so they cost nothing on long documents.
Find and replace editor
#Ctrl+F finds in the document or the preview. Ctrl+Shift+F searches every file and open tab.
Ctrl+F opens the find bar over the document, in every mode. Its toggles are match case (Alt+C), whole word (Alt+W) and regular expression (Alt+R). It shows how many matches there are and which one you are on ("3 of 120"). Enter and Shift+Enter (or F3 and Shift+F3) go to the next and previous match. The arrow keys bring back earlier searches. Escape closes it.
Ctrl+H adds a replace field. As you type, every match in the text shows crossed out with its replacement beside it, before you change anything. Replace changes the current match and moves on. Replace all changes every match as one step, so one Ctrl+Z puts everything back. With a regular expression the replacement can use $1, $&, $<name> and \n. Preserve case (Alt+P) keeps each match's capitals: replacing ferry with boat turns Ferry into Boat and FERRY into BOAT.
To see every match with its line, press Alt+I. The Search panel opens on This document, with your search, filter and replacement. Click a line to go there. While replacing, each line shows its change, and the button at its end replaces that one alone. Switch to Open documents or Folder at the top to look further.
Drag a line of the Search panel into another document or another app to copy the match. Drag its grip to copy the paragraph, section, table row or record around it. A record arrives in other apps as a small Markdown table. Hold the drag over a tab and that document opens, so you can drop it there.
In the preview and in Write the find bar searches what you read, the rendered text of the whole document, even the parts of a long document that are not on screen yet. Matches are marked on the page, and the bar scrolls to each one. In split mode it searches the side that has the focus. A switch in the bar changes sides. In hybrid mode going to a match shows that block's source.
The Search side panel (Ctrl+Shift+F) searches the open folder or workbook and every open tab, unsaved changes included, with the same toggles, files to include or exclude (*.self, docs/) and a structure filter. Results are grouped by file. Click one to open the file at the match. Replace all there shows every file it would change, with the changed lines, and asks first: open tabs are edited in the editor (one undo step each, not saved), other files are written, and Undo in the panel puts them back.
Searching never freezes the editor, even in a document of several megabytes: it works in small steps between keystrokes.
Build a search pattern in plain words editor
#Alt+B in the find bar inserts pattern pieces named in words, like "A digit" and "One or more". The pattern is read back in a sentence under the query.
Press Ctrl+F, then Alt+B or the button beside the regular expression toggle. A menu lists pieces by kind: Characters, How many, Where and Groups. Pick A digit, then One or more, and the query finds 7, 42 and 2026. Select part of the query first and a piece wraps it: select ferry, pick Maybe (optional), and the pattern finds the word with or without it.
Under the query, the pattern is read back in one sentence: \d{4} finds "a digit (0-9), exactly 4 times". It reads patterns you type yourself too, so you can check one before you replace with it.
Ready-made in the same menu gives whole patterns for common searches: a date, a time, an email address, a web address, a number, a word said twice, and spaces at the end of a line.
Remember as $1 keeps what a part found for the replacement. Find (\w+), (\w+) and replace with $2 $1 to turn "Moreau, Ana" into "Ana Moreau".
Search filters editor
#Find only in headings, in code, in what a rule made, inside a section, on open tasks, or in files changed lately.
The funnel button of the find bar (and the Search panel's Structure filter field) takes a filter line. It limits where matches count, using what the engine knows about the document, so it works for any syntax your rules define, not only Markdown.
in:heading: only in headings (h1toh6, whatever rule made them).in:code: only in code (code,pre,kbd,samp, andverbatimrules).in:link,in:quote,in:list,in:table: only in links, quotes, list items or tables.in:rules: only in the rules block.in:plugin: only in blocks a plugin draws, like charts, maps and data blocks.plugin:mapkeeps one plugin's blocks.in:record: only in the records of data blocks, the lines under the column line.target:NAME: only in text a rule turned into NAME, for exampletarget:h2ortarget:mark.rule:NAME: only in text made by the rule named NAME (as NAME), or else by rules with the class NAME.section:TITLE: only inside the section under a heading called TITLE, down to the next heading of the same or a higher level. Quote titles with spaces:section:"Getting started".tag:NAME: only on lines that carry#NAME, for exampletag:garden.task:open,task:done,task:due,task:overdue,task:any: only on task lines (- [ ] call Sam), by their state or due date.
In the Search panel, path: and changed: choose files. path:journal/ keeps files whose path matches a glob (*.md), a folder or part of a path. changed: keeps files changed today, yesterday, in the last 7d, 2w or 3m, on a day (2026-10-01), in a month (2026-10), or before or after one (<2026-10-01, >2026-10-01).
A filter needs no search text. Leave the query empty and the Search panel lists what the filter selects: task:open lists every open task in the folder, and changed:today lists the files changed today. To keep a search you use often, press the bookmark button. It keeps the query, toggles, files and filter, and a click runs it again.
Put - before a term to leave that place out: -in:code finds words in the prose but not in code samples. Terms of the same kind add up (in:heading in:code is headings or code). A section: term narrows them (in:code section:Install is code inside the Install section). A heading's own markers, like ##, are not part of it.
In the preview the same filter applies to the rendered page. Filters wait for the document to be parsed, so they are never out of date.
in:heading in:plugin in:record target:h2 plugin:NAME rule:NAME section:"Title" tag:NAME task:open path:GLOB changed:7d -in:code~~~ selfscribe
use markdown
block ::: tip ... ::: -> aside.tip { border-left: 3px solid seagreen; padding-left: 0.8em } as tip
~~~
# Setup
Install the tool, then open the settings.
::: tip
The settings file is plain text.
:::
## Settings
Edit `settings.ini` to change the settings.
Setup
Install the tool, then open the settings.
Settings
Edit settings.ini to change the settings.
Links, backlinks and tags editor
#Write [[Name]] to link to another document. The Links panel shows what links here, the Tags panel every #tag.
Write [[Trip plan]] to link to the document Trip plan.self. The name can be a file name or a set title, in any case. [[Trip plan#Budget]] goes to a heading, and [[Trip plan|the plan]] shows other words. In the editor, Ctrl+click a link to open it (Cmd+click on a Mac). In the preview, a click opens it, and in Write a Ctrl+click does.
A link to a document that does not exist yet is dimmed. Click it and choose Create to make the document next to the one you are in.
The Links side panel lists the documents that link to the one you are reading, each with its line, and the links it makes itself. Under Mentioned, not linked are the lines of other documents that name it (its file name, title or alias) without a link: Link turns the name into [[Name]], and Link all does them all. The Tags side panel counts every #tag in the folder. Pick a tag to see the lines that carry it, and pick a line to go there. To search only those lines, add tag:NAME to a search filter.
Typing [[ suggests the documents of the folder, # the tags you already use, and @ the names you mention. Nothing is suggested in the rules block or in code.
Links and tags come from the text itself, so they work in any document. A # needs a space or the start of a line before it and a letter in the name, so # Heading, C# and #1 are not tags. A document whose own rules give [[...]] a meaning, such as a timer or a button, keeps that meaning.
Without a folder, links and tags work between the open tabs. Open a folder to see links across all its files.
Graph of links editor
#See how your notes link: each note is a circle, each link a line. Click a note to open it.
Open the Graph side panel. Its Open the graph large button shows it in a big window. Bigger circles have more links, and the note you are in is marked. Hover a note to light up the notes it links with, and click it to open it.
To narrow it down, type in Filter notes or pick a tag. Nested tags count too, so #garden also shows notes tagged #garden/pears. The neighbours button shows only the open note and the notes up to two links away.
Drag to move around, and use the wheel or the zoom buttons to zoom. With the keyboard, the arrow keys move from note to note, Enter opens one, + and − zoom and 0 fits the graph.
The graph is drawn from the same links as the Links panel, [[Name]] and ![[Name]] alike. A big folder settles over a moment, and you can keep typing meanwhile.
Query blocks editor
#List the open tasks or the notes of the folder on any page, kept up to date: a ```query block.
Write a fenced block whose first word is query, then say what to list: tasks open in:garden/ sort due, or notes #trip sort changed desc. The block shows what it finds as a list, and keeps up as you write in any note.
Tick a task's box in the results and the task is ticked in its own note: in its tab when it is open (unsaved changes stay unsaved), else in the file. Click a task or a note to open it at that line.
A task is a line that starts with a box: [] water the beds, - [ ] book the ferry, [x] done. Give it a date with 📅 2026-11-02 or due:2026-11-02.
tasksornotes, thenopen,doneorallfor tasks (open is the default).in:garden/a folder,in:.this note's folder,in:thisthis note.path:archive/a path pattern.#gardenortag:garden,@sam,links:"Trip plan",title:lisbon, and plain words or"quoted words".due:andchanged:taketoday,overdue,none,7d,2w,2026-10,2026-10-28,<2026-11-01or>=today+7d.-before a filter leaves those out:-in:archive/.sort due,sort changed desc,limit 10, andas table,as cards,as board(open and done columns) oras calendar.
The results are a data view, so its buttons search, sort and filter them. An export shows them as they are when you export. A problem in the query shows above the results, and the rest of the query still runs.
```query tasks open #garden due:7d sort due as boardObsidian vaults editor
#Open an Obsidian vault as a folder: its Markdown notes, links, embeds, properties and callouts work as they are.
Choose File › Open folder… and pick the vault. Its .md notes render as Markdown, and [[links]], [[Note|other words]], [[Note#Heading]] and #tags work, nested tags such as #garden/pears included. The .obsidian settings folder and the .trash folder are left out.
![[Note]] shows that note on the page, and ![[Note#Heading]] just that section, with a link to the note above it. ![[harbour.png]] shows the picture, wherever the vault keeps it, and ![[harbour.png|200]] makes it 200 pixels wide. A note never shows itself inside itself, and embeds stop a few levels deep.
Properties at the top of a note, between two --- lines, show as a small card instead of text. Their tags: count as tags, and aliases: are other names links find the note by.
A quote that starts with [!note] Title is a callout. [!tip]- starts folded, and [!tip]+ can be folded.
Selfscribe writes nothing into the vault except the edits you make. It adds no rules block to your notes. Like every folder, it keeps the open tabs in .selfscribe/state.json inside the vault.
Rule bar editor
#A strip over the editor made from the rules of the document: its marks, what a line can become, its words.
The rule bar sits on top of the editor in Source, Hybrid and Split. Everything on it comes from the rules of the document, so the marks you invent are one click away, and it follows the rules block as you edit it.
- The first menu is labelled with what the line under the caret is now, such as Text or Heading 2. It lists the line and block rules of the document, grouped, and turns the lines into the one you pick. Hover a choice to see it drawn with your rules.
- Each mark (an inline rule) wraps the selected words, or unwraps them when they have it already.
- Words inserts a word that a word rule styles.
- Insert opens the gallery of blocks, diagrams, charts and media.
To hide it, press its ×, or turn off View › Show in the editor › Rule bar or Settings › Editing › Rule bar. That writes set rule-bar off in preferences.self.
Snippets and autocorrect editor
#Type /name to insert text you use often. Typos you list are fixed as you type.
Type / and a snippet name at the start of a line, such as /signature, and press Enter. Your snippets come first in the slash menu. Tools › Snippets and autocorrect… opens them in Settings, where you make, rename and delete them, and Insert at the caret inserts one.
A snippet fills in {{date}}, {{time}}, {{weekday}} and {{title}} when it is inserted, and the caret goes to {{cursor}}.
The Autocorrect tab lists what you type and what it becomes, such as teh and the. The word is replaced when you type a space or punctuation after it, never in the rules block or in code, and Ctrl+Z puts it back. Settings › Editing › Correct as you type turns it off (set autocorrect off).
All of it is snippets.self in the storage of the app, plain text you can edit by hand. Each ## name section is a snippet, and the ## autocorrect section holds one wrong -> right line per correction.
Fold long blocks editor
#A long code, data or chart block shows its first and last three lines while the caret is elsewhere.
A code block, a data block or any plugin block longer than a dozen lines folds in the middle, with a line such as ⋯ 20 more lines. Click it, or move the caret into the block, and it opens. Leave it and it folds again. Line numbers stay those of the text, so the hidden lines are skipped, not renumbered.
It happens in Source, and in Hybrid while the syntax shows. Where Hybrid draws the page, the block is already a picture.
Settings › Editing › Fold long blocks turns it off (set collapse-blocks off), and Long means more than chooses how many lines make a block long (set collapse-lines 20).
Today's note editor
#One note a day, made from a checklist the first time you open it. Alt+T opens today's.
Press Alt+T, or Today on Home, or File › Today's note. It opens daily/2026-09-27.self in the open folder, with the date of your own clock. With no folder open it is kept in the app's own notes, and Ctrl+S saves it there.
A new day starts as a checklist with the rules of the Today tour: [] is a box to tick and [x] a ticked one, a ! makes a line urgent, (9:30) is a time chip, and progress: … counts what is done. A countdown such as ((2026-10-17 09:40 ferry)) can remind you, see reminders.
When the last note left boxes unticked, a message offers to Carry over them. Edit › Carry over unticked items does the same at any time. They go in under your last task, each once, and Ctrl+Z takes them out. The arrows beside the date in the status bar go to the note before or after.
To use your own template, save it as templates/Daily.self in the folder, or name any file with set daily-template templates/day.self in preferences.self. In it, {{date}}, {{isodate}}, {{weekday}} and {{title}} become the note's day, and the caret goes to {{cursor}}. set daily-folder journal puts the notes elsewhere.
Note templates editor
#Start a meeting note, a review or a journal page from a template kept in the folder.
A template is any document in a templates/ folder. It serves the folder that holds it and everything under it, so templates/ at the top serves the whole folder and work/templates/ serves work/.
Choose New note from a template… in the palette, or right-click a folder in the Files panel. Pick a template, name the note, and it is made in the folder you are in and opens. The nearest templates come first. A folder with none yet is offered templates/Note.self to start from.
In a template, {{title}} becomes the note's name, {{date}}, {{isodate}}, {{time}} and {{weekday}} the moment it is made, and the caret starts at {{cursor}}. The file name is filled in too: templates/{{isodate}} Meeting.self makes 2026-10-28 Meeting.self. Type a path in the name, such as meetings/Kickoff, to put the note in a folder.
templates/Daily.self is the template of today's note.
Quick capture editor
#Alt+Q opens a small box. Type a line, press Enter, and it goes to the end of inbox.self.
Press Alt+Q (or File › Quick capture…), type what is on your mind and press Enter. The line is added to the end of inbox.self in the open folder, or to the app's own inbox when no folder is open. Esc closes the box.
In a checklist such as the inbox the line becomes a box to tick, in Markdown a list item. Add the time ends it with the date and time, (2026-09-27 14:05). set capture-file notes/ideas.self chooses another file, and set capture-time off leaves the time out.
In the desktop app a shortcut can work from any app: Settings › Editing › Capture from anywhere, such as Ctrl+Shift+Space (set capture-hotkey). It brings Selfscribe forward with the box open. The web app has no such shortcut.
Recurring tasks editor
#Tasks that come back: [] water the plants every 3d in recurring.self goes into Today's note on its day.
Choose Recurring tasks… in the palette. It opens recurring.self beside the inbox, made with a few examples the first time. Write one task a line, ending in every and how often: [] take out the bins every mon.
How often: every day, every weekday, every weekend, every week, every 3d, every 2 weeks, every mon, every mon wed fri, every month, every month on 1, every month on last, every year.
When Today's note is made or opened, the tasks due go in once, as [] take out the bins ↻. Tick it there and its next: 2026-10-12 in recurring.self moves on. A task you leave unticked stays due, so it comes back tomorrow rather than being carried over.
You can change next: by hand. A ticked line in recurring.self is paused.
Share a link or some text from another app on your phone, and it goes to the end of inbox.self.
On your phone, press Share in another app and choose Selfscribe. The text or link is added to the inbox the way quick capture adds a line, and Open inbox in the message opens it.
The web app offers this once it is installed from the browser (Add to Home screen). The Android app offers it as it is.
More: the web app receives shares as ?share-title=…&share-text=…&share-url=…, so a link of that shape adds to the inbox too.
Reminders editor
#A notification when a countdown such as ((2026-10-17 09:40 ferry)) reaches zero.
Turn on Settings › Editing › Reminders (set reminders on). The browser asks once whether the app may show notifications. When a countdown in an open tab or in a document of the open folder reaches zero while the app is open, you get a notification and a message in the app. Open in the message goes to its line, and so does clicking the notification in the browser.
A countdown with a time reminds at that time. One with only a date reminds at nine that morning. The words after the date name it: ((2026-10-17 09:40 ferry)) says "Reminder: ferry".
Only documents whose rules make countdowns count, such as a daily note. The app looks for them when a document is opened or saved, and keeps timers for the next few only.
Vim keys editor
#The editor takes the modes and motions of Vim, and the shortcuts of the app still work.
Turn on Settings › Editing › Vim keys (set vim on in preferences.self). The editor then starts in normal mode, with the motions, operators and commands of Vim.
The shortcuts of the app, with Ctrl, Alt or an F key, still run their commands, since the app handles them before the editor sees them.
Themes editor
#The colours of the app: pick one from the status bar, or let a document choose while it is open.
Click the theme button in the status bar. Every theme shows as a small picture of itself. Point at one to see the whole app in it, click to keep it, and move away to put yours back. Settings › Appearance has the same choice, and Follow system matches the light or dark setting of the computer.
A document can ask for a theme with set theme, such as set theme cyber-dark. The app takes it while you look at the document, and your own comes back when you leave. Exports use it too, unless you choose other Colours in File › Export…. Settings › Appearance › Documents choose the theme turns this off (set document-themes off).
The theme changes the app. The look of the page itself is set style.
Keyboard shortcuts
#Every key the editor knows.
Keyboard shortcuts guide
#Every key the editor knows, from its command list.
Press ? anywhere outside the text to see every shortcut at a glance (or Keyboard shortcuts at a glance in the palette). What works right now comes first: the keys of the slides, of the editor and the rule keys of the document. Type to find one.
To change the keys of a command there, press its pencil, then the new keys. Backspace removes them, and the arrow beside a changed one brings back the built-in keys. They are kept in preferences.self as set key-COMMAND COMBO, such as set key-view.wrap Alt+Shift+Z or set key-view.present none.
In the editor this page is generated from the command list, so it always shows the keys that are really bound. Every shortcut runs a command, and every command is also in the command palette (Ctrl+K), so you can always search for what you want instead of remembering a key.
F1 opens Help. With the caret on a word in the rules block it opens that word's entry. The Help side panel follows the caret as it moves.
Formatting keys come from the document's own rules: Ctrl+B, Ctrl+I and Ctrl+E apply the document's strong, em and code rules when it has them. Typing / at the start of an empty line opens the slash menu of the document's line and block rules.