Skip to content

The Editor

The editor window shows the entire contents of your markdown or MDX files with the exception of the YAML frontmatter and any JSX import lines immediately following the frontmatter. It’s designed to provide an extremely clean writing interface, especially when both sidebars are closed. It provides markdown syntax highlighting and editing features.

The editor might look simple at first glance, but a lot of thought has gone into its design and typography. It uses the wonderful iA Writer Duo variable font, which is better suited to prose than fully monospaced fonts, and the font size and line height adjust automatically to the size of the editor. The typography and colours also adjust appropriately for dark mode, and when there’s enough room the leading ## characters of headings “hang” in the margin.

The editor in light mode at a comfortable width, with the ## markers of a heading hanging in the left margin
At a comfortable width, heading markers hang out in the margin.
The editor in a narrow window, where the font size and line height have reduced to suit the smaller width
Type size and line height adapt as the editor gets narrower.
The editor in dark mode, with typography and colours adjusted for a dark background
Typography and colours adjust automatically for dark mode.

Astro Editor saves your changes shortly after you stop typing, or when you press Command + S Control + S Command + S . The delay is two seconds unless you change Auto-save delay in Preferences to 1, 5 or 10 seconds. While you keep typing, it also saves every 10 seconds, so a long stretch of writing is never far from disk.

It also saves before anything that would lose your changes:

  • Closing a file (the Close File command, or Ctrl+W on Windows and Linux) saves it first. If the save fails, the file stays open.
  • Switching projects saves the open file first. If the save fails, you stay in the current project, and a message offers Switch Anyway, which loses the latest changes.
  • Quitting, in any way, saves first. If the save fails, Astro Editor asks before quitting.

If a save fails, an error says so, and a copy of your unsaved work is kept in the recovery folder.

Screenshot of the command palette

The command palette provides quick access to all major functions in Astro Editor and is especially useful when working in the editor pane. Press Command + P Control + P Command + P from anywhere in the application to open the command palette and start typing to search for a command. See the Commands reference for the full list of what’s available.