Master IntelliJ IDEA: Essential Settings, Tips, and Shortcut Guide
This guide walks you through the most useful IntelliJ IDEA configurations, practical usage tips, and a curated list of keyboard shortcuts to boost productivity for Java developers, complete with step‑by‑step instructions and visual screenshots.
Common Settings
Set UI theme to Dark via Settings → Appearance & Behavior → Appearance.
Adjust editor font size via Settings → Editor → Font.
Set global and project file encodings via Settings → Editor → File Encodings.
Create or edit code templates via Settings → Editor → File and Code Templates.
Customize key mappings via Settings → Keymap.
Usage Tips
Three toolbars (left, middle, right) provide mouse access to most actions, reducing the need for shortcuts.
Press Shift twice (Search Everywhere) to locate files, classes, actions, or settings instantly.
If you forget a command, open Search → Action to find it.
When editing MyBatis mapper.xml, add a MySQL data source via Database → Data Source → MySQL to enable SQL and column suggestions.
For tags without suggestions, use Inject language or reference → MySQL to enable them.
After selecting code, a floating toolbar appears with quick actions such as surround with, extract variable, and reformat.
Common Shortcuts (Windows)
Global Search (files, classes, actions, settings) : Shift+Shift (double‑press). Menu: Navigate → Search Everywhere.
Search Class : Ctrl+N. Menu: Navigate → Class.
Find Action (Execute Command) : Ctrl+Shift+A. Menu: Help → Find Action.
Go to Declaration : Ctrl+Click. Menu: Navigate → Declaration.
Find Usages : Alt+F7. Menu: Edit → Find Usages.
Navigate Back/Forward (history) : Alt+← / Alt+→. Menu: Navigate → Back / Forward.
Go to Line : Ctrl+G. Menu: Navigate → Line….
File Structure (current file method list) : Ctrl+F12. Menu: Navigate → File Structure.
Basic Code Completion : Ctrl+Space. Menu: Code → Completion → Basic.
Smart Type‑Matching Completion : Ctrl+Shift+Space. Menu: Code → Completion → Smart Type.
Auto‑Import / Show Intentions : Alt+Enter. Menu: Right‑click → Show Context Actions.
Reformat Code (current file) : Ctrl+Alt+L. Menu: Code → Reformat Code.
Comment/Uncomment Line : Ctrl+/. Menu: Code → Comment with Line Comment.
Comment/Uncomment Block : Ctrl+Shift+/. Menu: Code → Comment with Block Comment.
Copy Current Line : Ctrl+D. Menu: Edit → Duplicate Line.
Delete Current Line : Ctrl+Y. (No default menu entry.)
Move Line Up/Down : Alt+Shift+↑ / Alt+Shift+↓. Menu: Edit → Move Line Up/Down.
Undo : Ctrl+Z. Menu: Edit → Undo.
Redo : Ctrl+Shift+Z. Menu: Edit → Redo.
Rename (variable, class, method) : Shift+F6. Menu: Right‑click → Refactor → Rename.
Column Selection Mode : Hold Alt and drag with the left mouse button. Menu: Right‑click → Column Selection Mode.
Git Commit : Ctrl+K. Menu: Git → Commit.
IT Services Circle
Delivering cutting-edge internet insights and practical learning resources. We're a passionate and principled IT media platform.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
