Create Code Shortcuts in the Task List

Tips Search

Create Code Shortcuts in the Task List

  • Comments 11

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:

image

 

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

image

 

Now you should see all your shortcuts:

image

 

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

image

 

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

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

  • 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.

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

  • 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.

    Z

  • 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.

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

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

  • 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?

  • 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)

  • 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?

  • 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.

  • I get the same issue as Monte_Christo

Page 1 of 1 (11 items)
Leave a Comment
  • Please add 8 and 6 and type the answer here:
  • Post