0

これはばかげているかもしれませんが、メモ帳で F5 のようなショートカットを探して、日付タイムスタンプを追加したり、C# ファイルで簡単な要約タスクを実行したりします。

        /// <summary>
        /// Created By: Developer Name
        /// Created On: 12:08 PM 10/28/2013
        /// Pass HTML SELECT control and IsFirstOptionToRemove (optional) to find all its values and displayed text
        /// </summary>
        /// <param name="selectControl"></param>
        /// <param name="IsFirstOptionToRemove"></param>
        /// <returns>retruns dictionary containing key value pairs of select control options. </returns>

これらすべての行がスニペットとして期待されているわけではありませんが、スニペットに現在の日時スタンプを含めることはできますか? カスタム スニペットを動的に変更する方法が見つかりませんでした。

4

1 に答える 1

2

ここで説明されているマクロベースのソリューションがあります。

http://www.dmcinfo.com/latest-thinking/blog/articletype/articleview/articleid/62/net-commenting-macro.aspx

基本的に、次のようなマクロを作成します。

 Sub CommentInitialsDate()
     DTE.ActiveDocument.Selection.Text = "// [INSERT MY INITIALS HERE] " & Format(Date.Today, "yyyy-MM-dd") & " - "
 End Sub

次に、ショートカット キーを割り当てます。

于 2013-10-28T06:56:00.583 に答える