2008-08-30

Visual Studio .NET 2008 Keyboard Shortcuts

Keyboard shortcuts are extremely useful. It increase our productivity and efficiency while working with Visual Studio .NET IDE. Here I am listing down some common and useful keyboard shortcuts. Shortcuts listed below are based on 'General Development Settings'. Some of the keyboard shortcuts listed here are also applicable to .NET 2005 and 2003.

SHIFT + DEL:
Delete the complete line of text without selecting it.

F12:
Go To Definition.

CTRL + MINUS SIGN (-):
Moves to the previously browsed code.

CTRL + F2:
Moves cursor to the Class Name drop-down box located at the top left of the Code Editor.

CTRL + F2, TAB:
Moves cursor to the Method Name drop-down box located at the top right of the Code Editor.

F7:
Switch between Designer view and Code view.

F10:
Executes the next line of code, but does not follow execution into any method calls.

F11:
Executes code one statement at a time, following execution into method calls.

SHIFT + F11:
Executes the remaining lines of the method in which the current execution point is located.

CTRL:
Hides the current data tip or IntelliSense window so that you can see the code beneath. Must be invoked while a data tip/IntelliSense window is active.

CTRL+ SPACE:
Displays the IntelliSense window with Global list.

ALT + COMMA (,):
Displays the common tab of IntelliSense window.

ALT + PERIOD (.):
Displays the All tab of IntelliSense window.

F9:
Sets or removes a break point at the current line.

CTRL K + CTRL C:
Comment selected line or block of code.

CTRL K + CTRL U:
Uncomment selected line or block of code.

CTRL K + CTRL K:
Sets or removes a bookmark.

CTRL K + CTRL P:
Moves to the previous bookmark.

CTRL + K, CTRL + L:
Remove all bookmarks.

CTRL + TAB:
Navigate between the open document windows.

CTRL + DOWN ARROW & CTRL + UP ARROW:
Scrolls the code window without changing the cursor location.

CTRL + BACKSPACE & CTRL + DELETE:
Delete word.

CTRL + U:
Changes selected tex to lower case.

CTRL + SHIFT + U:
Changes selected text to upper case.

CTRL + SHIFT + B:
Build solution.

CTRL + ALT + L:
Displays the Solution Explorer.

CTRL + ALT + X:
Displays the Toolbox.

CTRL + F4:
Close document window.

CTRL + ALT + I:
Displays Immediate window.

CTRL + SHIFT + A:
Add New Item.

Hummm... quite a long list.

I have seen that while selecting a word from IntelliSense window most of the people use SPACE or ENTER key. This actually puts extra space or line, so people goes and remove that extra space or line which is requing to hit another few keystrokes. You can eliminate these extra keystrokes by pressing TAB key while selecting a word from IntelliSense.

No comments: