Idea shortcuts

IntelliJ IDEA has keyboard shortcuts for most of its commands related to editing, navigation, refactoring, debugging, and pretty much everything else we might want to do regularly. Learning and practicing these shortcuts so they get loaded into our muscle memory can help us to stay in the state of flow.

Alt + Enter

This keyboard shortcut can be used to fix just about anything by showing us actions for the current context.

F2

 To jump to next error

Alt+1

 Alt+1 (Windows/Linux) opens or closes the project window and puts the focus in there

Esc

 

To put the focus back on the editor, press escape.  Whatever tool window is open, this will put you back in the editor so you can carrying on working with the code. 

Ctrl+E

We can view the most recently opened file using  Ctrl+E (Windows/Linux).  

Ctrl+B

 With Ctrl+B (Windows/Linux) we can go to declaration of a symbol.

Alt+F7

 Alt+F7 will show us all the places something is used.

Ctrl Ctrl

No matter where we are in the IDE or which file is open, if we double tap Ctrl the Run Anything window opens.  By default, this shows a list of recently run configurations.

 Ctrl + W / Shift + Ctrl + W

We can select increasing or decreasing sections of code near the cursor with Ctrl+W or Ctrl+Shift+W.

 Shift+Ctrl+Enter

 If you press it while you’re writing a “for” loop, IntelliJ IDEA will add the curly braces and place your cursor inside the block.  In an “if” statement, it can add the parentheses [pəˈrenθəsɪs] 小括号 and curly braces 花括号and again place your cursor in the correct spot.

Ctrl+Alt+L

We can easily format the current file to the project’s standards using Ctrl+Alt+L. 

Shift+Ctrl+Alt+T

 When we press this shortcut on a symbol or selection we are shown the refactoring options available.

Shift+Ctrl+A

 Use Shift+Ctrl+A to search for any action in IntelliJ IDEA. Find action will let us search for actions of course, but also settings so we can change settings directly from here.  We can also search for and open tool windows.

Shift shift

Double pressing the shift key opens a search box that lets us look for anything
上一篇:【行研资料】在线音频内容消费市场分析2022——附下载


下一篇:2022-2023学年英语周报七年级第6期答案及试题