Reputation: 26342
This may be foolish, but i am looking for shortcut like F5 in notepad to add date time stamp, for simple summary task in c# files, for e.g.
/// <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>
i don't expect all these lines as snippet but can i have current date time stamp in my snippet. I didn't find a way to modify custom snippet dynamically.
Upvotes: 0
Views: 2516
Reputation: 11840
There's a macro-based solution described here:
Basically, you make a macro like this:
Sub CommentInitialsDate()
DTE.ActiveDocument.Selection.Text = "// [INSERT MY INITIALS HERE] " & Format(Date.Today, "yyyy-MM-dd") & " - "
End Sub
And then you assign a shortcut key.
Upvotes: 2