4

Hello all :) This is be a petty request, but it is like an itch to me right now for a specific project:

There are shorcuts for copy and paste, but I often find myself moving bits of text between each other in circles. What I do is paste next to what I want to replace (buffer step), and then copy it.

I'm wondering if I can avoid the buffer step make this a one shot operation. Is there a shortcut somewhere that enables me to select text and have it go in the clipboard when I paste over it?

My OS windows, but the question is valid or all OSes, all plugins that could provide this.

Best regards

1
  • 1
    Someone asked a similar question about doing this in Visual Studio. There's no native support but someone linked to an AutoHotkey script to do the swap.
    – User5910
    Commented May 14, 2013 at 16:00

1 Answer 1

0

Here you have AutoHotKey script for that:

^CapsLock:: ;work with clipboard: swap clipboard and selection
    ClipboardOld := ClipboardAll
    Clipboard =     ;empty the clipboard so ClipWait statement can wait until it is filled
    Send ^c
    ClipWait, , 1
    ClipboardNew := ClipboardAll
    Clipboard := ClipboardOld
    ClipboardOld =  ;free the memory in case the clipboard was very large
    Sleep 250   ;wait until Clipboard is updated
    Send ^v
    Sleep 250   ;wait until Paste operation is completed
    Clipboard := ClipboardNew
    ClipboardNew =  ;free the memory in case the clipboard was very large
    Return
  • The hotkey is Ctrl+CapsLock but you can change it to anything else.
    I am using Win+Ctrl+X (dentoed as ^#x which is Ctrl+Win+x)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .