shortcuts
Primarily in Visual Studio & ReSharper,
but hopefully useful for other IDEs in principle.
NOTE: My specific keyboard mappings might be wonky,
but again, it's the principle that matters.
PrettyPrint please
CTRL + K, D: Reformat file indentation.
- Yes, this does happen automatically after various events, but best to force this manually too, especially before committing.
consistent formatting reduces noise on a diff

#PROTIP:
simply formatting lots of files makes your commit logs look like you've been busy.
USEFUL FOR:
- hangovers;
- killing time waiting for 5.30pm;
- annoying your team mates to make them keep having to pull before they can push every time.
Clipboard History
Ctrl + Shift + V

Especially useful when you cut some lines,
then accidentally copy more stuff before pasting.
then accidentally copy more stuff before pasting.
Self-documenting Code
No excuse not to write self-documenting code when you have the following shortcuts:
Ctrl + R, M: Extract method

tada!
Ctrl + R, V: Introduce variable
Same principle, but to quickly extract part of a long chain of commands into inline variables.
Especially nice for readability.
Also exists: Introduce { field, parameter }
but because these are kinda more structural, I don't really use them as much...
More...
Duplicate line
Ctrl + D
(doesn't disturb your clipboard)
Comment / Uncomment
Ctrl + Alt + /
Repeat previous test run
Ctrl + U, U
GIT EXTENSIONS
Can map a keyboard shortcut to Commit dialog (if you're afraid of the command line, not that I am...)
Windows
Explorer to DOS
Shift + right click inside folder
-> Open command window here
DOS to Explorer
C:\<folder_path>\explorer .
PAIR PROGRAMMING
A useful side effect of pair programming is to share productivity hacks like these amongst your team.
What are your faves?
(there are plenty more, I didn't even mention Alt+Insert for constructor generation, but this was just the start of the conversation...)
shortcuts
By tim_iles
shortcuts
- 482
