Visual Studio 2013 中的键盘快捷键自定义 [英] keyboard shortcut customizing in visual studio 2013

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

问题描述

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

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 中的键盘快捷键自定义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆