close
The Wayback Machine - https://web.archive.org/web/20200823193926/https://github.com/postprintum/devcomrade
Skip to content
main
Go to file
Code

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
Aug 22, 2020
Aug 22, 2020
Aug 16, 2020
Aug 5, 2020

README.md

Introduction

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 have 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 some broken formatting, indentation, inconsistent tabs/spaces when you paste a piece of code into Visual Studio Code editor, 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 dedicated hotkeys for that, Win+Ins (paste as single line) and Win+Shift+Ins (paste as multiple lines), which uniformly work across all apps and browsers and remove the trailing empty lines and the last line's CR/LF ending.

One other source of disappointment for me has always been how custom keyboard hotkeys work with Windows Shell shortcuts. 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 has been 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 .config file.

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 elaborately 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.

DevComrade is a free and open-source software licensed under Apache License 2.0. It's built with .NET Core 3.1 SDK and uses Windows Forms for its very simple, context-menu-style UI.

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.

  • Download and unzip the source, or use git to 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:

    .\Package\make-and-run.bat
    
  • Or do that manually:

    dotnet publish -r win10-x64 -c Release --self-contained false -p:PublishTrimmed=false .\DevComrade
    
    start .\DevComrade\bin\Release\netcoreapp3.1\win10-x64\publish\DevComrade.exe
    

Once run, DevComrade shows up as DevComrade Icon icon in the system tray. Some of the features to try out:

  • Press Win+F10 to see the list of the available shortcuts and actions.
  • Copy some code into the Clipboard and try Alt+Ins, to see it pasted into the instant 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.

This tool has been working well for my own personal needs, but outside that its future depends on your feedback. Feel free to open an issue or send me a DM on Twitter.


DevComrade Win+F10 Menu

DevComrade Alt+Ins Notepad

About

DevComrade - A copy/paste/run productivity improvement utility for developers

Topics

Resources

License

Languages

You can’t perform that action at this time.