Partager via


“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

Comments

  • Anonymous
    April 25, 2012
    Thanks for sharing this..!
  • Anonymous
    April 25, 2012
    Nice one
  • Anonymous
    April 25, 2012
    How to change the comments to tasks? its not working in mine. Have VS2008
  • Anonymous
    April 26, 2012
    Really nice one. Didn't know that I can add custom tokens.By the way - just checked and things are pretty much the same in Visual Studio 11. Nothing more, nothing less.Best Regards!
  • Anonymous
    April 26, 2012
    Hi AmarHave used taks lists but didn't know abou the TO. Very cool Thanks
  • Anonymous
    October 30, 2012
    Thank you for sharing this post...............