Editing and Formatting
Slate speaks standard Markdown and GitHub Flavored Markdown, and keeps your source clean. Keyboard shortcuts wrap selections in the right syntax so you rarely have to type punctuation yourself.
The Markdown syntax Slate supports
Markdown is one of the formats Slate edits fluently, and it stays out of your way. Slate reads and writes standard Markdown plus the common GitHub Flavored Markdown extensions, so if you have used Markdown anywhere else, your files will look right.
Standard Markdown
- Headings from
# H1to###### H6. **bold**,*italic*,~~strikethrough~~, and`inline code`.- Ordered, unordered, and nested lists.
- Block quotes with
>. - Horizontal rules with three or more dashes on their own line.
- Links:
[text](url). Images:. - Fenced code blocks with three backticks and an optional language name.
GitHub Flavored Markdown
- Pipe-syntax tables.
- Task lists with
- [ ]and- [x]. - Autolinks for bare URLs and email addresses.
- Strikethrough.
Extensions Slate also understands
- Inline and block math written with
$...$and$$...$$. - Mermaid diagrams inside a fenced code block tagged
mermaid. - Directives for callouts, written
:::note,:::warning,:::info, ending with:::. - Footnotes.
- YAML or TOML frontmatter at the very top of the file.
For details and examples, see Rich Content.
Keyboard formatting shortcuts
Slate is keyboard-first, so the shortcuts keep you moving with zero lag. In the plain-text editor, formatting shortcuts wrap your selection in the right syntax. If nothing is selected, they insert a placeholder and put your cursor between the markers. You can press the same shortcut again to unwrap.
inline code⌘⇧XCtrl⇧XToggle strikethrough⌘KCtrlKInsert a linkSlash commands in WYSIWYG
In the WYSIWYG view, type / on an empty line to open a menu of blocks you can insert. Keep typing to filter; press Enter to choose. This is useful for blocks whose Markdown you would rather not remember, like tables, callouts, or math.
Whatever you insert ends up as standard Markdown in your file. The slash menu is a typing aid, not a separate document format.
Find and replace
Slate edits code as comfortably as prose, with real syntax highlighting, so the plain-text editor has the find and replace controls you would expect from any code editor. They appear inline at the bottom of the editor.
- ⌘FCtrlFOpen find
- ⌘GF3Find next match
- ⌘⇧G⇧F3Find previous match
- Toggle case sensitivity and regular expressions from the find bar.
Undo and redo
Each view keeps its own undo history. Edits are grouped sensibly so a fast burst of typing collapses into one undo step rather than dozens.
- ⌘ZCtrlZUndo
- ⌘⇧ZCtrl⇧ZRedo
- ⌘⇧ZCtrlYRedo (Windows-style alternative)
Markdown round-trip
When you switch between Plain and WYSIWYG, Slate reads your Markdown, builds an internal tree, and writes Markdown back out. The meaning is preserved exactly, but the exact characters can change in small ways. Knowing this up front saves a moment of surprise.
Things that may normalize
- Italic markers:
*text*and_text_both mean italic. The WYSIWYG view picks one and stays consistent. - List indentation: two-space and four-space indents both work. WYSIWYG picks one style per list.
- Table column padding may be redistributed when WYSIWYG redraws a table.
- Trailing whitespace at the end of a line is trimmed.
The text content, structure, and formatting attributes are identical across views. If byte-exact preservation matters for a file (for instance, you have very specific whitespace for a downstream tool), stick to the plain-text editor.