Updated on 2021/07/21. A new #DevComrade feature! I often struggled with formatting while pasting things like code snippets into Microsoft Teams chats (yes, I know about the Ctrl+Shift+V feature of Chromium — still often not good enough). So I've implemented something to address this experience.
Win+Ctrl+Ins now converts the Clipboard text into
<pre>clipboard text</pre> HTML, in place. Then just paste it into Teams with Ctrl+V:
Andrew NosenkoIf you've ever struggled with formatting while pasting something into #MicrosoftTeams chats, you may want to try a new feature of #DevComrade: github.com/postprintum/de…
Win+Ctrl+Ins now converts the Clipboard text into <pre>text</pre> HTML. Then just paste it with Ctrl+V:23:43 PM - 20 Jul 2021
Copy-pasting from online docs, StackOverflow or numerous blogs can be a tedious and sometimes even a dangerous task. Does the following sound familiar: you paste some text from a web page into a Terminal command line, and it gets executed immediately, before you even had a chance to edit it? Only because there was a CR/LF character at the end of the clipboard text.
Or, have you ever been annoyed with broken formatting, indentation, inconsistent tabs/spaces when you paste a piece of code into VS Code, a blog post or an email message? A typical workaround for that is to use the good old
Notepad.exe as a buffer.
I now have two decicated hotkeys for pasting, Win+Ins (paste as single unformatted line, for CLI-based tools) and Win+Shift+Ins (multiple lines), which work uniformly across all apps, shells, and browsers and remove the trailing empty lines and the last CR/LF ending. There are some other useful tricks
DevComrade is capable of.