DevComrade is a Windows copy/paste/run productivity improvement tool for developers.
Copy-pasting from the 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.
Now I have two decicated hotkeys for that, Win+Ins (paste as single line) and Win+Shift+Ins (paste as multiple lines), which work uniformly across all apps and browsers and remove the trailing empty lines and the last CR/LF ending.
One other source of disappointment for me has always been how custom keyboard shortcuts are supported in Windows. It is a common struggle to find a convenient hotkey combination that still can be assigned to start a custom app. E.g., it is impossible to use Win+Shift|Alt|Ctrl+Key combos for that. And when it can be assigned, it may take up to 10 seconds for the program to actually start when the hotkey is pressed (of course, we can run
taskkill /im ApplicationFrameHost.exe /f to fix that, if we dare).
DevComrade was made to solve this problem, too. It allows assigning a customizable action to (almost) any hotkey combination, and comes with an extensive set of predefined actions for pasting text and launching apps. Additional actions can be added as C# scriptlets in the
When it comes to pasting text, DevComrade is different from many similar utilities (e.g., from the still-excellent Puretext) in how it uses Win32 simulated input API to elaboratively feed the text into the currently active window, character by character, as though it was typed by a person. For example, it works well with Google's Secure Shell App Chrome extension.
It is still very much a work in progress. Some CI logic for publishing a Chocolatey package (including a code-signed executable) will be implemented soon and this page will be updated.
Meanwhile, feel free to clone this repo, compile it and try it out:
Download and install .NET Core 3.1 SDK, if you haven't got it already.
Clone the repo to a folder of your choice, e.g.:
mkdir DevComradeRepo && cd DevComradeRepo git clone https://github.com/postprintum/devcomrade .
Build and run:
Or do it manually:
dotnet publish -r win10-x64 -c Release start .\DevComrade\bin\Release\netcoreapp3.1\win10-x64\DevComrade.exe
- Press Win+F10 to see the list of the available shortcuts and actions.
- Copy some code into the Clipboard and try Alt+Ins, to paste it into the internal Notepad pop-up window. Hit Esc to simply hide it when finished, or Win+\ to open it again.
- Press Shift+Win+E to open Windows Terminal then Win+Ins to paste the Clipboard's content as a single line of text. It won't get executed until your press Enter.
- Copy any URL into clipboard (e.g., from a console window output, spaces and broken lines are OK), then press Shift+Win+O to open it in your default web browser.