This web site uses cookies. By using the site you accept the cookie policy.This message is for compliance with the UK ICO law.

Visual Studio
VS 2005+

Visual Studio Task List Shortcuts

Visual Studio's task list is a useful tool when you wish to record tasks that are to be completed at a later time. This feature includes the facility to create task list shortcuts. These are tasks that are linked to a specific line of source code.

Task List

Visual Studio provides a task list that allows developers and teams to record all of the jobs that they need to complete within a development project. The task list shows user tasks, which are created using the add task button, and tasks based upon comments, which use special symbols, such as "// TODO:"

Task List Shortcuts

User tasks are linked to the project and can appear in the task list whenever that project is loaded. They include the option to mark a task as complete but do not allow the task to be linked to a specific area of your source code. Tasks based upon comments permit such a link but only appear when the code containing them is open in the Visual Studio code editor. There is no way to mark comment tasks as completed, other than by editing the comment text or removing it completely.

Task list shortcuts provide a mixture of the features provided by normal tasks and task comments. They can be linked to a line of source code, can be marked as complete and can be seen when the associated code file is not open.

Adding Task List Shortcuts

When creating task list shortcuts it is useful to have the task list pane visible. If you cannot currently see the task list, click the View menu and select "Task List". If you are working with a new project, the task list will contain no items and the only filtering options in the drop-down list will be "Comments" and "User Tasks". The Shortcuts option will appear in this list once you have created your first task list shortcut.

To create a new shortcut, place the text cursor within the line of code to which you wish to link a task. Open the Edit menu and select the Bookmarks submenu. From here, click the "Add Task List Shortcut" option. You should see a symbol appear to the left of the line, marking the position of the new shortcut. You can now edit the task's text by selecting "Shortcuts" from the drop down list in the Task List pane and changing the text in the description column of the new, blank item. NB: If you select some code from a line before creating the task, the description will be set automatically to match the highlighted text.

If you close all of the code editor windows you should see that the task list shortcut is still visible. To return to the code linked to a task, simply double-click the task within the list. To mark the task as complete, click the associated checkbox. The description of the task will be formatted differently to indicate the change of status. You can also remove the task completely by right-clicking it and selecting the Delete option.

31 August 2009