Skip to content
Search

IntelliJ IDEA

lastmod 2026-02-23created 2014-03-01106 edits

IntelliJ IDEA is a commercial Java integrated development environment made by JetBrains. It is also called IntelliJ or IDEA for short.

Categories

Install

## IntelliJ Ultimate
sudo snap install intellij-idea-ultimate --classic

## IntelliJ Community (무료/오픈소스)
sudo snap install intellij-idea-community --classic

## Rider (C# IDEA)
sudo snap install rider --classic

Tuning JVM options to improve speed

-Xms2048m
-Xmx2048m
-XX:ReservedCodeCacheSize=240m
-XX:+UseCompressedOops

GPU support

There are options like the following. Check them more precisely later.

  • -Dawt.java2d.opengl=true
  • -Dsun.java2d.d3d=true
  • -Dsun.java2d.noddraw=false
  • -Dsun.java2d.opengl=true

Meta key support

You have to open IDEs property file (Help -> Edit Custom Property ...) and type:

keymap.windows.as.meta=true

PyCharm

Creating Virtual Environment

Dockerization

Jupyter

PyCharm hint

Converting comments
For comment-based type hints, PyCharm suggests an intention action that allows you to convert comment-based type hint to a variable annotation. This intention has the name Convert to variable annotation, and works as follows:
{|class="wikitable"

! Before || After |- |

from typing import List, Optional
xs = []  # type: List[Optional[str]]

|

from typing import List, Optional
xs: List[Optional[str]] = []

|}

Disable inspection (Lint)

See PyCharm:Inspections.

Stubs

How to create pyi files in pycharm.

Python Debug Server (Remote Debugging)

See pydevd-pycharm for details.

CLion

TIP

Tuning

Install

PhpStorm

WebStorm

Debugging Chrome

After starting the server with vue-cli, select Edit Configurations... > JavaScript Debug, enter the URL of the running server, and select the ROOT directory of the front-end web project.

Disable inspection (Lint)

See WebStorm:Inspections.

Keyboard shortcut

NAME

MaxOSX

Windows

Linux

BRIEF

Related Symbol

Ctrl+Cmd+Up

Ctrl+Alt+Home

Header/Source Switching

Go to define

Cmd+B

Ctrl+B

-

Choose implementation

Cmd+Alt+B

Show Documentation

Ctrl+J

Quickly navigate

Cmd+F12

Shows the symbol list navigation for the element currently being edited.

Quickly select

Alt+F1

Selects the Target (View) for the element currently being edited. (e.g. view in Finder)

Terminal Window

Alt+F12

File Path

Cmd+Alt+F12

Selects a node in the full directory path of the element currently being edited and opens it in the file explorer2.

Show parameters

Cmd+P

List of valid parameters.

Find Usages

Alt+F7

Shift+Alt+7

Previous/Next Occurrence

Cmd+Alt+Up/Down

Previous/Next Cursor

Cmd+Alt+Left/Right

Moves to the previous/next cursor position.

Code Generate

Cmd+N

Generates code such as Test, Constructors, and Member's getter & setter.

Toggle Bookmark

F3

Show Bookmark

Cmd+F3

Toggle Breakpoint

Cmd+F8

Build

Cmd+F9

Resume Program

Cmd+Alt+R

Path Popup

Ctrl+Alt+Shift+2

Opens the OS file browser popup for the focused file (or folder).

View

Parameter Info

Ctrl+P

Navigate

Search Everywhere

Double Shift

Search Class

Cmd+O

Search File

Shift+Cmd+O

Search Symbol

Cmd+Alt+O

Recent Files

Cmd+E

Debugging

Step Over

F8

Step Into

F7

Step Out

Shift+F8

Stop

Cmd+F2

On Linux (Ubuntu), if you change the keymap to the MacOSX one, the META key does not work properly. This can be fixed by following Ubuntu#How to use META key.

Linux Keybinding with IdeaVIM

IdeaVIM Settings:

  • Ctrl+C (Copy): IDE
  • Ctrl+S (Save): IDE
  • Ctrl+V (Paste): VIM

Idea Keymap:

  • Paste: Ctrl+Shift+V

Useful custom keymap

To use the macOS tab-switching shortcuts on Linux, go to Settings > Keymap and set:

  • Main Menu > Window > Editor Tabs > Select Next Tab: Alt+Shift+]
  • Main Menu > Window > Editor Tabs > Select Previous Tab: Alt+Shift+[

How to turn off the alert sound (Alert)

Is it an ideaVIM issue? Not really sure, but

So in your ~/.ideavimrc, you can use the following:

set visualbell
set noerrorbells

When using Pycharm, searching with Find in Files sometimes also searched the contents under the venv folder, which was inconvenient. I looked for a way to exclude it and found one.

  • The first way: right-click the .venv folder and select "Mark Directory as > Excluded".
  • The second way: go to the "Settings > Project > Project Structure" menu and set "Exclude files" to .venv.

Settings

Hiding parameter names (hints)

Settings > Editor > Inlay Hints > [언어 선택] > Parameter hints > Show parameter hints

Hiding the code author (Code Author)

Settings > Editor > Inlay Hints > Code Vision > Code author

Hiding the symbol usages count

Settings > Editor > Inlay Hints > Code Vision > Usages

PyCharm CE setup

  • For auto-completion, mark the core directory as Sources Root
    1. Hover the mouse cursor over the directory and right-click.
    2. Select the Mark Directory as > Sources Root menu.
  • For auto-completion, mark the core/recc directory as Namespace package
    1. Hover the mouse cursor over the directory and right-click.
    2. Select the Mark Directory as > Namespace package menu.
  • Show whitespace characters.
    1. Go to Editor > General > Appearance.
    2. Check all the Show whitespaces checkboxes.
    3. Check the Show line numbers checkbox.
    4. Check the Shoiw indent guides checkbox.
  • Register dictionary words for the Spell Checker.
    1. Install the Dictionary plugin.
    2. In Editor > Proofreading > Spelling, add the project.dic file to Custom dictionaries.
  • Use black as the Python code formatter. Change the Code Style for it
    1. In Settings > Editor > Code Style > Python, change Continuation indent on the Tabs and Indents tab to 4.
  • Fix the line length at 88 characters.
    1. In Editor > General > Appearance, select Show hard wrap and visual guides (configured in Code Style options).
    2. In Editor > Code Style > Python, change Hard wrap at on the Wrapping and Braces tab to 88.
  • Select the Python Interpreter.
    1. Go to Project: recc > Python Interpreter.
    2. Select your Python environment. (Virtual environment recommended)

PyCharm Pro setup

  • Disable code duplication checks.
    1. Go to Settings > Editor > Duplicates.
    2. Uncheck the Python checkbox.
  • Disable reference errors when using SQL foreign keys (Foreign key).
    1. Go to Settings > Editor > Inspections.
    2. Uncheck the SQL > Unresolved reference checkbox.

Turning off single-click file opening

Go to "Settings > Editor > General > Editor Tabs" and uncheck the "Enable Preview tab" checkbox in the "Opening Policy" section.

HTML http warning

Add the following comment right before the tag containing the code.

<!--suppress HttpUrlsUsage-->

Directories under your control

IntelliJ_-_mark_directory.png

  • Mark directory as Excluded: excludes it from the project.
  • Mark directory as Library files: treats it as a library directory. However, it prevents symbol/class/file indexes from being built.

Adding a specific local JAR file as a dependency

In an eclipse project, the .classpath file contains the following entry.

<classpathentry kind="lib" path="lib/mseo-common_1.0.0.jar"/>

How to configure the equivalent in intellij:

  1. Open the project structure
    1. Select "File > Project Structure..." from the IntelliJ menu or use the shortcut Ctrl+Alt+Shift+S to open the project structure window.
  2. Add the library
    1. Select "Modules" in the left menu, select the module name, and go to the "Dependencies" tab.
    2. Click the "+" button on the right, then select "JARs or Directories...".
  3. Specify the JAR file path
    1. Navigate to the path of the JAR file used in Eclipse (e.g. lib/mseo-common_1.0.0.jar) and select the file.
    2. IntelliJ adds this JAR file as a library of the project.
  4. Apply and confirm
    1. Press "Apply" and "OK" to save the settings.

IntelliJ_-_Add_JAR.png

Plugins

Key Promoter X
Whenever you click any button in the IDE with the mouse, shows the keyboard shortcut you could use instead
For buttons without a shortcut, the plugin suggests assigning one
Helps reduce reliance on the mouse and code faster
Codota
AI-based code completion suggestions
Makes code completion suggestions more relevant, further speeding up coding
PyCharm has AiXCoder, which supports various languages such as Python/JavaScript/TypeScript
Randomness
A handy plugin when you need to enter arbitrary data during development
Inserts random numbers, strings, UUIDs, etc. via shortcuts
Should be useful in situations such as writing test code
Presentation Assistant
A handy plugin for IDE-based presentations at events or for pair programming
Displays the shortcuts being used so the audience can easily follow the presenter's actions

Documentation

CLion, Reference Card For Mac (Keymap)
CLion-ReferenceCardForMac-Keymap.pdf

Troubleshooting

I just see a grey window, nothing happens in xmonad

When I start intelliJ idea in Xmonad, I just see a grey window, nothing happens. Did anybody have success with this combination.

Yep, xmonad and Java swing application's don't play well with the default config. You'll need to set your WM name to "LG3D" for Java Swing apps to work. The easiest way to add a call to setWMName "LG3D" in your startupHook like this:

import XMonad.Hooks.SetWMName

-- ...

xmonad $ defaultConfig { startupHook = setWMName "LG3D" }

IDEA-78860

The following problem may occur.

IBus prior to 1.5.11 may cause input problems. See IDEA-78860 for details.

Add the following to ~/.profile.

export IBUS_ENABLE_SYNC_MODE=1

Warning

However, with this change, Korean input may not work properly.

IntelliJ global environment variable

On macOS, using launchctl as shown below sets environment variables that IntelliJ IDEA uses globally. This can be used, for example, for environment variables needed to locate the LUA SDK.

##  PATH 환경변수
launchctl config user path $PATH

## 사용자 정의 환경변수
launchctl setenv MYPATH myvar

SQL dialect is not

In Setting - Project Setting - SQL Dialects, select the DBMS you use in the SQL Dialect field (the part marked with a red rectangle on the screen).

Cannot determine Java VM executable in selected JDK

Black screen in dwm

cannot resolve scss file vue-component

When using vue-component in WebStorm-family IDEs, if an @import statement in scss gives a Cannot resolve file ... error:

Settings > Languages & Frameworks > JavaScript > Webpack

In this menu, change Detect webpack configuration files for module resolution to Automatically, then run webpack when its run dialog appears.

Missing default translation file

Applying i18n to an SFC using vue-i18n-loader shows that warning. If you installed the i18n support plugin, just remove it.

Dynamic Problems not being checked

Check this when problems in the code are not checked live while editing.

As shown in the following images, if Highlight level is Syntax or None, click it and change it to All Problem.

Inspection_-Hightlight-_Syntax.jpg
Inspection_-Hightlight-Syntax-_Menu.jpg
Inspection_-Hightlight-_All_Problems.jpg

Highlight level stuck at Syntax

If Highlight level is stuck at Syntax as in the following image:

Intellij_reader_mode_screenshot.png

To change it to All Problem, press Shift+Ctrl+Alt+H or left-click the green check mark.

To change the default option, turn off Reader Mode. To turn it off, uncheck Settings > Editor > Reader Mode > Enable Reader Mdoe.

ESC key suddenly stops working in ideaVim

A bug occurs in ideaVim version 2.6.x. I downloaded and installed 2.5.1 manually.

Integrating Nunjucks files using Twig

Configure a custom extension with Twig files. It's a template engine with similar syntax (but for PHP).

  1. add Twig Support plugin if necessary
  2. Go to Settings -> Editor -> File Types and add find Twig
  3. Add the custom pattern *.njk.

Ctrl+P (Parameter Info) suddenly stops working

This happens right after a PyCharm update.

Go to Settings > Keymap and type Parameter in the search box. Clicking Add Keyboard Shortcut shows the conflicting action. Turn off that shortcut.

In my case, Show Hide Path Input was conflicting.

Screen cannot be clicked when a Breakpoint is hit while running in Debugging Mode on the Linux version

WARNING

The exact cause has not been identified yet.

With x11, pygame with pyimgui, it fails if a breakpoint is hit right away while the main rendering loop of a particular screen (one that needs to be refreshed) has not run even once (with no screen refresh). The loop has to run at least once.

The problem also seems to occur when the debugger hits right after a button click event (a window focus change).

So debugging must be done in the following order.

  1. In the application (being debugged), go to the screen you want to debug.
  2. Switch to the PyCharm editor screen.
  3. Set the Breakpoint (it should be hit as soon as it is set)

The last part is important: there must be no focus switch between PyCharm and the application.

There is a related option: in the Settings screen, select the "Build, Execution, Deployment -> Debugger" tree item, and "Focus application on breakpoint" switches focus automatically, but turning it off still produced the same issue.

If the program does not exit, press F9 to Continue.

Initialization error (ESLint). Object.hasOwn is not a function

See Node.js#Initialization error (ESLint). Object.hasOwn is not a function for details.

In short, it is a nodejs version problem.

Settings > Languages & Frameworks > Node.js

Go there and set the node path, or upgrade the version.

Unknown at-rule

If at-rules such as @theme show errors in *.css files, it is most likely a PostCSS issue.

Make *.css files recognized as PostCSS files. In "Settings > Editor > File Types", add *.css to the PostCSS entry.

If you don't want to add it, change the extension of the file with errors to pcss.

See also

Favorite site

How to use

Tip

References


  1. Mingrammer_-_pycharm_and_docker_python_dev_setup.pdf ↩

  2. Finder(OSX), Explorer(Windows), Nautilus(Linux) ↩

  3. Getting_Start_IntelliJ.pdf ↩

author Zer0 sitemap