Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I add a high-priority TODO comment in Visual Studio?

Adding a comment such as this:

// TODO: Refactor this code 

...creates a task in the Task List that I can view etc. There is a column labeled ! that lets you sort these tasks by priority.

How can I set a specific task's priority?

like image 925
aarona Avatar asked Mar 21 '11 16:03

aarona


People also ask

How do you write todo in code?

Comments are lines of text in code that start with a specific set of characters like “//” in Javascript or java. TODO comments are just code comments that start with a single string of capital letters like // TODO or // FIXME.


2 Answers

The priority of the task depends on the keyword you use to tag it. You can see and edit a list of keywords and their priorities by going to Tools->Options->Environment->Task List.

For example, on my installation, I've got HACK, TODO and UNDONE as normal priority, and UnresolvedMergeConflict as high priority.

If you want to add a new tag, type it into the "Name" box, choose a priority, and then click "Add".

like image 113
thomson_matt Avatar answered Nov 16 '22 01:11

thomson_matt


A cheap hack is to always put a priority just after the the TODO tag, then sort by description. Only use priority 1-9 to avoid alphabetic sorting confusion.

Any comments without a priority will drop to the bottom.

(Click to enlarge the image)

TODO priority hack

like image 35
RockResolve Avatar answered Nov 16 '22 00:11

RockResolve