DEV Community


Yet another tool for making copy/paste/run experience better (Windows only)

noseratio profile image Andrew Nosenko ・2 min read

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 features 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)

Editor guide