Did you know… you can create keyboard shortcuts to navigate among the various Task List categories? (View.NextTask and View.PreviousTask) - #179
Visual Studio comes with two commands for navigating among the various things in the task list: View.NextTask and View.PreviousTask.
As we’ve explored more than you ever wanted to know about the task list, you now know that the task list has several categories: User Tasks, Comments, and Shortcuts. These commands will only navigate among items of a given category, so you won’t jump from shortcuts to user tasks.
Note that these commands are not bound to a keyboard shortcut by default in the General Development Settings, so you’ll need to bind them yourself (if using that profile).
- Go to Tools – Options – Environment – Keyboard, and in the Show Commands Containing edit box, type in the command View.NextTask
- Do a sanity check whether the settings you are using already have the command bound to a keyboard shortcut. If it is, you’ll see it in Shortcut currently used by read-only edit box.
- If not, in the Press Keyboard Shortcut edit box, type in your preferred shortcut, and press Assign. If you only want this command to work in the editor (and not anywhere else in VS, use the "text editor" scope under the "Use new shortcut in" drop down)
Rinse and repeat for View.PreviousTask. For me, I used Ctrl+Alt+N, only because it wasn’t bound to anything in the General Development Settings. For Previous, i highly recommend just adding the Shift key (these keys, shift, alt, ctrl, etc, are called something, and i cannot remember, argh) to whatever you come up with, since any backward navigation usually has "shift" in it.
Also, something else to note, since we had to test for it, is that the Visual Studio Status Bar will update with the name of the Comment when you use View.NextTask or View.PreviousTask.
Technorati Tags: VS2005Tip,VS2008Tip
Comments
Anonymous
March 25, 2008
RE: "(these keys, shift, alt, ctrl, etc, are called something, and i cannot remember, argh)" Modifiers? (http://msdn2.microsoft.com/en-us/library/system.windows.input.modifierkeys.aspx)Anonymous
March 25, 2008
Modifiers. Is that the word you're looking for?Anonymous
March 25, 2008
I believe "modifiers" is in fact the correct term for these keys, as already stated by molotov and Carl Clark. Although I prefer the term "claw hand keys" =D Thanks for the tips, enjoying the series, picked up several little bits already that have helped me work quicker =)Anonymous
March 25, 2008
The comment has been removedAnonymous
March 25, 2008
Sara, Sorry if this has been asked before. What would really be helpful is if I could see all TODO: items instead of per active file. Thanks!Anonymous
March 27, 2008
Yes, Andy, that is one of my major gripes, too. It seems to defeat the purpose of the comments list to have to open each file in your project or solution to see if there's anything to do there. I second the motion.Anonymous
March 27, 2008
The comment has been removedAnonymous
December 28, 2008
本篇包括tip171-tip180http://www.watch-life.net/visual-studio/visual-studio-2008-tip-day-18.html#171、在任...