Prabir's Blog

where the tech matters...

Visual Studio Tips and Tricks - II

May 23
by prabir 23. May 2009 16:40

There are at times when you would like to format your code properly, especially with xml stuffs including html tags. Indention provides you with much clarity in your code. Just looking at it you can understand much of it. Even makes your debugging easier. Its really an important part of code organization.

So how would you do it in a traditional way. Tab..Tab.Tab.. oh i’m wrong shift + tab. Well, those are gone with the old ages. Now its even better than before. Ctrl + k, Ctrl +  d. What you do is Press Ctrl + K and then after some time press D while holding Ctrl. Don’t wait too long. You’ll get used to it. Its just a matter of practice. After all practice makes a man perfect.

It works with almost any languages, whether it is xml files, html, C# or .aspx files.

In short I like to call this Ctrl + kd. After finding this magical sequence of keys, it has really help me speed up my coding time.

imageBefore Ctrl + KD

image
After Ctrl + KD

As you can see, it even automatically moves excess text to you next line so that it can be fit on you screen easily.

For more articles on tips and tricks refer here. Or you can also access the page from the right menu under Page List heading


Share/Save/Bookmark Subscribe

Tags: , , ,

Visual Studio Tips and Tricks

Comments

5/23/2009 4:44:55 PM #

trackback

Tips and Tricks

Tips and Tricks

Prabir's Blog

5/23/2009 4:48:56 PM #

trackback

Visual Studio Tips and Tricks - II

You've been kicked (a good thing) - Trackback from DotNetKicks.com

DotNetKicks.com

5/25/2009 4:53:13 AM #

pingback

Pingback from alvinashcraft.com

Dew Drop - May 24, 2009 | Alvin Ashcraft's Morning Dew

alvinashcraft.com

5/25/2009 6:58:43 AM #

John Sheehan

If you highlight a section of code and hit Ctrl-K, Ctrl-F it will do the same but just for the selection.

John Sheehan United States

5/25/2009 6:59:18 AM #

John Sheehan

You can also download a cheat sheet of all the VS keybindings. I have a link to it on my blog: http://john-sheehan.com/blog/net-cheat-sheets/

John Sheehan United States

5/25/2009 12:19:09 PM #

Prabir

Hi thanks, for the short cuts and cheat sheets. I have added the cheat shetts in my favorites, and will be going through it shortly.

Prabir Nepal

5/26/2009 12:51:26 AM #

pingback

Pingback from arjansworld.com

Arjan`s World    » LINKBLOG for May 25, 2009

arjansworld.com

8/5/2009 1:03:42 PM #

San Diego Web Design

Just what I was googling for! Thanks for sharing!

San Diego Web Design United States

8/20/2009 4:39:03 PM #

Chris Marisic

I love the format document hot keys. I'm also a resharper user so I like to remap my hot keys to Ctrl+E,F resharper format code and Ctrl+E,D to format my document, Ctrl+E,C for comment selection Ctrl+E,R for uncomment selection then all of these commands are available to my left hand while my other can be using the mouse without needing to switch off it

Chris Marisic United States

9/16/2009 11:00:17 PM #

aion gold

Now this is hghly recommeded post for me. I will surely email this to my friend.


Regards

Whitr

aion gold United States

9/16/2009 11:30:50 PM #

aion gold

I loved the way you exlained things. Much better many here


Regards

Venu

aion gold United States

9/28/2009 3:35:39 PM #

web design

I have never read such a lovely post and I am coming back tomorrow to continue reading.

web design United Kingdom

10/9/2009 4:59:16 PM #

friend sayings

I have been using the express versions of Visual Studio to build my knowledge for a while and  am starting to undertake the transition to the professional edition. Before I do this I would like to improve my  knowledge of using the package before I get out my wallet. My earlier experience is as a web programmer with mysql, php, most linux based tools and a little flash with actionscript, now I am migrating to a Microsoft package. I am realising it is a real learning curve and am seeking to build my awareness with some online blog reading.  The sentence " Visual Studio Tips and Tricks  II " in your post got me fascinated me.  I find the Visual Studio tutorial websites  are often strict and address the same items looking like an online manual.  Dialog in web logs can address factual methods to resolve problems which takes me through the learning curve more quickly.  Thanks for the note.

friend sayings United Kingdom

10/16/2009 5:06:12 PM #

messenger software

Wonderful article, thanks for putting this together! This is obviously one great post. Thanks for the valuable information and insights you have so provided here

messenger software United States

11/22/2009 10:17:04 PM #

1000 games

Thanks, the tips and tricks of Visual studio was worth the read

1000 games United States

11/23/2009 11:49:56 PM #

acaros

thank you for this information, great post

acaros United States

11/24/2009 3:59:44 AM #

Phoenix Marriage Records

We thoroughly loved your weblog post. I do not have a bunch to to say in retort, I just wanted to add this comment to reply well done. It seems like you have placed a ton of effort into your article and we need much more of these on the Internet these days.

Phoenix Marriage Records

12/1/2009 8:44:08 PM #

oes tsetnoc contest

I would like to thank you for the efforts you have made in writing this article. I am hoping the same best work from you in the future as well. In fact your creative writing abilities has inspired me to start my own BlogEngine blog now. Really the blogging is spreading its wings rapidly. Your write up is a fine example of it.

oes tsetnoc contest United States

12/13/2009 1:10:19 AM #

Kids games

I have added the cheat shetts in my favorites, and will be going through it shortly.

Kids games United States

12/13/2009 7:22:19 PM #

dermatitis

excellent post, thank you for sharing

dermatitis Netherlands

blog comments powered by Disqus