Visual Studio indent shortcuts?

  • Thread starter Thread starter JamesR
  • Start date Start date
J

JamesR

Hi

Are there any indent comments to setup a code block?:

if (condition) [NOW PRESS A SHORTCUT COMBINATION HERE]
{
//Braces appear here underneath, and caret jumps to here
}

//Possibly this could also work with methods etc:

private void MyMethod() [PRESS SHORTCUT]
{ //braces appear, caret jumps to:
//HERE
}

//At the moment, I am doing this:


if (condition) [ENTER]
{ [ENTER]
} [HOME KEY, ENTER, UP ARROW, TAB etc.]

//as it is a common piece of work, I am looking to see if there's a
simple shortcut to setup a code block, opening and closing braces.

Kind regards,

James.
 
If you are using VS 2005: it already has "code snippet" for 'if': type if and
press TAB twice and you will get the code snippet block inserted for you.

However, for methods
 
Back
Top