A two-pane Markdown editor for macOS, built with gpui and gpui-component.
The rendered preview is always visible; the source editor sits beside it and can be shown or hidden. Files opened from Finder show the preview only by default, so mdp doubles as a Markdown reader.
- macOS 15 or later (a GPUI requirement)
- Rust 1.90+, stable —
rust-toolchain.tomlselects it, so a nightly default toolchain is not used here. Nightly switches onpathfinder_simd's aarch64 SIMD path, which is written against the intrinsics of whichever nightly it was published for and fails to compile against any other. - Xcode Command Line Tools
cargo run # development build
cargo run -- notes.md # open a file
cargo build --release # release binary
./build_app.sh # build/mdp.app, ready to copy to /ApplicationsThe preview comes from gpui-component, built from a small fork — ehamiter/gpui-component: v0.5.0 plus a handful of commits mdp needs — inline code spans rendered in the mono font (upstream can only give them a background), local image sources resolved against the document's directory, and scroll-position accessors that keep the editor and preview panes in sync. Cargo fetches it on the first build and Cargo.lock pins the commit.
build_app.sh uses AppIcon.icns from the repo root. The app bundle is self-contained: Edlo, the themes, and the UI icons are compiled into the binary.
mdp targets macOS, but nothing at its core is macOS-only: gpui and gpui-component both ship Linux backends (X11 and Wayland), and the app builds and runs there unmodified.
cargo run # development build
cargo build --release # release binaryLinking needs the X11/keyboard headers gpui builds against:
sudo apt install libxkbcommon-dev libxkbcommon-x11-devRendering needs a Vulkan-capable GPU and driver. Without one, mesa-vulkan-drivers provides a software (lavapipe) fallback.
There's no Linux equivalent of build_app.sh — it only produces a macOS .app bundle, so on Linux mdp is just the cargo build --release binary. A few things are still macOS-flavored:
- No native menu bar:
gpuidoesn't render one outside macOS, so File/Edit/View aren't visible anywhere. Every action is still reachable by its keyboard shortcut (see below);⌘maps toCtrl. - No
.desktopfile or MIME association, so.mdfiles can't be opened from a file manager into mdp yet. - Settings are saved to
~/.config/mdp/settings.jsoninstead of~/Library/Application Support/mdp/settings.json.
- Editor (left): Markdown source with syntax highlighting, line numbers, and find.
- Preview (right): the rendered document, always visible.
- Drag the divider to change the split; drop a Markdown file on a window to open it.
mdp declares itself a handler for Markdown documents, so it can be set as the default app for .md files in Finder (Get Info → Open With → Change All). Double-clicking a file opens it in a new window — with only the preview showing, unless Settings → General → Show the editor when opening a file is turned on. New, empty documents always open with the editor visible.
Recently opened files are listed under File → Open Recent.
Open with ⌘, or mdp → Settings…. Changes take effect immediately and are saved to ~/Library/Application Support/mdp/settings.json.
- General — show the editor when opening a file.
- Appearance — theme (System, Light, or Dark), preview font, editor font, editor font size, preview font size. The editor is set in Edlo, which ships with mdp; everything else uses the fonts macOS already has — the preview and the app's own chrome in the system font, code in the preview in the system monospace font. Both pickers are searchable and list every font installed on the Mac.
- Editor — line numbers, soft wrap, spaces per tab.
| Shortcut | Action |
|---|---|
⌘N |
New document window |
⌘O |
Open… |
⌘S / ⇧⌘S |
Save / Save As… |
⇧⌘R |
Reveal in Finder |
⌘W |
Close window |
⌘, |
Settings |
⌘F |
Find in the editor |
⇧⌘E |
Show or hide the editor pane |
⌘+ / ⌘- / ⌘0 |
Larger, smaller, or default text size |
⌃⌘F |
Toggle full screen |
⌘M |
Minimize |
⌘Q |
Quit |
Standard editing shortcuts (⌘Z, ⇧⌘Z, ⌘X, ⌘C, ⌘V, ⌘A) work in the editor.
The title bar and the window's close button mark a document as edited. Closing a window or quitting with unsaved changes asks whether to save first, one document at a time. mdp keeps running when its last window closes; clicking the Dock icon opens a new document.
