Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>README Markdown ViewerNew to Visual Studio Code? Get it now.
README Markdown Viewer

README Markdown Viewer

NodeNest

|
73 installs
| (0) | Free
Automatically renders README.md files as Markdown webviews
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

README Markdown Viewer Extension

A VS Code extension that automatically detects when README.md files are opened and displays them as beautifully rendered Markdown in a webview instead of the default text editor.

Features

  • Automatic Detection: Automatically detects when README.md files (case-insensitive) are opened
  • Markdown Rendering: Uses VS Code's built-in markdown renderer to display rich formatting
  • Live Updates: Content updates automatically when the README file is modified
  • VS Code Theming: Respects your VS Code theme colors and styling
  • No User Interaction Required: Works silently in the background

How It Works

  1. Open any README.md file in VS Code
  2. The extension automatically:
    • Closes the default text editor for the README file
    • Opens a webview panel with the rendered Markdown content
    • Updates the content live as you edit the file

Installation

  1. Clone this repository
  2. Open the project in VS Code
  3. Run npm install to install dependencies
  4. Press F5 to run the extension in a new Extension Development Host window

Development

Building

npm run compile

Running

  • Press F5 to open a new window with your extension loaded
  • Open any README.md file to see the extension in action

Testing

  • Open the debug console in VS Code (Ctrl+Shift+Y) to see logging output
  • Make changes to src/extension.ts and reload (Ctrl+R) to see changes

Technical Details

Architecture

  • File Detection: Uses workspace.onDidOpenTextDocument to detect when files are opened
  • Webview Creation: Uses window.createWebviewPanel to create the markdown preview panel
  • Markdown Rendering: Uses VS Code's markdown.api.render command for consistent rendering
  • Editor Management: Uses workbench.action.closeActiveEditor to close the default text editor

Key Components

  • README Detection: Case-insensitive detection of files named "readme.md"
  • Webview Management: Tracks open webview panels to prevent duplicates
  • Live Updates: Monitors document changes and updates webview content
  • Styling: CSS that respects VS Code theme variables for consistent appearance

Requirements

  • VS Code 1.101.0 or higher
  • No additional dependencies required

Known Issues

  • If VS Code's markdown renderer is unavailable, falls back to plain text display
  • Very large README files may take a moment to render initially

Release Notes

0.0.1

Initial release featuring:

  • Automatic README.md detection and rendering
  • Live content updates
  • VS Code theme integration
  • Background operation without user commands

Contributing

Feel free to contribute to this extension by:

  • Reporting bugs
  • Suggesting new features
  • Submitting pull requests

License

This extension is provided as-is for educational and practical use.


Following extension guidelines

Ensure that you've read through the extensions guidelines and follow the best practices for creating your extension.

  • Extension Guidelines

Working with Markdown

You can author your README using Visual Studio Code. Here are some useful editor keyboard shortcuts:

  • Split the editor (Cmd+\ on macOS or Ctrl+\ on Windows and Linux).
  • Toggle preview (Shift+Cmd+V on macOS or Shift+Ctrl+V on Windows and Linux).
  • Press Ctrl+Space (Windows, Linux, macOS) to see a list of Markdown snippets.

For more information

  • Visual Studio Code's Markdown Support
  • Markdown Syntax Reference

Enjoy!

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft