Swap and PasteSometimes it's useful to be able to swap two pieces of code. This extension simply copies anything selected when pasting and inserts it in the paste buffer. Note: Only works with single selections - multiple selections would get too complicated! Overrides the default cut, copy, paste and undo key bindings. If you want to use in conjunction with another clipboard extension, set the appropriate commands as per the configuration below. InstallingYou can install the latest version of the extension via the Visual Studio Marketplace here. Alternatively, open Visual Studio code, press
Source CodeThe source code is available on GitHub here. Configuration
If there is no selection when pasting, this command is executed instead. This allows you to use an alternative clipboard extension if required. Defaults to the standard
When copying the selected text, the extension will call this command after copying the selection to it's own clipboard. Defaults to the standard
When cutting the selected text, the extension will call this command after copying the selection to it's own clipboard. Defaults to the standard
If you paste accidentally, undo will swap the selections back. The default is to call the standard undo command afterwards, but this can be overridden using this setting if required.
Normally, if xxx is copied and then pasted when yyy is selected, yyy is copied into the clipboard for the next paste. This is problematic if you want to do multiple replacements, so if yyy is selected subsequently again, xxx will be repasted. If you want to always swap yyy for xxx regardless of the previous paste contents, then set this false.
Set to true to create a debug log in the Output panel. CreditsIcon made by Freepik from www.flaticon.com |