As a developer working inside Visual Studio IDE, there comes many scenarios when we need to position our code few lines above or below the other. Sometime such kind of refactoring of code is quite obvious to execute the code properly.


Considering this case, Microsoft came up with a new enhancement in Visual Studio 2013 where you will be able to position your code easily just using shortcuts. Let’s see what it can do.


What’s new in Visual Studio 2013?

If you are new to Visual Studio 2013, you may want to check the below posts first:


Quick Shifting of Lines

Using this enhanced feature, you can shift your codes top or bottom of the current line inside your Visual Studio 2013 IDE. You can move a single line or you can select a no. of lines together as a code block and place it properly. In order to shift a single line, just position your cursor on it and press the keyboard shortcut “ALT + UP Arrow or DOWN Arrow”. Pressing Up Arrow while ALT key is pressed, will move your code one line above the current line. Similarly pressing Down Arrow while ALT key is pressed, will move your code one line below the current line.


Similarly, if you want to move a bunch of lines, select those lines and either press ALT + Up Arrow or ALT + Down Arrow depending on your choice of moving the block up or down by one line.


Here is a video demonstration of this feature which you can see live:




I hope this small tips & tricks will help you while writing or refactoring your code. Isn’t it? No more additional plug-ins for this feature, just use Visual Studio 2013 and rest is yours. Drop a line below with your experience of Visual Studio 2013.


Don’t forget to connect with me on Twitter, Facebook and Google+ to get the technical updates. Also, subscribe to my blog’s RSS feed to get the notification directly in your inbox. Happy coding. Cheers.

Have a question? Or, a comment? Let's Discuss it below...


Thank you for visiting our website!

We value your engagement and would love to hear your thoughts. Don't forget to leave a comment below to share your feedback, opinions, or questions.

We believe in fostering an interactive and inclusive community, and your comments play a crucial role in creating that environment.