[ZZ]Pressing Ctrl+Y deletes a line instead of Redo Fix(VS撤销快捷键CTRL+Y问题)

本文介绍了如何解决VisualStudio在VB环境中使用Ctrl+Y进行重做的问题,该问题会导致意外删除当前整行代码。通过简单地更改键盘映射方案,可以使得Ctrl+Y能够正常实现重做功能。

原文出处:http://www.stellarpc.com/articles/board.aspx?id=39

When you first load Visual Studio on your computer, you are given an environment selection by default to choose from. If you're a VB programmer, the likelyhood is that you chose Visual Basic on the environment list rather than just choosing default. This causes the interface to revert to the way Undo & Redo were handled in VB6 which ironically was not Ctrl+Z and Ctrl+Y. Ctrl+Z certainly does undo, but it looks for Shift+Alt+Backspace for the Redo command. For those of us who are familiar with all other Windows programs like Office, we automatically hit Ctrl+Y to Redo when we undid too much. This poses a problem in Visual Studio under the VB environment because when you accidently try to Redo with Ctrl+Y, it deletes the current line entirely (formerly called Yank Line). Unfortunately, once you've done that, you've lost your entire Redo sequence and will have to retype everything.

To fix this, you simply go to Tools -> Options -> Environment -> Keyboard and set the keyboard mapping scheme to (Default) instead of Visual Basic. Click the Reset button and it takes effect immediately. You can then use Ctrl+Z and Ctrl+Y like all other Windows applications. There are probably some other mappings that change because of this, but I'm not sure which ones. It's possible to have been programming on this setting for months or years without noticing any differences besides the Redo command.

转载于:https://www.cnblogs.com/wk23415/archive/2011/03/29/1998904.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值