Some useful tricks for Intellij IDEA

1. Introduction

Previously I have a post on Useful IntelliJ IDEA keyboard shortcuts for java developers,Today I would show some useful tricks of IntelliJ IDEA to you.

2. The tricks

2.1 The presentation mode

Use presentation mode ,you can make the UI larger than before. You can use this mode to demo your code to others.

the keyboard shortcut for this: alt+v

for MAC , you can click IntelliJ IDEA–>Preferences–>keymap–>search for presentation and then check the Toggle presentation mode, set the keyboard shortcut to option+v

Before presentation: before presentation

After presentation: after presentation

If you want to open other files in presentation mode ,MAC users can just click command+E* or command+O to open from the history list or by class name. Windows Users can use ctrl+E.

Remember , you can do anything in the presentation mode.

2.2 Stretch the active window

Sometimes, the project window is too narrow to display the whole class name. Like this:

too narrow

In order to view the whole name, you must move the mouse to stretch the window. That is too inefficient.

In IntelliJ IDEA, You can just use keyboard shortcut to stretch the active window quickly.

For Windows Users:

  • Use the keyboard shortcut alt+1 to locate the active window of project view
  • Use the keyboard shortcut **ctrl+shift+[left right]** to stretch the window

For Mac Users:

  • IntelliJ IDEA–>Preferences–>keymap–>search for stretch, you can see this: Mac stretch keymap

  • Use the keyboard shortcut command+1 to locate the active window of project view
  • Use the keyboard shortcut **command+shift+[left right]** to stretch the window

After stretch, we see the whole class name: After stretch

3. summary

You can find all the default keymap of IntelliJ IDEA here: