Copy Code Snippet
The new code snippets look great. I'd like the ability to easily copy an entire snippet. Often they're collapsed, and require expanding, mouse-selecting the entire thing (don't miss something!) and then copying. This should be a single button inside the snippet window. (top-right, opposite the title is my preference).
Echoing BDan's comment... The new behavior of copying the entire code block at all times is terrible. It isn't even the behavior asked for originally, which would have been much better. Where I frequently copied sections of blocks, I now am forced to copy into another editor and do what I need. I don't know of any other application I've used that has this behavior. It's a rather large annoyance to me.
BDan Fairchild commented
This appears to have been implemented by removing the ability to copy only part of a code snippet. Now if you select any part of a code snippet, it puts the entire thing on the clipboard without telling you. This is actively dangerous, as if you're pasting into a terminal it can easily lead to running things you didn't intend.
Fabrice BAUZAC commented
I'm a programmer, and we programmers routinely need to send long text things to other programmers.
Microsoft Teams seems to be very impractical in that regard:
- The text is constrained in a rather short width
- There is apparently no easy way to copy-paste the text so that I can analyze it in a programmer's editor where I have full and appropriate functionality for such kind of text
- In the case of text that span over more than the screen height, the horizontal scroller is outside view. So, whenever I need to scroll the line I'm reading right (to see the actual text) by a width-wide amount, I need to first scroll down to see the horizontal scroller (and my line goes out of view), then scroll horizontally approximately to what I think will be the next horizontal location I want to go to in my line, then go back up to the line I needed to see in the first place. Maybe only to see that I need to scroll right even more to see more text... And repeat for each long line in the text.
Is there any secret technique to ease the life of poor programmers? Any practical way to copy/paste the text to my text editor would be awesome...
Thanks in advance!
Micah Rairdon commented
Definitely would be handy!
Josh Frankland commented
Copying the code is a huge pain for code longer than a few lines and seems like a feature that is actually worse than not using it at all. It's more work to copy from the Code snippet than to send a file or just paste it into a message, which you can at least right-click->Copy.
Raúl Correia commented
I think this should be implemented aswell
Ryan Wakefield commented
This is definitely a necessity with the code snippets. I mean, I got sent 107 lines and I had to highlight all of them to copy the code. I know that is small, but just annoying I can't click a simple button to say "copy code".