This is the primary reference for all keyboard shortcuts.
These shortcuts work anywhere in the app, regardless of what’s focused.
| Shortcut |
Action |
| Command + S CmdS Control + S CtrlS Command + S CmdS |
Save current file |
| Command + N CmdN Control + N CtrlN Command + N CmdN |
Create new file in the current collection |
| Command + W CmdW Control + W CtrlW Command + W CmdW |
macOS: close the window (click the Dock icon to bring it back as it was). Windows and Linux: close the current file |
| Command + P CmdP Control + P CtrlP Command + P CmdP |
Open the command palette |
| Command + Shift + O CmdShiftO Control + Shift + O CtrlShiftO Command + Shift + O CmdShiftO |
Show the project list, to switch projects or open a folder |
| Command + Comma Cmd, Control + Comma Ctrl, Command + Comma Cmd, |
Open preferences |
| Command + 1 Cmd1 Control + 1 Ctrl1 Command + 1 Cmd1 |
Toggle the left sidebar |
| Command + 2 Cmd2 Control + 2 Ctrl2 Command + 2 Cmd2 |
Toggle the frontmatter panel |
| Command + 0 Cmd0 Control + 0 Ctrl0 Command + 0 Cmd0 |
Focus the main editor |
| Control + Command + F CtrlCmdF F11 F11 Control + Command + F CtrlCmdF |
Toggle full screen |
These shortcuts work when the editor is focused.
| Shortcut |
Action |
| Command + B CmdB Control + B CtrlB Command + B CmdB |
Toggle bold |
| Command + I CmdI Control + I CtrlI Command + I CmdI |
Toggle italic |
| Command + K CmdK Control + K CtrlK Command + K CmdK |
Insert or edit a link |
| Command + Shift + K CmdShiftK Control + Shift + K CtrlShiftK Command + Shift + K CmdShiftK |
Open the Content Finder |
| Command + Slash Cmd/ Control + Slash Ctrl/ Command + Slash Cmd/ |
Insert MDX component (in .mdx files) or toggle comment |
These operate on the line or paragraph under the cursor.
| Shortcut |
Action |
| Option + Command + 1 OptCmd1 Alt + Control + 1 AltCtrl1 Option + Command + 1 OptCmd1 |
Heading 1 |
| Option + Command + 2 OptCmd2 Alt + Control + 2 AltCtrl2 Option + Command + 2 OptCmd2 |
Heading 2 |
| Option + Command + 3 OptCmd3 Alt + Control + 3 AltCtrl3 Option + Command + 3 OptCmd3 |
Heading 3 |
| Option + Command + 4 OptCmd4 Alt + Control + 4 AltCtrl4 Option + Command + 4 OptCmd4 |
Heading 4 |
| Option + Command + 0 OptCmd0 Alt + Control + 0 AltCtrl0 Option + Command + 0 OptCmd0 |
Remove heading (plain paragraph) |
| Shortcut |
Action |
| Command + Shift + F CmdShiftF Control + Shift + F CtrlShiftF Command + Shift + F CmdShiftF |
Toggle focus mode |
| Command + Shift + T CmdShiftT Control + Shift + T CtrlShiftT Command + Shift + T CmdShiftT |
Toggle typewriter mode |
These handle find and replace within the current document.
| Shortcut |
Action |
| Command + F CmdF Control + F CtrlF Command + F CmdF |
Open search |
| Command + G CmdG Control + G CtrlG Command + G CmdG |
Find next match |
| Command + Shift + G CmdShiftG Control + Shift + G CtrlShiftG Command + Shift + G CmdShiftG |
Find previous match |
| Enter Enter Enter Enter Enter Enter / Shift + Enter ShiftEnter Shift + Enter ShiftEnter Shift + Enter ShiftEnter |
Find next / previous (while the search field is focused) |
| Escape Escape Escape Escape Escape Escape |
Close the search panel |
| Shortcut |
Action |
| Command + Z CmdZ Control + Z CtrlZ Command + Z CmdZ |
Undo |
| Command + Shift + Z CmdShiftZ Control + Shift + Z CtrlShiftZ Command + Shift + Z CmdShiftZ |
Redo |
| Command + Right Square Bracket Cmd] Control + Right Square Bracket Ctrl] Command + Right Square Bracket Cmd] |
Indent |
| Command + Left Square Bracket Cmd[ Control + Left Square Bracket Ctrl[ Command + Left Square Bracket Cmd[ |
Dedent |
| Command + A CmdA Control + A CtrlA Command + A CmdA |
Select all |
| Command + D CmdD Control + D CtrlD Command + D CmdD |
Select next occurrence of the selection |
| Command + Shift + L CmdShiftL Control + Shift + L CtrlShiftL Command + Shift + L CmdShiftL |
Add cursors to selected line ends |
| Command + Option + G CmdOptG Control + Alt + G CtrlAltG Command + Option + G CmdOptG |
Go to line |
| Tab Tab Tab Tab Tab Tab |
Insert tab or jump to next snippet field |
| Shift + Tab ShiftTab Shift + Tab ShiftTab Shift + Tab ShiftTab |
Jump to previous snippet field |
| Action |
Effect |
| Option Opt Alt Alt Option Opt + hover over image path |
Preview the image |
| Option Opt Alt Alt Option Opt + click a URL |
Open the URL in your browser |
| Command Cmd Control Ctrl Command Cmd + click |
Add another cursor |
These shortcuts work when the component builder dialog is open.
| Shortcut |
Action |
| Enter Enter Enter Enter Enter Enter |
Open the selected component’s form |
| Command + Enter CmdEnter Control + Enter CtrlEnter Command + Enter CmdEnter |
Insert the component (in its form) |
| Escape Escape Escape Escape Escape Escape |
Go back to the component list from a form, or close the builder from the list |
These shortcuts work when the project list is open.
| Shortcut |
Action |
| Enter Enter Enter Enter Enter Enter |
Open the highlighted project |
| Command + O CmdO Control + O CtrlO Command + O CmdO |
Open Folder…, to open a project for the first time |
| Command + Backspace CmdBackspace Control + Backspace CtrlBackspace Command + Backspace CmdBackspace |
Remove the highlighted project from Astro Editor, after asking. The open project can’t be removed |
These shortcuts work when the Content Finder dialog is open.
| Shortcut |
Action |
| Enter Enter Enter Enter Enter Enter |
Open the selected file |
| Command + Enter CmdEnter Control + Enter CtrlEnter Command + Enter CmdEnter |
Insert a link to the selected file |