How to Set the Default Markdown Editor on Mac
You double-click a .md file and Xcode opens. Or TextEdit. Or whatever installed itself most recently and claimed the file type.
macOS decides this per file extension, and it can be changed permanently in about ten seconds.
The one-click way
TypeFire does it in one click. Open Settings, then General, and next to Default Markdown editor click Set as Default. Every .md file now opens in TypeFire, formatted as you type, and pressing Space on one in Finder previews it without opening anything.
Download TypeFire free for Mac
The manual way
Prefer to do it by hand, or want a different app? This works for any file type, not just Markdown.
- Right-click any
.mdfile in Finder - Choose Get Info, or press ⌘ I
- Find the Open with section and expand it
- Pick the app you want from the dropdown
- Press Change All, then confirm
That is it. Every .md file on your Mac now opens in that app.
The step people miss is Change All. Choosing an app in the dropdown without pressing it only changes that one file, which is why the problem seems to come back.
Why it keeps reverting
Three common causes.
You changed the file, not the type. Without pressing Change All, you set an override for that single file.
An app re-claimed it on update. Some apps, developer tools especially, re-register themselves as handlers when they update. Xcode is the usual culprit. Redo the Get Info steps.
Different extensions. Setting .md also sets .markdown, because macOS files both under one Markdown type. The rarer .mdown and .mkd are separate types as far as Launch Services is concerned, so repeat the process for those, or rename the files.
The nuclear option
If Launch Services has genuinely got confused and nothing sticks, rebuilding its database usually clears it:
/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user
Then restart Finder. This resets all file associations, so treat it as a last resort rather than a first move.
What to actually set it to
Depends on the job:
- Reading and editing both? TypeFire is free, formats as you type, and previews every
.mdfile when you press Space in Finder - Reading mostly? Set an app that renders on open, and separately install a Quick Look extension so you rarely need to open anything at all
- Writing long form? Typora or iA Writer
- Notes and linking? Obsidian
- Files scattered across projects? Something that opens fast and renders immediately, since you are glancing rather than composing
Worth pairing with Quick Look
Setting a default editor solves double-clicking. It does not solve the more common case, which is wanting to read a file without opening anything.
Those two together, a default app for editing and Quick Look for reading, is the setup that actually removes the friction. TypeFire does both: one-click default registration, plus a Quick Look extension so space in Finder renders any .md file.
Download TypeFire free for Mac or read the Markdown tour.
Not on your Mac right now? Read any file in the browser with the free MD reader, or see what a .md file is.
Loved by people who type all day.
Unprompted reactions from users, in their own words.
Used by people at
Company names are places where our users work. They do not imply endorsement or affiliation.