Create Code Shortcuts in the Task List

Keyboard:  CTRL + K, CTRL + H [toggles the shortcut on or off]
Menu:  Edit -> Bookmarks -> Add Task List Shortcut
Command:  Edit.ToggleTaskListShortcut
Versions:  2008,2010
Published:  6/8/2010
Code:  vstipTool0030


You can create shortcuts to lines of code that you want to revisit later.  It's easy!  Just go to any line of code then press CTRL + K, CTRL + H (toggles the shortcut on or off).  This will create the shortcut glyph in the Margin like this:



To see all your shortcuts, go to the Task List (CTRL + \, T) and choose "Shortcuts" from the drop-down list:



Now you should see all your shortcuts:



You can now treat them like any other task and set priority levels as well as mark them complete:



NOTE:  You can RIGHT CLICK any task and choose "Delete" to remove it from the list.

Comments (11)

  1. Steve says:

    Thank you very much for these Task List tips. Great blog you have here.

  2. TRBesser says:

    Sort of strange for VS to support both shortcuts and bookmarks.  It'd be interesting to know why there are two different solutions to what seems like essentially the same user story.  

    I think I like the flexibility of shortcuts better, though bookmarks are more pronounced in the UI.

  3. Ken says:

    I completely agree with TRBesser. I immediately thought, isn't this what bookmarks are for?

  4. zainnab says:

    Good points!  The only thing I can think of is the shorcuts are part of a "one stop shop" in the Task List whereas Bookmarks are in a window all by themsleves.  I haven't confirmed this with the team but that would be my guess.


  5. TRBesser says:

    The funny thing is that I often find myself using Breakpoints for this very purpose!  They're quicker to set in the margin, can be navigated to through the Breakpoints window just like Bookmarks and Shortcuts, and the red lines provide a better visual for locating points in code while scrolling.

  6. Dmitry says:

    for some reason 'comments' are not working for me, ie the list remain empty.

    the language is pure C++ – maybe this is the reason?

  7. Martin Pyle says:

    Same for me. Its not working. the list just stays empty.

    I'm using VS 2005, with Visual Assist X and TabStudio. May be either of those plug-ins is breaking it?

  8. zainnab says:

    Dmitry — shortcuts show up in the shortcut area not comments.  Is that the casue?  

    Martin — same question are you switching to the shortcuts section?  (see step two above)

  9. When I do a build, all my user tasks and code shortcuts are DELETED! This happens in both VS 2010 and VS2012. Anyone have an idea of where I can even start to find out what the heck is going on?

  10. zain says:

    That's strange.  I haven't seen this issue before.  There is no connection between build and these items.  If they ate disappearing I would think something funky is happening with the .SUO file.

  11. gds says:

    I get the same issue as Monte_Christo

Skip to main content