Tuesday, June 24, 2014

Shortcuts for IntelliJ IDEA

Intellij Idea is IDE for programming like ECLIPSE. I think the shortcuts should be helpful for programmers and beginners to programming. 

Editing
1)Ctrl + Space -Basic code completion (the name of any class,method or variable)
2)Ctrl + Shift + Space - Smart code completion (filters the list of methods and variables by expected type)
3)Ctrl + Shift + Enter - Complete statement
4)Ctrl + P - Parameter info (within method call arguments)
5)Ctrl + Q - Quick documentation lookup
6)Shift + F1 - External Doc
7)Ctrl + mouse - over code Brief Info
8)Ctrl + F1 - Show descriptions of error or warning at caret
9)Alt + Insert - Generate code... (Getters, Setters, Constructors,hashCode/equals, toString)
10)Ctrl + O - Override methods
11)Ctrl + I - Implement methods
12)Ctrl + Alt + T - Surround with… (if..else, try..catch, for,synchronized, etc.)
13)Ctrl + / - Comment/uncomment with line comment
14)Ctrl + Shift + / - Comment/uncomment with block comment
15)Ctrl + W - Select successively increasing code blocks
16)Ctrl + Shift + W - Decrease current selection to previous state
17)Alt + Q - Context info
18)Alt + Enter - Show intention actions and quick-fixes
19)Ctrl + Alt + L - Reformat code
20)Ctrl + Alt + O - Optimize imports
21)Ctrl + Alt + I - Auto-indent line(s)
22)Tab / Shift + Tab - Indent/unindent selected lines
23)Ctrl + X or Shift + Delete - Cut current line or selected block to clipboard
24)Ctrl + C or Ctrl + Insert - Copy current line or selected block to clipboard
25)Ctrl + V or Shift + Insert - Paste from clipboard
26)Ctrl + Shift + V - Paste from recent buffers...
27)Ctrl + D - Duplicate current line or selected block
28)Ctrl + Y - Delete line at caret
29)Ctrl + Shift + J - Smart line join
30)Ctrl + Enter - Smart line split
31)Shift + Enter - Start new line
32)Ctrl + Shift + U - Toggle case for word at caret or selected block
33)Ctrl + Shift + ] / [ - Select till code block end/start
34)Ctrl + Delete - Delete to word end
35)Ctrl + Backspace - Delete to word start
36)Ctrl + NumPad+/-  - Expand/collapse code block
37)Ctrl + Shift + NumPad+  - Expand all
38)Ctrl + Shift + NumPad-  - Collapse all
39)Ctrl + F4 - Close active editor tab

Search/Replace
1)Double Shift - Search everywhere
2)Ctrl + F - Find
3)F3 - Find next
4)Shift + F3 - Find previous
5)Ctrl + R - Replace
6)Ctrl + Shift + F - Find in path
7)Ctrl + Shift + R - Replace in path
8)Ctrl + Shift + S - Search structurally (Ultimate Edition only)
9)Ctrl + Shift + M - Replace structurally (Ultimate Edition only)

Usage Search
1)Alt + F7 / Ctrl + F7 - Find usages / Find usages in file
2)Ctrl + Shift + F7 - Highlight usages in file
3)Ctrl + Alt + F7 - Show usages

Compile and Run
1)Ctrl + F9 - Make project (compile modifed and dependent)
2)Ctrl + Shift + F9 - Compile selected file, package or module
3)Alt + Shift + F10 - Select configuration and run
4)Alt + Shift + F9 - Select configuration and debug
5)Shift + F10 - Run
6)Shift + F9 - Debug
7)Ctrl + Shift + F10 - Run context configuration from editor

Debugging
1)F8 - Step over
2)F7 - Step into
3)Shift + F7 - Smart step into
4)Shift + F8 - Step out
5)Alt + F9 - Run to cursor
6)Alt + F8 - Evaluate expression
7)F9 - Resume program
8)Ctrl + F8 - Toggle breakpoint
9)Ctrl + Shift + F8 - View breakpoints

Navigation
1)Ctrl + N - Go to class
2)Ctrl + Shift + N - Go to file
3)Ctrl + Alt + Shift + N - Go to symbol
4)Alt + Right/Left - Go to next/previous editor tab
5)F12 - Go back to previous tool window
6)Esc - Go to editor (from tool window)
7)Shift + Esc - Hide active or last active window
8)Ctrl + Shift + F4 - Close active run/messages/find/... tab
9)Ctrl + G - Go to line
10)Ctrl + E - Recent files popup
11)Ctrl + Alt + Left/Right - Navigate back/forward
12)Ctrl + Shift + Backspace - Navigate to last edit location
13)Alt + F1 - Select current file or symbol in any view
14)Ctrl + B or Ctrl + Click - Go to declaration
15)Ctrl + Alt + B - Go to implementation(s)
16)Ctrl + Shift + I - Open quick definition lookup
17)Ctrl + Shift + B - Go to type declaration
18)Ctrl + U - Go to super-method/super-class
19)Alt + Up/Down - Go to previous/next method
20)Ctrl + ] / [ - Move to code block end/start
21)Ctrl + F12 - File structure popup
22)Ctrl + H - Type hierarchy
23)Ctrl + Shift + H - Method hierarchy
24)Ctrl + Alt + H - Call hierarchy
25)F2 / Shift + F2 - Next/previous highlighted error
26)F4 / Ctrl + Enter - Edit source / View source
27)Alt + Home - Show navigation bar
28)F11 - Toggle bookmark
29)Ctrl + F11 - Toggle bookmark with mnemonic
30)Ctrl + #[0-9] - Go to numbered bookmark
31)Shift + F11 - Show bookmarks

Refactoring
1)F5 - Copy
2)F6 - Move
3)Alt + Delete - Safe Delete
4)Shift + F6 - Rename
5)Ctrl + F6 - Change Signature
6)Ctrl + Alt + N - Inline
7)Ctrl + Alt + M - Extract Method
8)Ctrl + Alt + V - Extract Variable
9)Ctrl + Alt + F - Extract Field
10)Ctrl + Alt + C - Extract Constant
11)Ctrl + Alt + P - Extract Parameter

VCS/Local History
1)Ctrl + K - Commit project to VCS
2)Ctrl + T - Update project from VCS
3)Alt + Shift + C - View recent changes
4)Alt + BackQuote (`) - ‘VCS’ quick popup

Live Templates
1)Ctrl + Alt + J - Surround with Live Template
2)Ctrl + J - Insert Live Template
3)iter - Iteration according to Java SDK 1.5 style
4)inst - Check object type with instance of and downcast it
5)itco - Iterate elements of java.util.Collection
6)itit - Iterate elements of java.util.Iterator
7)itli - Iterate elements of java.util.List
8)psf - public static final
9)thr - throw new

General
1)Alt + #[0-9] - Open corresponding tool window
2)Ctrl + S - Save all
3)Ctrl + Alt + Y - Synchronize
4)Ctrl + Shift + F12 - Toggle maximizing editor
5)Alt + Shift + F - Add to Favorites
6)Alt + Shift + I - Inspect current file with current profile
7)Ctrl + BackQuote (`) - Quick switch current scheme
8)Ctrl + Alt + S - Open Settings dialog
9)Ctrl + Alt + Shift + S - Open Project Structure dialog
10)Ctrl + Shift + A - Find Action
11)Ctrl + Tab - Switch between tabs and tool window