Essential Configuration Tips for PyCharm and IntelliJ IDEA

Dynamic Font Size Adjustment

Navigate to File → Settings → Keymap. Locate Increase Font Size, double-click, and select Add Mouse Shortcut. Hold Ctrl while scrolling up to set the font enlargement action. Repeat for Decrease Font Size with the Ctrl + scroll-down combination for font reduction.

Python File Header Template

Access File → Settings → Editor → File and Code Templates. Select Python Script and customize the header template:

"""
Encoding: UTF-8
@author: ${USER}
@file: ${FILE_NAME}
@created: ${DATE} ${TIME}
@purpose: Module description
"""

if __name__ == "__main__":
    print("New module initialized")

Java Class Header Template

In File → Settings → Editor → File and Code Templates, modify the Class template:

#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME};#end
#parse("File Header.java")
/**
 * @author ${USER}
 * @class ${NAME}
 * @date ${DATE} ${TIME}
 * @description Class implementation details
 */
public class ${NAME} {
    // Class body
}

File Comparison Tool

Select multiple files in the project tree, right-click, and choose Compare Files to launch the diff viewer interface.

Tensor Data Visualization in Debugger

When debugging PyTorch code, right-click the tensor variable and select Evaluate Expression. Execute tensor.clone().detach().cpu().numpy() in the evaluation dialog. Click the resulting View as Array link to inspect the complete tensor in the Data Viewer.

Documentation Comment Rendering

Enable comment rendering via File → Settings → Editor → General → Appearance. Check the Render documentation comments option for formatted Javadoc/Docstring display.

Custom Background Image

Set a background image through File → Settings → Appearance & Behavior → Appearance → UI Options. Configure the Background Image settings to personalize the IDE workspace.

Full-Line Code Completion Control

Toggle ML-assisted completion at File → Settings → Editor → General → Code Completion. Enable or disable Enable Full Line suggestions. Alternatively, manage the feature via Settings → Plugins → Installed by searching for "full line code completion".

Script Parameters Configuration

For Python scripts requiring command-line arguments, edit the run configuration. In Script parameters, input arguments without quotes (e.g., --learning_rate 0.001 --batch_size 64) to simulate terminal execution.

Comment Formatting Settings

In Settings → Editor → Code Style → Java → Code Generation, uncheck Line comment at first column and enable Add a space at line comment start for properly formatted inline comments.

Tags: ide pycharm IntelliJ IDEA configuration Productivity

Posted on Sat, 20 Jun 2026 17:57:35 +0000 by redtux