Did you know… You can do multi-column sorting (secondary sort, etc.) in both the Error List and Task List – #183

Both the Error List and the Task List have support for multi-column sorting, like secondary sort (and can someone remind me what’s the term for 3rd-ary – the term that comes after secondary). 

For example, you want to sort all Tasks (or Errors) by File first, then by Line Number, so you can go through each file in the order in which the Tasks (or Errors) appear.

To do a secondary sort

  1. Click on the column that you wish to have as primary sort (like File)
  2. Shift+Click on the next column you wish to have as secondary sort (like Line Number)
  3. Rinse and Repeat for other columns

For the Task List, you can see how things are sorted first by File, then by Line number.

Task List displaying secondary sort

Same for the Error List

Error List Displaying Secondary Sort

Technorati Tags: VS2005Tip,VS2008Tip

Did you know… You can use Ctrl+Shift+F12 to view the next Error listed in the error list – #181

In the General Development Settings, the keyboard binding is Ctrl+Shift+F12, so your mileage may vary depending on which settings you are using.  You can go to Tools – Options – Keyboard to figure it out.

The command is View.NextError.  I’m a little surprised that there isn’t a default keyboard shortcut for View.PreviousError.  You can always add one yourself.

View.NextError in Tools Options Keyboard

And of course, the status bar tries to be helpful by showing you the error you have navigated to.  =)

ErrorListNextError2

Technorati Tags: VS2005Tip,VS2008Tip

Did you know… How to customize your Error List view? – #180

This was one of my least favorite designs in the VS environment.  When the Error List was split from the Task List, a row of buttons was put on the top of the Error List for users to customize whether they just wanted to see Errors, Warnings, or Messages.

For example, here’s the default with everything enabled.

Error List all views enabled

And now, here’s the Error List with nothing enabled for dramatic effect.

Error List All views disabled

Technorati Tags: VS2005Tip,VS2008Tip

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.

Task List Categories Drop down

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

View.NextTask command

  1. Go to Tools – Options – Environment – Keyboard, and in the Show Commands Containing edit box, type in the command View.NextTask
  2. 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.
  3. 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. 

Status Bar Updates

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

Did you know… You can create Shortcuts in your Task List – #178

This is another one of those features i didn’t know about until someone showed me.  You can store shortcuts in your Task List, and can even use them as tasks to scratch off, if you want.  And just like user tasks, shortcuts are saved in your solution .suo file, so they won’t get checked into source control.

To create a Task List Shortcut, go to the desired location in your editor (can be any line of code or comment) and then go to Edit – Bookmarks – Add Task List Shortcut.

Add task list shortcut menu item

Now you’ll notice the "shortcut" glyph appear. 

Shortcut Editor Glyph

And now in the Task List, you’ll see a new category called "Shortcuts."

Shortcuts in the Task List

And as illustrated above, you can also rename these shortcuts by double-clicking on the description (or tabbing to the description field for keyboard users). 

Now here’s the question i have.  When would you use a bookmark and when would use a task list?  I’ve sent email asking around to those who designed these features, but i’m curious how you use Shortcuts.

Technorati Tags: VS2005Tip,VS2008Tip

Did you know… You can show Hack, Undone, and custom Tokens in the Task List? – #176

Todo’s are not the only thing you can display under "Comments" in the Task List.  If you go to Tools – Options – Environment – Task List you’ll see a Token List.  By default, Visual Studio comes with Hack, Undone, and Comment, but you can create your own.

Task List Tokens List

Now in the editor i can type in a comment, using the ‘TipOfTheDay token format…

Tip of the Day token comment

the ‘TipOfTheDay comment now appears in the task list.

Tip of the Day comments now in Task List

Technorati Tags: VS2005Tip,VS2008Tip

Did you know… How to create and view Todo’s in the Task List? – #175

Let’s focus now on the other aspect of the Task List – the Comments left in the code.  You need to drop down the combo box at the top right to show Comments in order to see your comment "tokens" (i.e. comments, todo’s, and hacks) in the task list.

Unlike User Tasks, your todo’s will (obviously) be saved in your code, and in the case of checking in, everyone will see them.

Task List Comments View

So let’s say that you have a "todo" comment as shown below.

A TODO comment in code

And now we see in the task list in the Comments view

TaskListComments3

Technorati Tags: VS2005Tip,VS2008Tip

Did you know… how to use /safemode? – #174

Yep, today is the Sara Birthday Edition v3.0.

Sara’s First Tip She Ever Learned

When i started on the Visual Studio team back in Sept 17th, 2001, the first feature my test lead ever gave me to test was the /safemode feature.  If you have 3rd party packages (meaning you’ve installed a VS Package that uses the VS SDK, formally known as VSIP), you can use this command line switch to have VS launch in "safemode" where all 3rd party packages are prevented from loading.  This is a great way to test whether there’s an issue with VS or it is with a 3rd party package.  a funny story here is I was also making the transition from linux to windows, so I had to ask someone what’s the DOS equivalent to "ls".

safemode

Sara’s Favorite Most-Obscure VS Tip Ever

In Visual Studio .NET 2002 (we tried 2003 and it didn’t work, but i swear i remember this in 2002, although i don’t have 2002 installed anywhere to confirm), in the Task List, if you had an error that was too long to be displayed in the given cell, if you put focus on that cell / row and press CTRL+ALT+SHIFT+T, it would display the tooltip showing the full error or file path.  Don’t ask, i have no idea =)  If it doesn’t work, then i must have had a dream about it alongside the screen reader dreams i was having at the time.

And Go Sara Go v3.0!!!