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

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

问题描述

基本上我想添加一个快捷键来在评论代码上写下我的符号和当前数据+时间,以便将来查看代码更改的时间和人员!我在网上搜索,我找到了打开 KeyBinding.json 文件的选项,可以从工具">修改键盘快捷键"打开或文件">首选项">键盘快捷键"打开 ..但是我的 menu 或 submenu 中没有任何一个 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 中自定义键盘快捷键的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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