Καλώς ορίσατε στο dotNETZone.gr - Σύνδεση | Εγγραφή | Βοήθεια

C# and .NET Tips and Tricks

Quests in programming in .NET

Ιούλιος 2013 - Δημοσιεύσεις

Visual Studio 2012 tips that will improve your coding speed - Web developers

Disable "Start Page"

There is no reason to wait every time for the "Start Page" to load its contents from the internet and display. So the best thing to do is disable it using the checkbox at the left, bottom of it

Switch between/Execute programs on taskbar without the mouse

You can use the Win + Number to switch between the open programs in the taskbar. If the program is not running it will execute, otherwise it will get the focus. Win + Shift + Number will open a new instance of the progam on the taskbar. Those are extremely useful especially when you are doing web development and want to be able to switch between browser windows and VS. Finaly, the most important Win + Ctrl + Shift + Number will run the program as administrator.

Associate "Open Containing folder to a shortcut

Go to "Quick Launch" and start typing "Keyboard...". Select "Environment -> Keyboard". In the "Show command containing" write "OpenContaining" and select the match at the list below. Assign the shortcut key (eg press "Ctrl + Shift + O" and then assign).

Install useful extensions

For each one of the following go to VS2012 -> Tools -> Extensions and Updates and write their name in the "Search box".

  • Indent Guides: Provide lines to show you indentation and where blocks of code open/close.
  • Web Essentials 2012: Toolbox that provides a lot of useful features for web developemnt such as CSS3 editor enhancements and Typescript support. For more info see here.
  • Mindscape Web Workbench: Support for new web frameworks such as SASS,LESS and Coffescript . For more info see here.
  • Hide Main Menu: Save those extra pixels by hiding the menu. It can be displayed by pressing the "Alt" key.
  • Color Theme Editor: Change the VS2012 color theme.
  • TroutZoom: Automatically applies the zoom level you specify to one window to all.
  • Zen Coding: Super fast HTML writing (similar to the popular package for Sublime) more info.

Stop going up and down in the same file

You are writing code in a big file and you find yourself going up and down within the file to see some definitions and keep coding. You can select the file you work and then click "Window" -> "Split" and you have two windows open with the same file so that you can have each one in a different position within the file. When you are donw "Window" -> "Remove Split"

Useful shortcuts

  • Ctrl+Alt+L Focus to the solution explorer.
  • Ctrl + -/ Ctrl + Shift + - Backward/Forward to the places I have been with my cursor in a file with code
  • Ctrl + , Very intelligent search within the solution (it also searches camelcase like for MainWindowViewModel you can search from MWVM
  • Ctrl + >/ Ctrl + Shift + < Zoom in and out
  • Ctrl + Alt + Space Switch between suggestion and completion mode in intellisense
  • Ctrl + ] + s Selects the active file in the "Solution Explorer"

New solution explorer view

In big solutions sometimes you need to constantly navigate between two different locations in the solution explorer. Well not any more. Right click on the folder containing some code files in solution explorer and select "New Solution Explorer View". You will get a second view with only those files.

For more information check out this very good presenation from Teched 2013 Europe.

Posted: Δευτέρα, 8 Ιουλίου 2013 7:40 πμ από iwannis | 0 σχόλια
Δημοσίευση στην κατηγορία: