March 22, 2007

Visual Studio.Net Short-cut: Format Document

OK, here is another nice short-cut: Format Document

Ctrl-k, Ctrl-d

Same as last time, this is a cord. You have to hit both in series.

There is another way to do this, btw. In C#, find the last '}', delete it, and re-type it.

And because I can't seem to just blog on short-cut at a time...

Surround With Snippets:
Ctrl-k, Ctrl-s

This brings up the list of snippets that can surround the current code with another code block. Ex. Try-Finally, While, Foreach, etc. Note: this even works with Resharper installed.

1 comment:

Anonymous said...

My big complaint with "Surround With Snippets" is that it doesn't offer surrounding it with {} in C#. That seems like the most basic thing you would want to surround with.