“Task List” and comments

I found something very interesting with Visual Studio from a code-commenting/todo-list perspective. (Which most of you might already know/use, if so – apologies for being late to the party! Smile)

You can open up the “Task List” window and change the option from “User tasks” which is the default to “Comments”. Now, any comment that starts with “Todo” (case insensitive) will be displayed in the “Task List” window along with the file name and line number.

So whenever you want to jump to that particular task, you can just double-click on the “todo” item and you’ll be taken to the appropriate line.

Pretty handy, isn’t it?

image

<Cliché marketing phrase> But wait, there is more!! </Cliché marketing phrase>

I saw the little “!” column in the Task List and thought – it’d be really cool if I can assign priorities to my todo-comments.

I binged to see if that’s possible with “comments” or if it’s just confined to “user tasks” and came across this article.

In a nutshell, this is what you do:

  1. Go to Tools –> Options –> Environment –> Task List
  2. Type in a “name” for the token (like “High”), assign a priority and click “Add”

image

And now, you can add your custom tokens as comments and they’ll show up in the “Task List” along with the priority (which you can sort by!).

Oh, the joy! Smile

image

 

Thanks for reading!

Amar

 

PS: You can follow me on twitter at “_amarnit”, where I share some quick tips/learnings at times! Smile