This post discusses about tips and tricks in Visual Studio 2010 which helps developers to write the code faster and make their life easier in day to day work much better. Especially you need these tips when you are concurrently working on two many projects.
Let us group these tips and tricks
IntelliSense options are filtered in Visual Studio 2010 let us take an example when you are typing the list will filter with the words you type
this feature is not available in earlier versions. It is not only matching the prefixes but also matches the substrings as shown below
You can notice when you type Line then you will get ReadLine and WriteLine.
- Suggestion Mode
Example: some times when you try to type a member which is not at declared then IDE shows something as below
notice when type Wait which is not yet declared in project but Visual Studio shows something else suggesting which I am not interested. To turn off the suggestion mode just type (CTRL + ALT + SPACE) then it would not display the above suggestion option
- Undeclared Types after new key word
You can create an object for a type which is not yet existed in your project as shown below. Later you can create that type
notice when you type Wait and new key word then Wait type will appear in the list.
Many of you may end up running multiple Visual Studio instances, following are tips to navigate using key board which increase the speed of your navigation. some of them are related windows 7 but when you merge with Visual Studio it works really well
Notice I have three applications opened on task bar. If you want to bring Visual Studio up Windows + 2, Now hit Windows + 3 notepad will open
Now If I do Windows + ALT + 3 then I will get the jump list as shown below
using the jump list you can create new instances of notepads. you all know ALT + TAB allows you to navigate between the open instances…..
To get the new instance of application after pinning use Windows + Shift + N
There much faster way you can navigate between open windows by using
Windows + T
2. Code Editor Tricks
To zoom your code editor or make your font code bigger user CTRL + SHIFT + >
and for smaller size CTRL + SHIFT + <
Box Selection – You can select the set of words in box and type your change automatically all words will change.
let us see an example
select the fields which you want to change and type all the values in selection will change with this feature in VS 2010.
Highlight References – Ctrl + Shift + Up/Down more about this can be read here
If you want find the reference of type in your code then Key board short cut is
CTRL + K , CTRL + T
You can side by side view the code of reference type using the above feature
Find All References
Shift + F12
Collapsing the regions
CTRL + MM
Go to Definition F12
Go to Definition stack Ctrl + Shift + 7/8
To launch the Navigate to window CTRL + ,
Activate the open file, When you have got so many files opened VS editor then use Ctrl + Alt + Down
Format Document now available for CSS file (CTRL + K, D)
You can use VS 2010 to open the online templates project new dialogue box
Smart Tags – CTRL + . and press to enter to add this name space in using statement
Reference: Teched 2011 presentation
More tips I can share in next post
|Share this post :|