New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
copy/paste with another theme #20837
Comments
Is this related #20811? |
Firstly, we can't just copy the colored text without background as in Dark theme, the font color is light (sometimes just white) so copying white text with no background is not reasonable. You can hardly see anything when pasting it to a light themed application. Visual Studio has three built-in themes, even if you are in Dark theme, the content is always copied with the light theme. So this feature request is actually similar to Copy text with Syntax Highlighting in another specific theme. It's easy to do so as VS gets all ideas about the light theme but for us, as we support third party themes, we cannot decide what theme to use when copy/paste so right now we choose the one users are using at the moment. For short, temporary workaround is switching to the ideal theme you want to copy/paste. In the long term, we can provide an option for users to configure what theme they want to use for copy/paste. But users need to pay the price of this feature: we have to render all lines with correct CSS class/styles if you choose any theme other than the one you are using, it might take a while. |
I think the feature should be that you can set one theme for display, and a separate theme for copy/paste. If nothing else, perhaps there should be a user setting where I can override the theme to apply to copied text. |
I would like to voice my support here -- while I prefer to write code with a dark background, any time I copy/paste it to another app, itll be going against a white background. Neither paste-with-background or paste-without-background are good options, there, and it would really be best to simply copy as if i were using a light theme. |
Copy command should be neutral, copy only text and nothing else more. |
This is becoming too annoying that I'm considering getting back to sublime only because of this tiny issue. Let it be at least configurable like: copyRawTextOnly or something. There are times where we want to copy/paste with language syntax highlight, that is fine. But if the text is ie. Markdown, a .txt file or just a opened unsaved buffer, then it is raw text and nothing else, so avoid styles and coloring in these situation please. |
@fungos and moreover, most text editors I record, do copy/cut operations neutral. To copy stuff with themes, colors, etc, should be a special feature, not the standard option, different from most text editors. |
A simple solution would be to have two capabilities, copy with formatting and copy without formatting, and then let the users decide which one is used when Edit -> Copy is chosen; they can put the other on a different key combination, if desired. |
The summary then:
|
VSCode really lags behind with this feature. Really wish this was present - maybe as someone suggested, that copy+paste works on a default theme always and display has a different theme. |
Adding my voice to the mix, I agree with @oxydron it should be
Text editors that copy plaintext with ctrl-c:
Editors that copy with theme formatting with ctrl-c:
|
This is a big productivity breaker. Copy/Paste into a Gmail email has become very cumbersome. Somehow, I did not notice that until a few months ago. My workaround right now is to paste it into an empty sublime text tab and then copy paste it back to gmail. I really love VSCode, and I am 99% migrated to VSCode, but for this "feature". I think the default should be without style, but even if the default is with style, we should have at least a way to copy text only. |
Plain text copying should be the default. |
why not providing an option to use text copying by default? From #21071 (comment)
p.s. I use dark theme but I usually copy-paste the code as plain text. It's very inconvenient right now and I have to open some other editor and first paste the code there... |
+1 This really is a no-brainer user setting to add, in fact, if nothing else, it should be turned off by default. |
+1. This is a necessity. |
While waiting for a fix, I hacked up an ugly bit of Swift (my first time coding Swift) that removes the background color on OS X. https://gist.github.com/pragdave/6fc95ff2420dea51842717a5da7a98ff |
Is anyone working on this? It's very annoying. It's hard to believe that this is not bothering more people, ;) |
In latest Insiders, you can disable copy with syntax highlighting by setting Right now, we don't have plan to support copying with another theme in the near term. |
This issue is being closed to keep the number of issues in our inbox on a manageable level, we are closing issues that are not going to be addressed in the foreseeable future: We look at the number of votes the issue has received and the number of duplicate issues filed. More details here. If you disagree and feel that this issue is crucial: We are happy to listen and to reconsider. If you wonder what we are up to, please see our roadmap and issue reporting guidelines. Thanks for your understanding and happy coding! |
The config setting which allows switching to a plain text copy |
This is not correct, sadly. I just tested this, copying an xml attribute that is styled as bold and blue. Setting copyWithSyntaxHighlighting to true removes the blue color from the copied text, but the bold format still remains. That is clearly not "plain text". |
@jihu In such case you may try to open new issue, if it is not already covered by one of open or rejected ones. Here "copy with another theme" was rejected, but "copy as a proper plaintext like any sane editor" was not (maybe it was rejected elsewhere!) |
@matkoniecz I did create a ticket after posting that comment: |
I recently found this thread. I solved this issue for myself by setting up a convenient hotkey to toggle the Dark mode. Hit Ctrl + Shift + P to pull up the Command Palette. Search for "Toggle" and you should see the following option appear: "Preferences: Toggle between Light/Dark Themes". You can set a hotkey combo for this function and VSCode will switch between your preferred Light and Dark themes quickly. This makes copying the text while using light theme much quicker, and allows you to switch back to Dark mode for editing quickly. Cheers. |
Turn on default dark them
edit a markdown file
copy, paste text into email
result: the black background of the text is also pasted into the email. I just want the text...
I turned on the dark theme in Visual Studio, copy/pasted some code, and here are the results. the first block of code is the copy/paste from VS, the second is the copy/paste from VS Code:
The text was updated successfully, but these errors were encountered: