Skip to content

JetBrains IDE Tips & Tricks — IntelliJ, PyCharm, WebStorm, GoLand

DodaTech Updated 2026-06-23 8 min read

JetBrains IDEs share a common platform that provides a consistent set of productivity features across IntelliJ IDEA, PyCharm, WebStorm, GoLand, and other tools. The tips in this guide apply to all of them — learn once, use everywhere.

What You'll Learn

You'll navigate code faster with structural shortcuts, generate repetitive code with live templates and postfix completion, discover intention actions for automated refactoring, use structural search to find patterns regex can't match, and recover lost work with local history.

Why JetBrains IDE Tips Matter

JetBrains IDEs are the most feature-rich development environments available, but many developers use only 20% of their capabilities. The features in this guide eliminate manual work, catch errors before compilation, and let you refactor large codebases with confidence.

Durga Antivirus Pro's Java engine is developed in IntelliJ IDEA with custom live templates for log statements, thread safety patterns, and performance instrumentation.

Learning Path

flowchart LR
  A[IntelliJ IDEA Guide] --> B[JetBrains Tips
You are here] B --> C[IDE Shortcuts Comparison] C --> D[Productivity Workflow] style B fill:#f90,color:#fff

Live Templates

Live templates expand abbreviated keywords into full code structures:

// In any JetBrains IDE:
// Type "psvm" and press Tab → public static void main(String[] args)
// Type "sout" and press Tab → System.out.println()
// Type "fori" and press Tab → for (int i = 0; i < ; i++)
// Type "tryf" and press Tab → try-with-resources block

Creating Custom Live Templates

// File → Settings → Editor → Live Templates
// Add a new template group and template:

// Abbreviation: logm
// Description: Log method entry with parameters
// Template text:
private static final Logger log = LoggerFactory.getLogger($CLASS$.class);

public void $METHOD$($PARAMS$) {
    log.debug("$METHOD$ called with params: {}", $PARAM_NAMES$);
    $END$
}

// Applicable: Java (method declaration)

Live Template Variables

Variables in templates are evaluated when the template expands:

// Built-in variables:
$CLASS$       ClassName (evaluated automatically)
$METHOD$      MethodName (evaluated automatically)
$USER$        System user name
$DATE$        Current date
$TIME$        Current time
$END$         Cursor position after expansion

// Custom variables with expressions:
$PARAMS$      groovyScript("def params = _1.collect { it.text() }; return params.join(', ')")
$PARAM_NAMES$  groovyScript("def params = _1.collect { it.text() }; return params.join(', ')", methodParameters())

Postfix Completion

Postfix completion transforms an expression by typing a dot and a shortcut after it:

// Postfix completions in Java:
"hello".sout        System.out.println("hello")
list.for            for (Object o : list) { }
list.fori           for (int i = 0; i < list.size(); i++) { }
list.stream().for   list.stream().forEach(o -> { })
user.null           if (user == null) { }
user.notnull        if (user != null) { }
value.cast          (Type) value
value.return        return value
new Date().arg      Pass as argument to surrounding method call

// JavaScript postfix:
promise.then        promise.then(res => { })
array.filter        array.filter(item => { })

Postfix completion is faster than live templates for expression-level transformations because it doesn't require a separate keystroke to invoke.

Intention Actions (Alt+Enter)

Every yellow or red underline in a JetBrains IDE has an intention action:

// Place cursor on the highlighted code and press Alt+Enter:

// String equals to constant
if (str.equals("value")) {
    // Alt+Enter → "Equals to 'value'" → flip to:
}

if ("value".equals(str)) {  // Null-safe comparison
}

// Simplified lambda
Runnable r = () -> {
    System.out.println("Hello");
};
// Alt+Enter on lambda → "Replace with method reference"
Runnable r = System.out::println;

// Automate common fixes
// "Create method" — generates method from usage
// "Add exception to throws" — propagates exception
// "Replace with diamonds" — simplifies generic instantiation
// "Infer type" — replaces explicit type with var (Java 10+)

Structural Search and Replace

Search for code patterns based on structure, not text:

// Edit → Find → Search Structurally...
// Creates a search template based on code structure:

// Example: Find all try-with-resources blocks
// Template:
try ($RESOURCE$ = new $TYPE$) {
    $STATEMENT$;
}

// Example: Find all logger calls without guard
// Search for:
log.debug($ARG$);
// Replace with:
if (log.isDebugEnabled()) {
    log.debug($ARG$);
}

Structural search catches patterns that regex cannot — it understands the AST, not just the text.

Local History

// Right-click a file → Local History → Show History
// Or navigate to VCS → Local History

// Local history features:
// - Automatic snapshots on every save
// - Labels for Git operations, builds, and debug sessions
// - Diff view to compare any two revisions
// - Revert to any previous state
// - Create a patch from selected changes

Local history is independent of version control. It saves revisions even in projects without Git, and provides a safety net when you make experimental changes.

Run Anything (Double Ctrl)

The Run Anything dialog is the fastest way to execute tasks:

// Press Ctrl twice (or Ctrl+Enter) to open Run Anything

// Run configurations:
// Type "npm run dev" → runs npm dev script
// Type "mvn clean install" → runs Maven
// Type "docker ps" → runs in embedded terminal

// Open recent projects:
// Type project name → opens that project

// Run anything without configuring:
// Type command → IDE executes it in the embedded terminal

IDE Scripting with Console

// Tools → IDE Scripting Console → Kotlin
// Execute arbitrary code in IDE's JVM:

// Print all open files
roject.baseDir
PsiManager.getInstance(project).openFiles.forEach {
    println("File: ${it.virtualFile.path}")
    println("  Modified: ${it.modified}")
}

// Modify editor settings programmatically
val settings = CodeStyleSettingsManager.getInstance(project).currentSettings
settings.setDefaultIndentOptions(CommonCodeStyleSettings.IndentOptions().apply {
    INDENT_SIZE = 4
    TAB_SIZE = 4
    USE_TAB_CHARACTER = false
})

Common Productivity Mistakes

1. Not Using Key Promoter X

Install Key Promoter X — it shows a popup every time you click something that has a keyboard shortcut. After a week, you'll learn 50+ shortcuts without studying.

2. Ignoring Intention Actions

Every warning and error has an intention action. Instead of manually fixing a string comparison or adding a try-catch, press Alt+Enter and let the IDE do it.

3. Manual Refactoring

Never search-and-replace for renames. Use Shift+F6 (Rename) which updates all references, comments, and strings referencing the renamed symbol.

4. Not Configuring File Watchers

File → Settings → Tools → File Watchers automatically runs tools (Prettier, Black, ESLint fix) on save. Don't manually format files.

5. Overlooking the Structure View

Ctrl+F12 (or Cmd+F12) opens the file structure. Navigate to methods, fields, and inner classes instantly — faster than scrolling.

6. Not Using Scratch Files

Ctrl+Shift+N (or Cmd+Shift+N) creates a scratch file. Use it for API testing, SQL queries, JSON formatting, or any temporary code.

7. Debugging Without Breakpoint Conditions

Loops and recursive calls generate thousands of breakpoint hits. Right-click a breakpoint and add a condition: i == 9999, user.getId().equals("admin").

Practice Questions

1. What is the difference between a live template and postfix completion? A live template is triggered by typing an abbreviation and pressing Tab (e.g., sout → System.out.println). Postfix completion is triggered by typing a dot after an expression and a shortcut (e.g., expr.sout).

2. How do you find all try-with-resources blocks in your codebase? Use Structural Search (Edit → Find → Search Structurally) with a template containing try, resource, and type variables. The search understands code structure, not text.

3. What is the shortcut for intention actions and what do they do? Alt+Enter. Intention actions suggest fixes, transformations, and Code Generation based on context — flipping string comparisons, creating methods, adding Exception Handling.

4. How does local history differ from Git version control? Local history auto-saves on every edit regardless of Git commits. It stores snapshots locally and never pushes to a remote. Git requires explicit commits and is team-shared.

5. Challenge: Your team uses System.out.println for debugging but should switch to a proper logger. Use structural search to find all println calls and replace them with logger.debug calls. Answer: Use Structural Search for System.out.println($ARG$) and replace with logger.debug($ARG$). Add an import for the logger. Run the structural replace across the entire project.

FAQ

Which JetBrains IDE should I use?

IntelliJ IDEA for Java/Kotlin, PyCharm for Python, WebStorm for JavaScript/TypeScript, GoLand for Go, CLion for C/C++, Rider for .NET, RubyMine for Ruby. The Community editions are free.

How do I sync settings across JetBrains IDEs?

File → Manage IDE Settings → Settings Sync. Syncs keymaps, code styles, templates, and plugins across all JetBrains IDEs on different machines using a JetBrains account.

What is the most underused JetBrains feature?

Local History. Most developers rely solely on Git and lose work between commits. Local History captures every save and is invaluable for experimental changes.

How do I speed up a slow JetBrains IDE?

Disable unused plugins (Settings → Plugins), increase heap memory (Help → Edit Custom VM Options → -Xmx4g), exclude large directories from indexing (Mark as Excluded), and disable inspections for generated code.

Can I use Vim keybindings in JetBrains IDEs?

Yes. Install the IdeaVim plugin. It supports most Vim commands, registers, marks, macros, and can be configured with a .ideavimrc file.

What's Next

IntelliJ IDEA Guide
PyCharm Guide
WebStorm IDE Guide

Built by the developers of Doda Browser, DodaZIP, and Durga Antivirus Pro. Updated 2026-06-23.

Built by the developers of DodaTech

Doda Browser, DodaZIP & Durga Antivirus Pro