5 ms·
Yet another tool for making copy/paste/run experience better (Windows)
- noseratio 6y agoDevComrade is different from many similar utilities (e.g., from Puretext) in how it uses Win32 simulated input API to feed the text into the currently active window, as though it was typed by a person. For example, it works well with Google's Secure Shell App for Chrome.
- AnonHP 6y agoTo the author: This is a really nifty tool. It's also great that it provides the ability to configure custom keyboard shortcuts. I will be trying this soon. > 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. Oh yes, that sounds very familiar! As the description says, I use another buffer (it says notepad.exe) to re-copy the line without the newline and then paste. __________ Aside: Is there a similar tool for macOS? __________ The screenshot also shows a "Prevent Sleep Mode" option. I currently use an app called Caffeine [1] to keep my machine awake (and not automatically lock). I guess DevComrade could replace that too. [1]: https://zhornsoftware.co.uk/caffeine/ https://zhornsoftware.co.uk/caffeine/
- noseratio 6y agoThanks! Prevent Sleep Mode is on my TODO list, same as publishing to Windows Store. I'm not sure if there's a similar tool for MacOS. If there isn't, that'd be a bit of a learning curve for me to implement it :)
- noseratio 6y agoAlso, DevComarade already has a shortcut for Presentation Mode, which just launches Presentationsettings.exe, but that should too keep you PC awake and without locking the screen, if that's what your want.
- TheSpiceIsLife 6y agoI ctrl-L / cmd-L to the URL bar in the browser and do the re-copy from there.
- noseratio 6y agoI used to hit Alt+D or Win+R for that. But now I can do Win+Ins and it pastes a single unformatted line without line breaks anywhere. Works very well for me in the command line, especially when remoting with SSH.
- GordonS 6y agoI did something similar for years, but using the Windows 'run' dialog instead, so I'd select the text, CTRL-C, WIN-R, CTRL-V, CTRL-A, CTRL-X, and then paste in the now unformatted text where I wanted it. Sounds convoluted, but after doing it a few times, muscle memory made it really fast, 2s or so. I discovered PureText a good while back (mentioned by the author), which instead let's me bind WIN-V to paste the current clipboard as unformatted text. Unfortunately the functionality has been a bit unreliable because of Windows updates, so I'll be giving this a try.
- JadeNB 6y ago> Aside: Is there a similar tool for macOS? I don't know the state of Windows terminal emulators, but it seems strange to describe the problem without mentioning the term for the solution, which is 'bracketed paste'. This article discusses how bracketed-paste mode is signalled using ANSI escape sequences, which I guess can work in most macOS terminal emulators (although it's up to the shell to respond): https://cirw.in/blog/bracketed-paste https://cirw.in/blog/bracketed-paste . (I guess that Win+Ins is doing something similar on Windows?)
- stOneskull 6y agojust what i need. thank you.
- Fiahil 6y agoOn MacOS, you can use Flycut (https://github.com/TermiT/Flycut https://github.com/TermiT/Flycut) to manage your clipboard. Just assign it to cmd + shift + v and it will allow you to cycle through your buffers. This is nice when you need multiple items from the same source (say login/password from password manager), instead of doing "copy ; switch ; paste ; switch ; copy ; paste" you can now do "copy ; copy ; switch ; paste ; paste". It's a phenomenal time saver and it will take care of the additional LF at the end, as well!
- jessmay 6y agoOpen URL from clipboard and Insert Guid seem pretty handy.
- noseratio 6y agoThanks! I've added "Insert Guid" merely as an example of how to bind a custom C# script to a menu item or hotkey: <hotkey name="InsertGuid" menuItem="Insert &Guid" isScript="true"> <!-- this is an example of a C# scriptlet handler --> <![CDATA[ await Host.FeedTextAsync(Guid.NewGuid().ToString("B").ToUpper(), Token); ]]> </hotkey>
- thunderbong 6y agoHow does this compare to Ditto? https://ditto-cp.sourceforge.io https://ditto-cp.sourceforge.io
- noseratio 6y agoThat's a good question. I've been a long-time user of PureText, but somehow I've only become aware of Ditto's existence last week, when DevComrade was already in the works :) I've got a quick look and Ditto seem to be capable of doing much more than I personally need, like maintaining the clipboard history (I use Windows' Win+V for that), sharing clipboard over the network and using its own scripting language ChaiScript. OTOH, I'd like to keep the useful functionality of DevComrade at the very bare minimum. I'm also not sure yet about how exactly they do pasting, i.e., if they use Win32 SendInput. That may affects how well Ditto works with terminals and shells. Conveniently, they provide the source code (looks like it is a C++/MFC project), so at some point I'll come up with a better comparison and update the Readme in my repro.
- cel1ne 6y agoWhen I copy a command to paste in the terminal I always start the selection from the end and move left to the start. That way I won't accidentally copy a newline.