关于Keil 的快速注释功能,并为其添加快捷键

来源:互联网 发布:js变量为undefined 编辑:程序博客网 时间:2024/06/13 08:25

原地址:http://blog.sina.com.cn/s/blog_6859cadf0101i3p4.html


Keil版本uVision 4.03


(原文件名:KeilShortcuts.jpg) 
在Keil->Edit->Advanced中有两项 Comment Selection /Uncomment Selection 其作用是注释所选代码,与取消注释代码的作用。

(原文件名:QQ截图未命名.jpg) 
可以看到图中这两项并没有快捷键可以用,使用起来非常不方便。下面讲解如何为这两项加入用户自定义快捷键。
打开Keil->Edit->Configuration,如图

(原文件名:KeilShortcuts-1.jpg) 
找到并切换到Shortcuts选项卡

(原文件名:KeilShortcuts-2.jpg) 
在Select a command 中找到 Edit:Advanced:Comment Selection 点击Creat Shortcut 按下你喜欢的快捷键(例如Ctrl+Shift+C),点击OK,同理可设置Unomment Selection ,具体可参见附图。

(原文件名:KeilShortcuts-3.jpg) 


(原文件名:KeilShortcuts-4.jpg) 


(原文件名:KeilShortcuts-5.jpg) 


(原文件名:KeilShortcuts-6.jpg) 

查看Keil->Edit->Advanced->Comment Selection /Uncomment Selection,可以看到快捷键已经设置成功。(*^__^*)
原创粉丝点击