There doesn't seem to be a way to turn off the default behavior of copy/pasting with syntax highlighting. Some users may have a workflow where they want to paste text into an external rich edit text box (like a web form) without the extra formatting but there doesn't seem to be a way to turn this off right now.
/cc @rebornix @RamblingCookieMonster
Duplicate of #21071.
There are two actions in VSCode:
editor.action.clipboardCopyActionedtior.action.clipboardCopyWithSyntaxHighlightingActionWe can bind one of them to Ctrl+C. So that if clipbordCopyAction does copy without formatting, everything would be okay.
It seems that this does not works on 1.18.0. I've set those variables in "keybindings.json":
{
"key": "ctrl+shift+alt+c",
"command": "editor.action.clipboardCopyWithSyntaxHighlightingAction"
},
{
"key": "ctrl+c",
"command": "editor.action.clipboardCopyAction"
}
but when I'm hitting Ctrl+C and pasting the clipboard in the rich edit (such as web form or a word/excel), I've got the highlighted text instead of just the text only. The ctrl+shift+alt+c does the same thing as the Ctrl+C.
How to get it working to copy without format?
How to get it working to copy without format?
Hello, please how do I set copy to not pick up formatting???
In case anyone else comes here - I still haven't found an answer to this outside work arounds, e.g., pasting the clipboard into a plain-text file and copying it again. I made an extension called "CopyPlainText" as a less annoying work around which adds a command palette for this.
Thx @xan1000 - ur extension is working well for me
Thx for creating extension for this @xan1000 , I will check it.
@xan1000 wow thx a lot! It just works.
I'd just like to point out that I really think this is a bug with respect to the default behavior of VS Code. Right now, we have two commands:
To me, that would imply that the plain "Copy" is copy without syntax highlighting. But that doesn't seem to be the case.
Yes this is bug and needs attention!
This shouldn't be hard to fix, so I hope it'll happen soon!
I would help us all. We want to be happy users of Visual Studio code. How
should we help to make it solve?
st 29. 8. 2018 v 2:19 odesÃlatel linhtto notifications@github.com napsal:
This shouldn't be hard to fix, so I hope it'll happen soon!
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/Microsoft/vscode/issues/21820#issuecomment-416781832,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AGUV8B25SKbZQ4OhzGOeBYMEWZkwyIcNks5uVd4TgaJpZM4MRao3
.
With this great PR https://github.com/Microsoft/vscode/pull/54155, we can now disable the copy with syntax highlighting behavior by setting editor.copyWithSyntaxHighlighting to false from tomorrow's Insiders and next Stable. Command "Copy With Syntax Highlighting" would always work not matter of the value of this setting, so you can bind another specific keybinding for this command.
Lastly thanks for all your patience, feedback and great contribution to this issue. Happy Coding!
Thanks a lot guys for fixing this!! Rly appreciate this.
Not working for me in 1.27.2
@danvoyce it will work with next Stable version 1.28. For now you need to use Insiders version.
Most helpful comment
How to get it working to copy without format?