http://msdn.microsoft.com/en-us/library/txtwdysk.aspx
工欲善其事,必先利其器
When the Task List is open, you can choose to display user tasks, comments, or shortcuts. The Task List window appears at the bottom of the application window.
To open the Task List
-
On the View menu, choose Task List (Keyboard: Ctrl+\,T).
To display user tasks, comments, or shortcuts
-
Open the Categories drop-down list, and then choose User Tasks, Comments, or Shortcuts.
Note
The options will change based on the programming language you are using and whether or not there are shortcuts set in your code.
You can also customize how the content is displayed by changing the sort order the list, showing or hiding columns, or changing the order in which the columns appear.
To change the sort order of the list
-
Click the header of any column. To further refine your search results, press Shift and click a second column header.
As an alternative, on the shortcut menu, choose Sort by, and choose a header. To further refine your search results, press Shift and choose a second header.
To show or hide columns
-
On the shortcut menu, choose Show Columns. Choose the columns that you want to show or hide.
To change the order of the columns
-
Drag any column header to the location that you want.
User tasks are reminders about work that you want to do or issues that you want to address. You can create user tasks, mark them as complete, and then delete them when they are no longer needed.
To create a new user task
-
With User Tasks selected in the Category drop-down list, choose the Create User Task button in the upper-right corner of the Task List window.
-
Type a description of your user task, and then press Enter.
To change the priority of a user task
-
Click in the Priority column to the left of a task, and then select a new priority setting.
To mark a user task as complete
-
Select the check box to the left of a user task.
To remove a user task from the list
-
Choose a user task. On the shortcut menu, choose Delete.
A comment in your code preceded by a comment marker and a predefined token will also appear in the Task List window. For example, the following C# comment has three distinct parts:
-
The comment marker (//)
-
The token (TODO)
-
The comment (the rest of the text)
//TODO: Load state from previously suspended application
Because TODO is a predefined token, when you choose to display Comments in the Task List, this comment also appears as a TODO task in the list.
To create a new comment
-
In the code, type the comment marker for your code (for example, type // for C# code), a token such as TODO, HACK, or UNDONE, and then complete the comment.
Tip
After you have created the comment, you can double-click the comment in the Task List window to locate it in the corresponding code.
As an alternative, to navigate through the comments in the code, choose a user task in the list, then choose Next Task or Previous Task from the shortcut menu.
By default, Visual Studio includes the following tokens:
-
HACK Indicates a workaround.
-
TODO Indicates something to be done.
-
UNDONE Indicates a reversal or "roll back" of previously changed or updated code.
You can also create your own custom tokens.
To create a custom token
-
On the Tools menu, choose Options.
-
Open the Environment folder and then choose Task List.
The Task List, Environment, Options Dialog Box is displayed.
-
In the Tokens category, in the Name text box, enter your token name.
-
In the Priority drop-down list, choose a default priority for the new token. Choose the Add button.