Unlock IntelliJ IDEA Productivity: 10 Hidden Shortcuts You Must Know
This article introduces a collection of practical IntelliJ IDEA tricks—including Presentation Mode, Inject Language, splitter movement, smart code completion, navigation bar toggling, symbol search, directory lookup, automatic null checks, and structural template searches—each explained with step‑by‑step shortcuts to boost Java developers' efficiency.
Overview
IntelliJ IDEA continuously surprises developers with useful shortcuts. This series shares several practical tips to improve coding efficiency.
Presentation Mode
Use Alt+V → View → Enter Presentation Mode to enlarge the editor and focus on a single class. Exit with Alt+V → Exit Presentation Mode. While in this mode you can switch files with CTRL+E (recent files), CTRL+N (class), or CTRL+SHIFT+N (file).
Inject Language
When editing JSON strings, avoid manual escaping. Place the cursor inside the quotes, press Alt+Enter, select Inject language or reference, choose json, then press Enter. The JSON fragment opens for editing, and IDEA automatically escapes double quotes. Exit with Ctrl+F4.
Move Splitter with Keyboard
Focus the Project view with Alt+1, then adjust the splitter using Ctrl+Shift+←/→ for faster navigation.
Ctrl+Shift+Enter – Not Just a Semicolon
This shortcut automatically adds missing braces to complete statements, e.g., turning an if without braces into a compilable block.
Avoid Overusing Refactor
For simple bulk text changes, use Ctrl+W to select the target (e.g., rabbitTemplate) and Alt+J to add the next occurrence, then edit all selections simultaneously.
Hide Navigation Bar
Press Alt+V, deselect Navigation Bar to clean the UI. Show it temporarily with Alt+Home and hide again with Esc.
Locate Class in Project View
Press Alt+F1, choose Select in Project View, then Enter to jump to the class location. Return to the editor with Esc or F4.
Powerful Symbol Search
Press Ctrl+Shift+Alt+N to open the Symbol dialog, type a fragment (e.g., user) to find methods like checkUser. You can also type the class name followed by a dot and the method name.
Find Directory Quickly
Use Ctrl+Shift+N, type / followed by the directory name to locate it instantly.
Auto‑Generate Not‑Null Checks
After typing rabbitTemplate., enter notnull and press Enter to let IDEA generate an if statement that checks for null.
Search Code by Template
Press Ctrl+Shift+A, type Search Struct, choose Search Structurally, then select an existing template (e.g., try). Adjust the template variables—set Maximum count of CatchStatement to 1—to find try‑catch blocks without handling the exception.
After configuring, click Find to list all matching code fragments.
Signed-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.
Java Backend Technology
Focus on Java-related technologies: SSM, Spring ecosystem, microservices, MySQL, MyCat, clustering, distributed systems, middleware, Linux, networking, multithreading. Occasionally cover DevOps tools like Jenkins, Nexus, Docker, and ELK. Also share technical insights from time to time, committed to Java full-stack development!
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.
