如何在Visual Studio中将剪贴板内容交换为当前选择 [英] How to swap clipboard contents for current selection in Visual Studio
问题描述
有人知道一种简单方式将当前剪贴板中的内容与当前鼠标选择进行交换吗?
Does anyone know of a simple way to swap whatever is currently in my clipboard with the current mouse selection?
所以可以说我的剪贴板中有文本Foo
.
So lets say my clipboard has the text Foo
in it.
在一行代码public void DoBar() { ...
上,我选择了Bar
On a line of code public void DoBar() { ...
I have Bar
selected
我想要一个简单的组合键,将DoBar()
更改为DoFoo()
,并在剪贴板中保留文本Bar"
(这样,如果我按CTRL-V,它将粘贴Bar
) .
I'd like a simple key combination that changes DoBar()
to DoFoo()
and leaves me with the text Bar"
in the clipboard (so that if I was to press CTRL-V it would paste Bar
).
注意:我不想摆弄任何图形化的东西(即剪贴板切换器,粘贴环).我只需要简单的组合键(因此CTRL-X:剪切,CTRL-C:复制,CTRL-V:粘贴,CTRL-B ?:交换)
Note: I don't want to have to fiddle with anything graphical (i.e. clipboard switcher, paste ring). I'm just after a simple key-combination (so CTRL-X: Cut, CTRL-C: Copy, CTRL-V: Paste, CTRL-B?: Swap)
奖金点是适用于Windows的通用解决方案.
Bonus points for a general solution that works throughout Windows.
推荐答案
我知道您不想要一种涉及安装任何内容的解决方案,但是我在登录该页面时遇到了相同的问题,因此我决定发布一个答案(确实包含gui)
I know you didn't want a solution that involved installing anything, but I landed on this page with the same question, so I decided to post an answer ( that does include a gui )
安装AutoHotKey!
install AutoHotKey!
请参见 http://www.autohotkey.com/board/topic/15-clipboard-hotkey-functions/
亲切的问候
围场
这篇关于如何在Visual Studio中将剪贴板内容交换为当前选择的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!