Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>MD Viewer — Markdown DirectionNew to Visual Studio Code? Get it now.
MD Viewer — Markdown Direction

MD Viewer — Markdown Direction

Abolfazl Ziaeemehr

|
1 install
| (0) | Free
Control text direction in VS Code's built-in Markdown preview, with Vazirmatn font support.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

MD Viewer — Markdown Direction

Adds RTL/LTR direction controls to VS Code's built-in Markdown preview.

Math supports $...$, $$...$$, \(...\), and \[...\] using VS Code's bundled KaTeX renderer.

Set mdviewer.direction in Settings to one of:

  • auto (default): detect direction separately for each text block.
  • rtl: force right-to-left direction for text blocks.
  • ltr: force left-to-right direction for text blocks.

Code blocks and math formulas remain left-to-right. The extension sets Vazirmatn as the preview font and bundles it for offline use. You can override the font with VS Code's markdown.preview.fontFamily setting.

Open a Markdown preview with Markdown: Open Preview (Ctrl+Shift+V / Cmd+Shift+V).

Package locally

From this directory, run npx @vscode/vsce package to create an installable .vsix file. Install it with code --install-extension <file.vsix>.

To publish it to the Visual Studio Marketplace, first create a Marketplace publisher whose ID matches the publisher field in package.json.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft