Visual Studio – shortcuts

My favourite (or the most often used) shortcuts in Visual Studio 2015:

Editing:

Ctrl+X – cut the line (you don’t need to select the text in line, just put the cursor).

Ctrl+C – copy the line (see above).

Ctrl+V – paste the line (see above).

Ctrl+Shift+L – delete the line (see above).

Ctrl+Shift+V(multiplied) – past the next copied item (loops items from the clipboard).

Ctrl+, – search for classes, methods and so on.

Ctrl+F – find next.

Ctrl+Shift+F – find all.

Ctrl+-/Ctrl+Shift+- – go to previous/next place when you edited the code.

Ctrl+K+D – format the code.

Ctrl+K+F – format the selected code.

Ctrl+] – go to closing “}” or opening “{” bracket (use when cursor is next to opening or closing bracket).

Ctrl+G – go to line number.

Ctrl+K+C – comment selected text.

Ctrl+K+U – uncomment selected text.

Ctrl+Shift+W – select current word.

Ctrl+S – save file.

Ctrl+Shift+S – save all files.

Ctrl+R,R – rename.

Snippets:

propfull+tab+tab – insert snippet for property with backing field.

propdp+tab+tab – insert snippet for dependency property.

Debugging:

F10 – step out.

F11 – step in.

F5 – run.

F9 – add/remove breakpoint.

Windows:

Ctrl+Alt+I – Immediate window.

Ctlr+Alt+O – Output window.

Ctrl+Alt+P – attach to process.

F4 – properties window.

Ctrl+Alt+L – Solution explorer window.

Others:

Ctrl+F4 – close document window.

Ctrl+K,K – add/remove bookmark.

Ctrl+K,N – go to next bookmark.

Ctrl+K,P – go to previous bookmark.

F6 – build solution.

F12 – go to (method) definition.

Ctrl+F12 – go to declaration.

Alt+F12 – when your cursor is on a method call, new window with body of this method is displayed

Ctrl +R,T – debug unit test (works when your cursor is in unit test method body)

Of course there is much more shortcuts defined in Visual Studio: http://visualstudioshortcuts.com/2015/

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s