2013中自定义键盘快捷键

2013中自定义键盘快捷键

本文介绍了在Visual Studio 2013中自定义键盘快捷键的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

基本上,我想添加一个快捷键以在注释代码上写我的符号和当前数据以及时间,以便将来查看更改代码的时间和对象!我在网上搜索,发现从工具>修改键盘快捷方式或文件>首选项>键盘快捷方式..中打开KeyBinding.json文件的选项可以打开.但是我的菜单或子菜单中没有可用的Option.

Basically I want to Add a short cut key to write my Sign and Current Data + time on the Comment code to see in future when and by whom the code was changed ! I searched on net and i found the option for open the KeyBinding.json file either to Open from Tools > Modify keyboard short cuts or File > Preference > KeyBoard Short cut ..But I am not having either of the Option available in my menu or submenu .

推荐答案

您可以使用我的 Visual Commander 扩展名,以创建此类命令并为其分配快捷方式:

You can use my Visual Commander extension to create such command and assign a shortcut to it:

Sub Run(DTE As DTE2, package As Package) Implements ICommand.Run
    Dim textSelection As EnvDTE.TextSelection
    textSelection = CType(DTE.ActiveDocument.Selection(), EnvDTE.TextSelection)
    textSelection.Text = "My sign " + System.DateTime.Now.ToLongDateString() + " " +
        System.DateTime.Now.ToLongTimeString()
End Sub

这篇关于在Visual Studio 2013中自定义键盘快捷键的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-06 12:45