What are the most useful keyboard short-cuts in an IDE
I know of Visual Studio:
- SHIFT+ALT+F10 - Show Smart Tag
I wish there were Eclipse like functionality below:
- CTRL+SHIFT+H - Show Hierarchy
- CTRL+T - Find related Types
- CTRL+SHIFT+T - Open Types
What are the most useful keyboard short-cuts in an IDE
I know of Visual Studio:
I wish there were Eclipse like functionality below:
Visual Studio
In Visual Studio:
F12 on a method or variable to go to the method source or variable definition.
In Visual Studio:
Highlight a block of code, and then press Ctrl-K-F to nicely adjust the indentation of the entire block. This also takes into account condition blocks and loops.
If you are using resharper (highly recommended) these are the biggies:
Ctrl + Shift + Home End UpArrow DownArrow.
Much better than using the mouse to select a lot of text. Not really IDE specific, but definitely the combo I use the most.
Visual Studio:
CTRL-R + CTRL-T
Runs unit tests in current scope (which I usually do more often than running the app)
Emacs:
CTRL-LEFTSHIFT-RIGHTSHIFT-META-ALT-WINDOW-APPLE-X to exit.
:-)
Seriously, CTRL-F11 in Eclipse to re-run last, so as to avoid the stupid Run dialog box.
Or the infamous "." in vi to repeat the last command.
ReSharper: Alt-Enter : "Fix the problem"
and maybe not most used but at least frequently used in Visual Studio:
Ctrl-K, Ctrl-M : add method stub, very useful for TDD
F9 : toggle breakpoint
ctrl shift B - building solution
ctrl K F - to format xml
ctrl m o - to expand and collapse methods.
ctrl shift f - global find and replace
I often used F12 for finding the declaration of the function/variable and Shift+F12 for finding all references.
Resolve a type... i.e. add a "using" directive automatically:
[Ctrl]
+.
followed by[Ret]
The [Ctrl]
+.
brings up the smart-tag window; the [Ret]
accepts the default choice.
for example:
StringBuilder[Ctrl]
+.
,[Ret]
adds using System.Text;
to the class header.
Build, whatever that may be assigned to in the IDE of the Day.
In Visual Studio,
CTRL+K, D to format the entire document.
F5 and CTRL+F5 to run solution with or without debugging.
CTRL+Space Trigger Intellisense dropdown.
"prop" TAB TAB for easy properties.
CTRL + F to search
CTRL + I to incrementally search
CTRL + SHIFT + F to search the whole project
I do a lot of searching...
For Eclipse:
Otherwise the most useful ones for me are the version control shortcuts for my Eclipse SVN plugin.
Also, not an IDE shortcut, but perhaps the most important one I use, WINDOWS + L to lock my computer when I leave.
In Visual Studio: