Vscode

Copy and paste from VSCode without the background

Copy and paste from VSCode without the background

When you paste code, copied from VSCode, you can unfortunately get the background colour as well

text

To get round this, you can copy the code into an application that doesn’t allow formatting, like Notepad. This will remove the background colour and the rest of the formatting and will allow you to past it into your desired application. while this works, its not ideal.

text

This is something that really annoys me, so I often do a quick Bing search to see if there are any solutions. Yesterday I came across

this on GitHub. The important part is the excellent suggestion below by @rebornix

text

What this settings change does, is to allow you to copy and paste from VSCode without any formatting or syntax high lighting. This still isn’t perfect, but it cuts out the step using Notepad.

To enable this, open VSCode (I’m using the insider version, but it will work in both) and browse to File > preferences > Settings

text

Type editor.copyWithSyntaxHighlighting in the search bar and then untick the box labelled Controls whether syntax and then close the settings page

text

You can now copy and paste without the black background (and the code highlighting obviously)

text

Like I said, not a fix, but a shorter work around. Thanks @rebornix