Programming Keyboard Shortcuts!

There are a handful of super useful keyboard shortcuts that I use all the time. Some of them are less known than others so I thought I would list them by software.

Visual Studio 2010/2012

Copy/Paste Stack: Ctrl + Shift + V

This brings up a context menu of the last 10 things you have copied. This is most helpful when refactoring code. You can combine this with '0-9' to select from the list or, oddly, 'a' to select the last entry in the list.

Extended Copy: (Ctrl + C) when nothing is highlighted

This will copy the entire line including line breaks. This helpful for quickly duplicating a line.

Build And Run Controls: F5, F7, F10

These ones are pretty obvious and you may already know. F5 is build and run, F7 is run and F10 is run but break on the first line of execution (always handy on new projects to quickly find the entry point).

Box Select: Alt + Click and Drag

This allows you to select a box of text on screen instead of line by line. Once selected you can copy that box or paste it while keeping its current formatting. This kind of selection also allows for writing to multiple lines at a time. It is the biggest time saver when renaming or changing lots of values in a list. If you havent tried it before give it a go it will change how you work for the better.

Go To Definition: F12

This will take you to the definition for a funciton or variable. Keep in mind in larger projects this can be very very slow.

Add/Remove Breakpoint: F9

This is just to speed things up when writing code to quickly add the breakpoints you are going to need.

Step Over/ Step In/ Step Out: F10/F11/Shift+F11

Faster for debugging than using the buttons.

Visual Assist X

Switch Between .cpp and .h: Alt + O

Much easier than switching through the solution window. When I code on a computer without Visual Assist X this is the feature I usually miss the most.

A Better Go To Definition: Alt-G

This is the same as the Visual Studio shortcut but much faster.

Find All References: Alt-Shift-F

This is the visual assist version of find all references so it is basically identical to the standard one in Visual Studio but again, much faster.


Duplicate Line: Ctrl+D

Notepad++ has most of the standard hot keys of a normal text editor with the bonus of this magnificent hotkey. Duplicates the line you are currently on or what ever you have selected at that time. Nice.

Create an Incremental List: Alt+Mouse to select a column. Then Atl+C

This brings up a prompt allowing you to fill that column with incremental numbers. Super handy for writing simple array values quickly.