A VS Code extension that renders markdown files with beautiful, refined typography and elegant styling. Transform your markdown reading experience into something closer to a literary magazine than a code preview.
- Right-click Context Menu: Right-click any markdown file and select "Open Pretty Preview"
- Live Updates: Preview updates automatically as you edit
- Multiple Themes: Choose from warm, cool, dark, or paper themes
- Configurable Typography: Customize font size, font family, line width, and line height
- Editorial Design: Refined, distraction-free reading experience with:
- Beautiful serif typography
- Generous whitespace and margins
- Elegant code blocks with syntax highlighting
- Sophisticated color palettes
- Subtle paper texture overlay
- Smooth animations and transitions
Install directly from the VS Code Marketplace.
- Clone or download this repository
- Open the folder in VS Code
- Run
npm installto install dependencies - Press
F5to open a new VS Code window with the extension loaded
To create an installable .vsix package:
npm install
npm run compile
npm run packageThen install the generated .vsix file via:
- VS Code > Extensions >
...menu > Install from VSIX
- Open any markdown file in VS Code
- Right-click the file (either in the explorer or in the editor tab)
- Select "Open Pretty Preview"
- The markdown will open in a new editor tab with beautiful styling
Customize the preview appearance in VS Code settings (Cmd+, or Ctrl+,):
Choose a color theme:
warm(default): Cream/sepia tones - cozy and literarycool: Light blue tones - clean and moderndark: Elegant dark theme - easy on the eyespaper: Minimal white - classic and simple
Maximum content width (default: 680px)
- Examples:
680px,45rem,800px - Wider for technical docs, narrower for prose
Base font size (default: 18px)
- Examples:
18px,1.125rem,16px
Font family for body text (default: Georgia, 'Times New Roman', serif)
- Examples:
'Crimson Pro', Georgia, serif- elegant and refined'Merriweather', Georgia, serif- strong and readable'Lora', Georgia, serif- balanced and beautiful
Line height for body text (default: 1.8)
- Examples:
1.6,1.8,2.0 - Higher values for easier reading, lower for density
Add to your VS Code settings.json:
{
"prettymd.theme": "warm",
"prettymd.maxWidth": "680px",
"prettymd.fontSize": "18px",
"prettymd.fontFamily": "'Crimson Pro', Georgia, serif",
"prettymd.lineHeight": "1.8"
}PrettyMD is designed around the principle that reading markdown should be a pleasure, not a chore. The extension:
- Uses refined serif typography for readability
- Provides generous margins and whitespace
- Implements subtle visual details (paper texture, smooth animations)
- Offers multiple themes for different contexts
- Prioritizes distraction-free reading
The aesthetic is inspired by high-end editorial design, literary magazines, and beautifully typeset books.
# Install dependencies
npm install
# Compile TypeScript
npm run compile
# Watch mode for development
npm run watch
# Build VSIX package
npm run packageMIT
Built with:
- marked - Markdown parser
- Beautiful typography from Google Fonts (Crimson Pro, Lora, Merriweather)
- JetBrains Mono for code blocks