您可以使用我的Visual Commander扩展来创建这样的命令并为其分配快捷方式:
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



