Markdown Actions
Espresso's Markdown actions provide shortcuts for inserting common Markdown elements, and are only available when editing Markdown documents (you can enable them for any open text document by choosing View ⟩ Language ⟩ Markdown if you are editing a Markdown document with a non-standard extension).
Formatting actions
The following formatting actions will toggle the formatting for all selections, disable surrounding formatting if the cursor is in a piece of text that is already formatted, or insert the proper formatting around the cursor if there is no selection. Spaces at either end of a selection are left outside the formatting, and after formatting a single selection tab moves the cursor past the closing marks:
- Text ⟩ Markdown ⟩ Bold (shift command B): toggles
**bold formatting** - Text ⟩ Markdown ⟩ Italic (shift command I): toggles
_italic formatting_ - Text ⟩ Markdown ⟩ Inline Code (shift command C): toggles
`inline code formatting`
The following formatting actions will wrap the first selection or insert the target element at the cursor if there is no selection, and if the top item on your clipboard appears to be a URL it will be inserted automatically:
- Text ⟩ Markdown ⟩ Image (control shift I): inserts
 - Text ⟩ Markdown ⟩ Link (control shift L): inserts
[link reference](http://url.com)
Header and horizontal rule actions
The header and horizontal rule actions make it easier to create and modify Markdown headers or horizontal rules.
Text ⟩ Markdown ⟩ Increase Header Level (command shift H)
When you run this action on a normal line, a single atx-style header marks will be added to the beginning of the line every time you increase the header level. If you are in a line that is already a header, the level of the header will increase, up to level 6 (and if you are working with an setext-style header, it will switch to atx if you go from a level 2 to a level 3 header). If you are using header marks at the end of the line as well as the beginning, they will also be updated.
If your selection includes headers, only the headers change, so you can select a whole section, or the whole document, and move all of its headers a level at once.
Text ⟩ Markdown ⟩ Decrease Header Level (option shift command H)
This action is identical to Increase Header Level, except it decreases the level of header. Decreasing a level 1 header turns it back into a normal line.
Setext headers
To automatically insert an setext underline, type out your header text, hit enter to move to the next line, then type = for a level 1 header or - for a level 2 header and hit tab. The underline is as wide as the text above it.
Text ⟩ Markdown ⟩ Update Setext Underline (control option command H)
Run Update Setext Underline when your cursor is inside of an setext header's underline or text to automatically update the number of characters in the underline to match the new length of the text.
Horizontal rules
On an empty line with an empty line above it, type *, -, or _ and hit tab to automatically insert a horizontal rule using the given character.
List and blockquote actions
In addition to the actions outlined below, Espresso will automatically add a new list element when you hit enter while your cursor is inside of a list item. If you are done adding items to your list, hit enter a second time to exit the list, or if the list is nested inside another, to go back out to that one. A new item in a task list starts with an empty checkbox. If you are working with an ordered list, Espresso will also automatically update the list ordering numbers if you insert a new element in the middle of the list. If you hit the enter key when your cursor is not at the end of the line, Espresso will instead insert a normal linebreak and indent the text to match the leading indentation of the first line of the list. To create an empty new line inside of a list without adding a new list element, use command enter.
The following actions will prefix all selected lines (except empty lines, in the case of the list actions) in order to transform them into blockquotes or lists, or if there is no selection it will convert the current line to a list or blockquote:
- Text ⟩ Markdown ⟩ Blockquote (command "): prefixes lines with
> - Text ⟩ Markdown ⟩ Unordered List (shift command U): prefixes lines with
*, or with the marker of the list they are next to - Text ⟩ Markdown ⟩ Ordered List (shift command O): prefixes lines with
1.,2., etc.
Running a list action on lines that are a list of the other kind changes its kind, and running it on lines that are already that kind of list removes the markers.
Text ⟩ Markdown ⟩ Renumber Ordered List (control option command O)
This action will automatically update all numbers for the ordered list under your cursor so that they flow sequentially starting with 1..
Converting to HTML
Text ⟩ Markdown ⟩ Convert Document To HTML replaces your Markdown with the HTML it stands for. If you have a selection, the action is named Convert Selection To HTML and converts only what is selected; part of a line is converted as text within a paragraph, without paragraph tags of its own. Tables, fenced code blocks, footnotes and strikethrough are converted along with standard Markdown.