VS2010 auto insert {}
-
How can you make VS2010 create a block after an
if
orfor
statement? I would like it to automatically add the braces with an indented line between them after I type a block statement if the last character on the line was a ")". So:if (this == true)
would become when the [ENTER] key was pressed:if (this == true) { (cursor here indented however many spaces) }
Thanks,Brad Deja Moo - When you feel like you've heard the same bull before.
What's wrong with:
if
, tab, tab? Works in VS2005. -
How can you make VS2010 create a block after an
if
orfor
statement? I would like it to automatically add the braces with an indented line between them after I type a block statement if the last character on the line was a ")". So:if (this == true)
would become when the [ENTER] key was pressed:if (this == true) { (cursor here indented however many spaces) }
Thanks,Brad Deja Moo - When you feel like you've heard the same bull before.
He once challenged his own reflection to a staring contest. On the fourth day, he won. He wouldn't be afraid to talk about his feminine side - if he had one. He *is* the most interesting man in the world.
.45 ACP - because shooting twice is just silly
-----
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001 -
How can you make VS2010 create a block after an
if
orfor
statement? I would like it to automatically add the braces with an indented line between them after I type a block statement if the last character on the line was a ")". So:if (this == true)
would become when the [ENTER] key was pressed:if (this == true) { (cursor here indented however many spaces) }
Thanks,Brad Deja Moo - When you feel like you've heard the same bull before.
VB.NET does this automatically I've heard. Which is why VB is supposedly more RAD than C# :rolleyes: C# with the DevEx add-in or Whole Tomatoe does the same though. If you want to go that route.
Regards, Nish
Blog: blog.voidnish.com Most recent article: An MVVM friendly approach to adding system menu entries in a WPF application
-
He once challenged his own reflection to a staring contest. On the fourth day, he won. He wouldn't be afraid to talk about his feminine side - if he had one. He *is* the most interesting man in the world.
.45 ACP - because shooting twice is just silly
-----
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001Bit of an own-goal there, perhaps?
me, me, me "The dinosaurs became extinct because they didn't have a space program. And if we become extinct because we don't have a space program, it'll serve us right!" Larry Niven nils illegitimus carborundum
-
He once challenged his own reflection to a staring contest. On the fourth day, he won. He wouldn't be afraid to talk about his feminine side - if he had one. He *is* the most interesting man in the world.
.45 ACP - because shooting twice is just silly
-----
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001He may not have a feminine side, but does he have an off-side?
-
What's wrong with:
if
, tab, tab? Works in VS2005.and in 2008 and VS2010
me, me, me "The dinosaurs became extinct because they didn't have a space program. And if we become extinct because we don't have a space program, it'll serve us right!" Larry Niven nils illegitimus carborundum
-
What's wrong with:
if
, tab, tab? Works in VS2005. -
What's wrong with:
if
, tab, tab? Works in VS2005.holy shiite, i never knew that! It works for the other control statements too!
Fight Big Government:
http://obamacareclassaction.com/
http://obamacaretruth.org/ -
holy shiite, i never knew that! It works for the other control statements too!
Fight Big Government:
http://obamacareclassaction.com/
http://obamacaretruth.org/and for prop and many others as well.
me, me, me "The dinosaurs became extinct because they didn't have a space program. And if we become extinct because we don't have a space program, it'll serve us right!" Larry Niven nils illegitimus carborundum
-
and in 2008 and VS2010
me, me, me "The dinosaurs became extinct because they didn't have a space program. And if we become extinct because we don't have a space program, it'll serve us right!" Larry Niven nils illegitimus carborundum
It won't work in VS2012 though. Just because.
-
What's wrong with:
if
, tab, tab? Works in VS2005.What is this supposed to do? It doesn't do anything on my system except add two tabs (regardless of what version of VS I use.)
-
How can you make VS2010 create a block after an
if
orfor
statement? I would like it to automatically add the braces with an indented line between them after I type a block statement if the last character on the line was a ")". So:if (this == true)
would become when the [ENTER] key was pressed:if (this == true) { (cursor here indented however many spaces) }
Thanks,Brad Deja Moo - When you feel like you've heard the same bull before.