I am running Visual Studio Code on Linux Ubuntu (on virtual machine). The host machine is Windows 10.
Seems VSC for Linux Ubuntu offers some default syntax highlighting for terminal output (at least I do not remember that I have installed any extension for this), as follows:

How to copy terminal output to Microsoft Word/Outlook (on host machine) keeping this colourization and formatting? To copy terminal output I am just using right click mouse and then Copy
In v1.66, see the release notes
Copied text retains HTML styling
To copy rich text from the terminal, run the
Terminal: Copy text as HTMLcommand or use the terminal context menu entry Copy text as HTML.
BUT the actual command is:
Terminal: Copy Selection as HTML`
You have to select your desired text first and then trigger the command.
It is unbound by default, the command is workbench.action.terminal.copySelectionAsHtml.
Copy as HTML.
Note that I have this setting set to
default:Terminal >Integrated: Right Click Behavior
Oddly, vscode's "default" for that setting is
copyPasteNOTdefault??. I get better results if I actually change that setting todefault.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With