Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Code To MarkdownNew to Visual Studio Code? Get it now.
Code To Markdown

Code To Markdown

DLCHAMP

|
234 installs
| (0) | Free
Copy selected code snippets in ready-to-paste formatting for Discord or Reddit markdown
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Code to Markdown for Visual Studio Code

A simple tool that will take your selected/highlighted code snippet from within VS Code, format it for Reddit or Discord markdown before placing it on your system's clipboard, ready to paste in either program.

The goal of this extension is to provide a utility that helps users always have nicely formatted code blocks when asking for help within various help/support servers and subreddits.

Installation

  • Installing via .vsix file (windows)

    • Download the latest release
    • Open Windows Command Prompt in at the location where you downloaded the file to
    • run code --install-extension code-to-markdown-0.5.5.vsix
  • Installing via VSCode

    • Navigate to Extensions (Ctrl+Shift+X)
    • Search Code to Markdown
    • Install
  • Install via Marketplace Link:

    • Click Here
  • Install via Open-VSX

    • Click Here

Instructions

  1. Select a snippet of code from your project
  2. Right-click and Select Copy for Discord/New Reddit or Copy for Old Reddit
  3. Paste the selected and now formatted code within a Reddit post or comment, or Discord chat box.

Example

Example

Disclaimer and Notes:

  • You can use the "Copy for Discord/New Reddit" or "Copy for Old Reddit" when copying to New Reddit, but you must be in markdown mode. Fancy Pants editor seems to cause weird issues when pasting
  • When using the "Copy for Discord/New Reddit" button, it will include the language for proper syntax highlighting (ex: ```lang {code} ```)
  • When copying functions or code that is indented away from the left margin, be sure to highlight all the way to the margin before copying so that it knows how to properly handle formatting the code under the first line
  • It's only been tested with Python, JS/TS, and JSON. It might work with other languages, but I can't guarantee its success.
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft