DEV Community

Andrew Nosenko
Andrew Nosenko

Posted on • Updated on

Meet DevComrade, yet another Windows Clipboard productivity tool

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:

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.

If the answer is yes, you may want to try out a little productivity improvement tool called DevComrade, a side project of mine which I've just open-sourced.

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.

As I've been lately working more and more with WSL2, Windows Terminal and various command line tools, I've become pretty much dependent on DevComrade. Give it a try, hope you'll find it useful, too.

Discussion (0)