Copying Markdown text from Visual Studio Code
Scenario
You’re trying to copy Markdown out of a .md
document in VS Code and the results aren’t as you’d expect when you go to paste elsewhere. I was trying to paste it into Notion and most of the formatting wasn’t honored. Bizarre.
The Fix
Turns out VS Code is trying to be overly helpful and applying syntax highlighting when we copy text. You’re going to want to disable this. On a Mac:
- Code > Preferences > Settings > Text Editor
- Uncheck
Copy With Syntax Highlighting