Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Visual Studio Shortcuts

Status
Not open for further replies.

NeilTrain

Programmer
May 27, 2003
275
0
0
US
I think I may have seen this before, but does anyone know how to do this in VS 2008?

When I type an if statement i.e: if(a == b), I would like the editor to automatically do a newline, open bracket, newline, tab, newline, close bracket, then put the cursor at the end of the tab.

 
Right Click at the appropriate point in the code editor, select Insert Snippet. Scroll to if (not #if), in the highlighted area type the expression e.g. [tt]a==b[/tt], press Enter twice and the cursor is located between the braces.

Personally, I think it is quicker and easier to type it by hand.


Hope this helps.

[vampire][bat]
 
if you have a few bucks in your budget checkout Resharper. the feature list is expansive and drastically reduces key strokes. the keyboard shortcuts are also intuitive which makes coding more pleasurable.

the template engine is very powerful with all kinds of macros for predefined code. there is also a formatting engine which allows will automatically format selctions/files/projections/solutions to use consistent formatting.

Jason Meckley
Programmer
Specialty Bakers, Inc.
 
I like Resharper so much I bought a copy with my own money. Looking forward to the release of v4.0, which adds support for VS.NET 2008.

Chip H.


____________________________________________________________________
www.chipholland.com
 
I even use R# for VB.Net and I already use v4.0 Beta which is kinda stable ;-).

Christiaan Baes
Belgium

My Blog
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top