by dattiimo · 3y ago · 0 comments
;; Text–only paste from ClipBoard
;; (https://autohotkey.com/board/topic/10412-paste-plain-text-and-copycut/)
;; ctrl + shit + v
^+v::
Clip0 = %ClipBoardAll%
ClipBoard = %ClipBoard% ; Convert to text
Send ^v ; For best compatibility: SendPlay
Sleep 150 ; Don't change clipboard while it is pasted! (Sleep > 0)
ClipBoard = %Clip0% ; Restore original ClipBoard
VarSetCapacity(Clip0, 0) ; Free memory
Return
[Edit: tried to fix formatting] SendInput {Raw}%ClipBoard%`for the latter programs having the default be paste with formatting seems fine. yes, i'll paste stuff from the web without formatting. But copying/cutting/pasting within the same document is also a pretty common interaction and if i'm cutting something non-trivial (eg. google docs table/nested lists), i don't want to paste it back into google docs as a bunch of regular, separate lines.
would also love to get a mult-value clipboard (e.g. my last 5 clips) but... that's asking a lot i guess. ;-)
https://support.microsoft.com/en-us/windows/clipboard-in-win...
..is there a way to bring that back?
cmd-space, cmd-v,cmd-a,cmd-x (buffer is now stripped)
I have cmd-shift-v mapped to my clipboard history which is fully searchable, I use Raycast on Mac but I would wager there are Linux and Windows alternatives.