Boost Your Java Productivity: 28 Essential IntelliJ IDEA Tips
Discover 28 practical IntelliJ IDEA tricks—from viewing code history and adjusting memory settings to customizing shortcuts, managing imports, visualizing dependencies, and leveraging plugins—designed to streamline Java development, enhance efficiency, and simplify everyday coding tasks for both beginners and seasoned developers.
IntelliJ IDEA is a powerful Java IDE that can greatly improve development efficiency. Below are 28 useful tips covering navigation, configuration, shortcuts, plugins, and more.
View code history version: right‑click the Java class → Local History → Show History.
Adjust IDEA virtual memory: use Change Memory Settings → Edit Custom VM Options.
Set IDEA shortcuts to the Eclipse keymap.
Ignore case in code completion suggestions.
Disable code inspections selectively.
Configure documentation comment template.
Show method separators.
Enable multi‑line tabs via settings.
Jump to method braces with Ctrl+[ / Ctrl+].
Complete code endings (semicolon, braces) with Ctrl+Shift+Enter.
Fuzzy search methods using Ctrl+Shift+Alt+N or Ctrl+Shift+R.
Preview class code with Ctrl+Shift+A and Ctrl+Alt+B, or quick view with Ctrl+Shift+I.
Find method usages with Ctrl+Alt+H.
Customize code templates (e.g., change sout to syso) via Postfix Completion.
Auto‑import and remove unused imports (Alt+Enter, Ctrl+Alt+O).
Use Codota plugin to prioritize frequently used classes and methods.
Quickly view class/field documentation with F2.
Distinguish brackets using the Rainbow Brackets plugin.
Add multiple services to a single run window in microservice projects.
Set global IDEA settings for new windows.
Jump between Java mapper files and XML with the Free MyBatis plugin.
Set a custom background image via the BackgroundImage plugin.
View Maven dependency tree with the Show Dependencies button.
Switch to the previously active tab with Alt+← / Alt+→.
Use IDEA’s built‑in SSH tool (configure account, start session).
Visualize call chains with the SequenceDiagram plugin.
Capture the current thread dump during debugging.
Run the same project on different ports by adding -Dserver.port=8993 to VM options.
1. View code history version
Right‑click the Java class, choose Local History → Show History to see recent changes and restore versions.
2. Adjust IDEA virtual memory
Use Change Memory Settings → Edit Custom VM Options to modify the .vmoptions file.
3. Set IDEA shortcuts to Eclipse keymap
Switch the keymap to Eclipse for a familiar shortcut set.
4. Ignore case in code completion
Disable case‑sensitivity in completion settings (choose "none" in some versions).
5. Disable code inspections
Turn off unnecessary inspections to reduce resource usage.
6. Set documentation comment template
Configure Javadoc comment shortcuts and templates (see linked article).
7. Show method separators
Enable visual separators to distinguish methods in poorly formatted code.
8. Enable multi‑line tabs
Disable single‑line tab display to show multi‑line tabs for better navigation.
8.1 Tab limit – increase the value under Settings → Editor → General → Editor tabs → Tab limit.
9. Jump to method braces
Press Ctrl+[ / Ctrl+] to quickly navigate to the opening or closing brace of a method.
10. Complete code endings
Use Ctrl+Shift+Enter to auto‑complete statements, semicolons, or braces.
11. Fuzzy search methods
Press Ctrl+Shift+Alt+N and type a partial name (e.g., Peo.te) to find a method, or use Ctrl+Shift+R for file search.
12. Preview class code
Use Ctrl+Shift+A to locate a class, then Ctrl+Alt+B to open it in a new tab, or Ctrl+Shift+I for an inline preview.
13. Find method usages
Press Ctrl+Alt+H to see where a method is called; previously you would use Ctrl+Shift+F to search.
14. Customize code templates
Change default live templates (e.g., replace sout with syso) via Postfix Completion settings.
15. Auto‑import and remove unused imports
Use Alt+Enter to import, and Ctrl+Alt+O to optimize imports.
16. Codota plugin
Provides suggestions for frequently used classes and methods.
17. Quick view of class/field documentation
Press F2 to display Javadoc for a class or field.
18. Bracket color distinction
Install the Rainbow Brackets plugin to color matching brackets.
19. Add multiple services to a single run window (microservices)
Navigate: View → Tool Windows → Services → Add Services.
20. Global IDEA settings for new windows
Adjust settings (e.g., Maven configuration) to apply globally when opening new windows.
21. Jump between Java mapper and XML
Use the Free MyBatis plugin; click the green arrow to switch files.
22. Set IDEA background image
Install the BackgroundImage plugin and choose a picture.
23. Maven dependency tree
Run mvn dependency:tree or click the Show Dependencies button to view a graphical tree.
24. Switch to previous tab
Use Alt+← to go back and Alt+→ to go forward among opened tabs.
25. IDEA built‑in SSH tool
Configure account credentials and start an SSH session directly from IDEA.
26. Call chain diagram plugin
Install SequenceDiagram to generate visual call chain diagrams.
27. Capture thread dump
During debugging, click the camera icon to obtain the current thread dump for analysis.
28. Run same project on different ports
Add a custom VM option, e.g., -Dserver.port=8993, to launch the application on another port.
# 8993 is a different port from the one defined in application.yml
-Dserver.port=8993Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Su San Talks Tech
Su San, former staff at several leading tech companies, is a top creator on Juejin and a premium creator on CSDN, and runs the free coding practice site www.susan.net.cn.
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.
