Skip to main content

IntelliJ

To change the Keymap Theme (eg. Visual Studio, VSCode, etc.): shiftshift → select "Keymap" → select "name of some theme"

Setup​

VSCode Keymaps
  • Install the VSCode Keymaps Plugin.
  • Disable the
    • emoji autocomplete popup ctrlshifte, otherwise the VSCode file explorer shortcut does not work
    • unicode autocomplete popup ctrlshiftu, otherwise the VSCode "Run" shortcut does not work
    • run ibus-setup, there you can remove these shortcuts under "Emoji" → "Keyboard Shortcuts", unix.stackexchange
warning

Updating the VSCode Keymaps Plugin resets it.

Quick Documentation Popup
  • The "Quick Documentation" popup will not show the documentation for classes, methods, etc, unless you point IntelliJ to the location of the documentation.

  • Java documentation: You can either use an online documentation or download and use a documentation locally (offline).

    • You can get the URLs of the java documentation for each java version here: Links to JDK documentation.
    • Then, in IntelliJ, press ctrlshiftalts to open the "Project Structure" menu.
    • Under "Platform Settings" → "SDKs" → "Documentation Paths" press alts (or click on the plus symbol) to add your chosen documentation URL.
    • Then, when you click on "Ok" the documentation will be shown in the quick documentation popup windows.
  • Documentation of Libraries: Usually, you have to do this for each java library separately.

    • if you use Maven you can install documentations by opening the "Maven" panel (click on the "Maven" symbol on the right side of the IntelliJ editor or use shiftshift → search for "Maven") → "Download Sources and/or Documentation" → "Download Documentation"
  • sources:

"Maven Build Scripts Found" popup

When you see the "Maven Build Scripts Found" popup, click on the "Load ..." button inside this popup to set up Maven for the current project, otherwise the "Maven" button in the right sidebar of IntelliJ will not be visible and building the project using ctrlshiftF10, ctrlshiftF5 will not be possible.

Alternatively, right-click on the pom.xml file in the file explorer and click on the last item in the context menu to set up Maven for the current project.

Best Practices​

Live Templates

Use IntelliJ IDEA Live Templates whenever possible. People often upload their Live Templates on Github and other places, so you can download and use them. By using those Live Templates you can avoid typing errors and speed up your coding.

Settings​

VSCodeVisual Studiodescription
ctrl,ctrlaltssettings

Search Keymaps​

VSCodeVisual Studiodescription
ctrl, → "Keymap".under "Keymap" you can click on the search symbol beside the search bar "Find Actions by Shortcut" to search a shortcut by pressing the shortcut you want to find
shiftshiftshiftshiftfind all ...
ctrlshiftpctrlshiftafind action ...
ctrlk ctrlr.Shortcuts Cheatsheet PDF

Tabs​

VSCodeVisual Studiodescription
ctrlwctrlF4Close Tab
ctrltabctrltabswitch Tab ("Switcher")

View​

VSCodeVisual Studiodescription
ctrlshift´ (custom)ctrlalt1toggle terminal
escescfocus the editor
nonealt0build window
ctrlshiftealt1focus file explorer, focus project window
alt3alt3find window
ctrlshiftualt4run window
ctrlshiftgalt9Git (to show warnings and errors that occurred while committing open the "Code Analysis" pane via "find action" (ctrlshifta) → type "messages")
ctrlshiftm.problems window

Run​

VSCodeVisual Studiodescription
ctrlshiftF10ctrlF5run application
ctrl;ctrll (english), ctrlshiftF5ctrlshiftF5rerun application
shiftF5shiftF5stop application

File Explorer​

VSCodeVisual Studiodescription
altinsertaltinsertwhile on a folder or file: opens the "New" menu, where you can eg. create a new class file
F2shiftF6rename file

Open Files​

VSCodeVisual Studiodescription
shiftshiftshiftshiftfind all ...
ctrle.Recent Files
ctrlp.Go to file

Workspaces (aka Projects)​

  • Click on the current project's name on the top left of the IntelliJ window. There you can select another Workspace/Project.
  • or: Click on the hamburger button on the top left of the IntelliJ window. Select "Recent Projects" → "Manage Projects".
  • or: ctrlo → type in the path of your project (faster than clicking in the file tree)

Editor​

Writing​

VSCodeVisual Studiodescription
ctrlshifti (custom).format code (doc: If you don't select a code fragment, IntelliJ IDEA will reformat the whole file.)
ctrle.delete to word start
ctrlxctrlxcut line
ctrli.extend line selection (in combination with altshiftdown this is useful to copy and paste multiple lines of code)
altshiftright.extend selection (useful to select words, select everything inside parentheses, copy and paste blocks of code)
altshiftdownctrldduplicate line
altinsertaltinsert"Generate", eg. a constructor
ctrl.altentershow context actions (Quick-fixes for highlighted errors and warnings, intention actions for improving and optimizing your code)

Jumps​

VSCodeVisual Studiodescription
altF8, altshiftF8F2, shiftF2jump to next or previous highlighted problem (error, warning, info)

Code Info​

VSCodeVisual Studiodescription
ctrlshiftspacectrlshiftspaceinside function parentheses: parameter info (shows function parameter names and types)
altF12altF12definition
ctrlkctrli.documentation