Boost Your Java Productivity: Hidden IntelliJ IDEA Tricks You Must Try

Discover a collection of powerful IntelliJ IDEA shortcuts and features—including Presentation Mode, Inject Language, split‑pane navigation, automatic brace insertion, symbol search, structural search, and more—that help Java developers code faster, stay focused, and avoid common pitfalls.

macrozheng
macrozheng
macrozheng
Boost Your Java Productivity: Hidden IntelliJ IDEA Tricks You Must Try

Overview

IntelliJ IDEA becomes more powerful the more you use it, constantly offering small surprises while coding. Inspired by this love, the author shares a series of useful IntelliJ IDEA tips, with this article covering many practical tricks you may not know.

My Favorite Presentation Mode

Use Alt+V to open the View menu and select Enter Presentation Mode, which maximizes the IDE window and lets you focus on a single class without distractions. To exit, press Alt+V again and choose Exit Presentation Mode. You can also switch between classes quickly with CTRL+E, CTRL+N, or CTRL+SHIFT+N.

Magical Inject Language

When editing JSON strings, avoid manual escaping of double quotes. Place the cursor inside the quotes, press Alt+Enter, choose Inject language or reference, press Enter, and select the json language. The IDE will automatically handle escaping. Use Alt+Enter again to edit the JSON fragment, and press Ctrl+F4 to close the view.

Move Splitter with Keyboard

If a class name is hidden in the Project view, press Alt+1 to focus the Project view, then use Ctrl+Shift+←/→ to move the splitter and reveal the hidden part.

Ctrl+Shift+Enter Does More Than Add Semicolons

Press Ctrl+Shift+Enter to let IDEA automatically complete statements, such as adding missing braces for an if block.

Avoid Overusing Refactor for Simple Text Changes

To replace multiple occurrences of a text like rabbitTemplate, press Ctrl+W to select the word, then press Alt+J repeatedly to add the next occurrences, allowing batch editing without invoking the refactor dialog.

Hide the Navigation Bar

Press Alt+V and uncheck Navigation Bar to declutter the IDE. If you need it temporarily, press Alt+Home to show it, and Esc to hide it again.

Locate a Class in Project View

Press Alt+F1, choose Select in Project View, then select Project and press Enter to jump directly to the class location. Use Esc to return to the editor, or F4 to open the file.

Powerful Symbol Search

Press Ctrl+Shift+Alt+N and type a symbol name (e.g., user) to quickly find methods or classes.

Find Directories Quickly

Press 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; IDEA will generate the corresponding if statement automatically.

Find Code by Template

Use Ctrl+Shift+A to open the Action dialog, type Search Struct, select Search Structurally, then choose an existing template (e.g., try). Adjust the Maximum count variable for CatchStatement to 1, edit variables if needed, and click Find to locate all try‑catch blocks where the catch does not handle the exception.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

IntelliJ IDEAJava developmentshortcutsCode navigationIDE productivity
macrozheng
Written by

macrozheng

Dedicated to Java tech sharing and dissecting top open-source projects. Topics include Spring Boot, Spring Cloud, Docker, Kubernetes and more. Author’s GitHub project “mall” has 50K+ stars.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.