Skip to content

Repository files navigation

Glim icon

Glim

A minimal, native macOS Markdown editor.

Two modes — clean View and raw Edit. Folder sidebar, offline LaTeX, and Quick Look previews from Finder.

release platform swift license


Glim — View mode: sidebar, tabs, rendered Markdown with KaTeX math and syntax-highlighted code

View / Edit

Toggle with ⌘EView renders KaTeX math, tables, and highlighted code; Edit is the raw source with linting. The sidebar shows the file's folder, and same-folder files open as tabs.

View Edit
View mode Edit mode

Features

  • 🪶 Native & minimal — SwiftUI app, no Electron. Set it as your default .md app in Finder.
  • 👁️ View / Edit — switch with a single toggle (⌘E). View renders cleanly; Edit is raw text with lightweight Markdown linting.
  • 📐 LaTeX math — inline $E=mc^2$ and display $$…$$, rendered offline with KaTeX. No network, ever.
  • 🗂 Folder sidebar — opening a file shows its parent folder's tree. Toggle with ⌘\ (animated). Close it for a distraction-free view.
  • 🔖 Smart tabs — files in the same folder open as tabs; files from a different folder open in a new window. Jump with ⌘1⌘9, cycle with ⌘⌥← / ⌘⌥→.
  • 👀 Quick Look — press space on any .md in Finder for a fully rendered preview (math, tables, syntax-highlighted code).
  • 🎨 GitHub-style rendering — tables, task lists, and syntax highlighting via markdown-it + highlight.js, with automatic light/dark theming.
  • 💾 Remembers window size across launches.

Requirements

  • macOS 14 (Sonoma) or later
  • Xcode 15+
  • XcodeGenbrew install xcodegen

The web rendering assets (markdown-it, KaTeX, highlight.js) are vendored in App/Resources/web/, so no npm install is needed to build.

Install

Download (prebuilt)

Grab the latest Glim.app from Releases (Universal — Apple Silicon + Intel), unzip, and move it to /Applications. The app is signed with a Developer ID and notarized by Apple, so it opens with no Gatekeeper warnings.

Launch it once to register the Quick Look extension. To make it your default Markdown app: right-click a .mdGet InfoOpen withGlimChange All…

Build from source

git clone https://github.com/yeduk3/Glim.git
cd Glim
./install.sh

install.sh builds a Release version, copies Glim.app to /Applications, registers it with Launch Services, sets it as the default handler for Markdown, and enables the Quick Look extension.

To build without installing:

./build.sh            # Release  -> ~/Library/Developer/Xcode/DerivedData/glim-build/...
./build.sh Debug      # Debug

Builds intentionally target DerivedData outside the repo to avoid Spotlight/indexer churn. build/, DerivedData/, and the generated Glim.xcodeproj are git-ignored — project.yml is the source of truth.

Cut a release

One command does the whole flow — bump version, commit, push, build + sign + notarize, install to /Applications, publish the GitHub release, and clean up build artifacts:

./ship.sh 1.1.5                                   # prints a plan, asks to confirm
./ship.sh 1.1.5 -m "release: …" -n notes.md -y    # custom message + notes, no prompt

It bumps MARKETING_VERSION/CURRENT_PROJECT_VERSION in project.yml, reads the Team ID from your Developer ID certificate, and refuses to clobber an existing tag/release. Requires the same signing prerequisites as release.sh (a Developer ID Application cert and a notarytool keychain profile, default glim-notary). The build/sign/notarize step is release.sh; ship.sh wraps the git + install + publish + clean around it.

Usage

Action How
Open a file Double-click a .md in Finder (after install), or drag it onto the app
Toggle View / Edit ⌘E (or the toolbar switch)
Toggle sidebar ⌘\
Open file as tab Click a Markdown file in the sidebar (same folder ⇒ tab)
Next / previous tab ⌘⌥→ / ⌘⌥←
Jump to tab n ⌘1⌘9
Open line below / above in raw editor ⌘↩ / ⇧⌘↩
Move / duplicate raw-editor lines ⌥↑ ⌥↓ / ⌥⇧↑ ⌥⇧↓
Delete raw-editor line(s) ⇧⌘K
Toggle HTML comments in raw editor ⌘/
Quick Look preview Select a .md in Finder, press space

Make Glim the default Markdown app

install.sh does this automatically. To set it manually: right-click any .md in Finder → Get InfoOpen withGlimChange All…

How it works

  • Editor window — SwiftUI. View mode renders Markdown in a WKWebView (markdown-it → HTML, KaTeX for math, highlight.js for code). Edit mode is an NSTextView with soft-wrap and a small line-based linter.

  • Quick Look extension — Finder's QL sandbox won't let a WKWebView spawn its WebContent process, so the extension renders Markdown to fully static HTML in-process with JavaScriptCore (KaTeX is pre-expanded to HTML + base64-inlined fonts) and returns it as a data-based QLPreviewReply. No JavaScript runs at display time.

    The Quick Look extension was built by studying sbarex/QLMarkdown — its working implementation is what revealed the two non-obvious requirements (QLIsDataBasedPreview in the extension Info.plist, and that a sandboxed WKWebView can't be used directly). Many thanks to that project. 🙏

Project layout

App/                     SwiftUI app
  Viewer/                WKWebView renderer (View mode)
  Editor/                NSTextView + Markdown linter (Edit mode)
  Sidebar/               parent-folder file tree
  Resources/web/         vendored markdown-it · KaTeX · highlight.js · texmath
QuickLook/               data-based Quick Look preview extension (JavaScriptCore)
project.yml              XcodeGen project spec
build.sh / install.sh    build & install scripts
release.sh / ship.sh     sign+notarize · one-command release (bump→publish→clean)

Uninstall

rm -rf /Applications/Glim.app

(Reset the default app for .md via Finder → Get Info if desired.)

Credits & Acknowledgements

License

MIT © yeduk3

About

Minimal native macOS Markdown editor — View/Edit, KaTeX math, folder sidebar, smart tabs, Quick Look.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages