Visual Studio auto version commenting on save - comments

Is there a Visual Studio add-in which adds a line of comment at the top of the source file on save with someting like below?
/* Modified # 2011-08-18 12:00 by John Smith - #some text */
Asking for "some text" or confirmation would be nice.
ty!

Yes this feature is available in JustCode for Telerik. You can check http://www.telerik.com/products/justcode.aspx. However this is a paid product and if someone knows of something similar that is free, please let me know.

Related

How to stop Visual Studio 2019 from formatting my comments?

Okay, so, hopefully an easy question here...
Visual Studio, using C++ ... and this is just an annoyance, but I've been putting up with it for three months now, it interrupts my workflow, and I just want it gone...
If I type the beginning of a block comment:
/*
...and press return, Visual studio "helpfully" starts adding asterisks on each line, like so:
/*
*
*
*
And there doesn't appear to correlate with ANY of the options in the C++ text editor settings. Can someone clue me in on how to make it JUST STOP. Thank you.
Okay, there IS an answer, and I was able to find it by using different keywords:
How to disable the automatic asterisk in Visual Studio when adding a multi-line comment in C#?
This answer is no longer correct, but the PROCESS is. For posterity: Export the settings, look for "continuecommentsonenter" and change it to false. Then import the settings again.

How do I make custom comment tokens?

According to this, VS 2008 and 2010 had a feature called Comment Tokens. You can write // TODO document this magic number here and it will appear in your Comments section of the Task List. This part works for me.
However, that article says that you can even define your own tokens, by going to Tools>Options>Environment>Task List .
However, in my Visual Studio 2010 Ultimate, I don't have that option.
How do I make custom comment tokens?
Just check the "Show all settings" checkbox you see at the bottom left of the Options dialog. You now should be able to navigate to "Environment | Task List" to create your custom comments. Here is an additional link How to: Create Custom Comment Tokens

How do I make TODO comments show up in the task list for C++ projects in Visual Studio 2010?

I'm trying to get my TODO comments to show up in the task list in Visual Studio 2010 for a C++ project, but they don't. I looked at this, but see no caveats other than the TODO comments need to be in the currently-open file. For example, creating a new Win32 console app places this:
// TODO: reference additional headers your program requires here
in a new file, stdafx.h. However, there's nothing in the task list.
I have "Comments" chosen from the drop-down in the task list, but it's always empty. And it's not this problem; I can open the file and be looking at the TODO comment in the code editor and no task is shown. This is not a problem for C# projects as TODO comments show up as designed in those projects; this appears to be an issue specific to C++ projects.
What else can I check?
This is off by default 'for performance reasons'. Tools + Options, Text Editor, C/C++, Formatting, Miscellaneous, Enumerate Comment Tasks = True. Feedback article is here.
Also note the comment in the MSDN article about task list comments:
With Visual C++ projects, the Task
List displays only the comments that
are found in the file that is
currently active in the editor.
This is what I got from MSDN:
Hi,
The ‘comments tasks’ in the Task List window is turned off by default
due to performance reasons. You can turn this feature on from
Tools->Options->Text Editor->C/C++->Formatting->
Miscellaneous->Enumerate Comment Tasks.
We apologize for the inconvenience.
Thanks Sumit Kumar Visual C++ Team

Create Hot-Key to insert code

On almost all of my vb files, at some point I have to enter some code which is about 30 characters long. Rather than me having to type all this out, or copy/paste from an existing file, I was wondering whether its possible, in Visual Studio 2010, to assign a Hot-Key to this value such as Ctrl+A+B which will paste this code in for me?
After #Johannes-Rössel's suggestion I had a look into Code Snippets and have now been able to set up my Visual Studio so that when I click [Keyword]+Tab+Tab it inserts my code!
I did this using Code Snippets and the Shortcut facility they have. Very useful!

How do I stop Visual Studio from automatically inserting asterisk during a block comment?

I'm tearing my hair out with this one. If I start a block comment /* in VS.NET 2005+ then carriage return, Visual Studio insists that I have another asterisk *. I know there's an option to turn this off but I just can't find it. Anyone know how to turn this feature off?
Update: this setting was changed in VS 2015 update 2. See this answer.
This post addresses your question. The gist of it is:
Text Editor > C# > Advanced > Generate XML documentation comments for ///
Visual Studio 2015 Update 2 has (finally) addressed this problem!
A new option as been added to Tools > Options > Text Editor > C# > Advanced named Insert * at the start of new lines when writing /* */ comments.
Disabling this option prevents the editor from automatically prefixing block comments with asterisks. It only took 7.5 years and 4 major releases :)
Try this:
#if false
whatever you want here
and here
#endif

Resources