Visual Studio 2013 - My 3 favourite new code editor features
Every version of Visual Studio seems to improve and integrate new ways of interacting in the code editor to improve and smooth the process of inputting and refactoring code. Some of the new code editing features. Here are 3 of my favourite 2013 code editing improvements:
1) Auto Brace Completion
Another feature (like my previous post) from the Visual Studio productivity tools is the ability to have the code editor auto complete braces, parenthesis, quotes and brackets. Further to this for C++ users, auto completion will also place a semi-colon on braces as well as providing auto completion for comments. If Auto Brace completion isn’t for you, naturally you can head into Tools->Options->Text Editor (All languages or the language of your choice) and turn off/on the option.
2) Moving Code Lines/Blocks
A simple feature in the editor is now one I find myself using with some frequency to move around either a line of code I am working on, or a selection of code. With you caret on a line, or a selection performed on a code block the new keyboard combination of ALT-CURSOR UP or ALT-CURSOR DOWN, provides a fast way to move the line or lines up and down the code to reposition appropriately.
3) Peek (ALT-F12)
Many times when you are looking at code you want to take a look into references that you have around your codebase. For many of the developers I know this operation is needed so much that F12 has become a developers favoured shortcut key to go to a definition.
In Visual Studio 2012 and the preview pane functionality some strides were made to make this less intrusive on the document well by providing the load of this code into the preview code document in the well. Visual Studio 2013 however takes this common scenario to yet another level with the introduction of an inline peek option invokes by the easy to remember ALT-F12 that will yield an inline window in your codebase to display the code of interest.
With the peek window of course it can be promoted to a fully open window, or quickly dismissed by the ESCAPE key. Advanced functionality shown in the above animated image allows you to further drilldown into the code with further ALT-F12 navigations that will continue in the inline peek window scope, yet providing a breadcrumb navigation forward or backward through the user’s interaction.
Further information on these features and a few more making their way into 2012 can be seen in this blog: http://blogs.msdn.com/b/visualstudio/archive/2013/07/15/visual-studio-2013-new-editor-features.aspx