Skip to content

cghamburg/mdeditor

Repository files navigation

mdeditor

Split-view Markdown editor for macOS — source editing + live WYSIWYG preview, integrated terminal, file tree with git status.

Install

Download .dmg from the latest release, drag mdeditor to Applications. First launch: right-click → Open.

Editor

Two panes synced bidirectionally — type in either, the other updates.

  • Source pane — CodeMirror 6 (markdown grammar, word wrap, inline git diff).
  • Preview pane — Milkdown Crepe (WYSIWYG: tables, lists, code blocks, links).
  • View modes — toolbar segmented control switches between source-only / split / preview-only.

Mermaid diagrams

Fenced code blocks tagged ```mermaid are rendered as live SVG diagrams in the preview pane (flowcharts, sequence, gantt, timeline, mindmap, ER, class, state, pie, quadrant, etc.). Diagram theme follows the editor theme (dark / light).

Source editor toolbar

Hover the upper-right corner of the source editor:

  • Word wrap — toggle line wrapping (persisted).
  • Diff view — inline changes vs last git commit (only visible when changes exist).

Tabs

  • Click any file in the file tree → opens in a new tab.
  • Click a tab to switch. Click ✕ on a tab to close it.
  • Open tabs are restored on restart.

File tree (left sidebar)

  • Single-click file → open as preview tab (italic name in tab bar). Navigating to another file reuses the same tab.
  • Double-click file → pin tab (no longer reused). Editing the file also pins.
  • Single-click directory → expand/collapse.
  • Double-click directory → navigate into it (becomes new root).
  • .. row at top → go up one directory.
  • Folder icon (toolbar) → pick any folder.
  • House icon (toolbar) → jump to home directory.
  • Git status indicators next to filenames: +N -N for changed lines, dot for status, dimmed for untracked. Red ring on directories that are git roots.
  • Spinner in tree header during directory load.

Keyboard navigation

Focus the tree (click anywhere in it), then:

  • / — move selection. Selecting a file opens it as a preview tab.
  • — expand a collapsed directory, or descend into an expanded one.
  • — collapse an expanded directory, or jump to the parent.
  • Enter — pin the selected file (or toggle the directory).

Search

Cmd+F opens a search panel in the sidebar that scans all .md files under the current root — by filename and by content.

  • Type ≥2 characters to search (debounced).
  • / or Enter / Shift+Enter — move through file matches; each is opened as a preview tab.
  • Cmd+G / Shift+Cmd+G — next / previous file match (works from anywhere in the app).
  • Esc — close search.
  • Filename matches are tagged with an f badge and shown first.

Integrated terminal

Toggle with the toolbar button or Cmd+J. Position toggle ( / ) switches between left-of-editor and bottom-of-editor.

  • SplitsCmd+D split right, Cmd+Shift+D split down. Cmd+W close focused split.
  • OSC 7 cwd tracking — if your shell emits OSC 7 on cd, the file tree follows the terminal's working directory automatically (debounced).
    • Enable in zsh: add precmd() { print -Pn "\e]7;file://%M%d\e\\" } to ~/.zshrc.
  • Closing the last terminal hides the pane.
  • Terminal layout, splits, and last cwd are restored on restart.

Status bar

  • Shows path of currently open file. Click the path to copy it to the clipboard.
  • Last modified timestamp + app version on the right.

Saving

  • Cmd+S — save now.
  • Auto-save 1s after last edit.
  • External file changes are detected and reloaded if you have no unsaved changes.

Keyboard shortcuts

Shortcut Action
Cmd+S Save current file
Cmd+F Open workspace search
Cmd+G / Shift+Cmd+G Next / previous search match
Cmd+J Toggle integrated terminal
Cmd+D Split focused terminal vertically
Cmd+Shift+D Split focused terminal horizontally
Cmd+W Close focused terminal split
↑ ↓ ← → Navigate file tree (when focused)
Enter (in tree) Pin selected file as tab

Theme

Sun/moon icon (top-right) toggles dark/light. Persisted.

Help

? button (top-right) opens this README in a modal.

Persistence

Restored on restart: open tabs, active file, expanded directories, last directory, theme, word wrap, terminal layout + cwd, window position/size.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors