IntelliJ IDEA Convenient function for beginners (importance ★ 4)

This is a continuation of Importance ★ 5. IntelliJ IDEA convenient function for beginners (importance ★ 5) Mainly the items related to the items dealt with in ★ 5, we will introduce the functions that will be more convenient.

Setting items that will be more convenient

This time, most of the operations will be on the setting screen. You can open the setting screen from here. image.png

・ Live template settings

Just by using this setting, work efficiency will increase by several percent. Select Settings → Editor → Live Template to bring up this screen. image.png Press the + button in the upper right and click "Live Template". image.png Then you will see a screen like this. image.png If you rewrite this as you like, image.png I feel like this. Please note that you cannot use it unless you click the word "Definition" at the bottom and check the language you want to use. Also, if "Short fully qualified name" is checked, the live template will not work properly in some cases, so be careful. Click "Apply" or "OK" at the bottom right to complete the setting. Let's try it out.

prln has been converted toSystem.out.println ();. Set templates for frequently used sentences to improve work efficiency. ~~ However, this function is too convenient, and if you use it too much, you will not be able to write code on your own ~~

**-Code template settings **

For example, in Java, the main function that is written every time. There is a function that automatically writes it. The setting screen is here. image.png If it is a Class file that you usually write in Java, it will be reflected if you modify here. If you fill in the main function image.png in this way. Now, press "OK" to apply the settings and create a new Class file. Template_2.gif The file was created with the main function written. Of course, there are many other things you can write.

** ・ Shortcuts that are convenient to use **

★ Shortcut keys such as Ctrl + Z written in the article 5, but there are various other shortcuts. I will introduce the ones that are convenient to use.

** Execute ** (Ctrl + Shift + F10) It will execute the displayed source code. image.png Like this, most of the shortcuts are written beside the actions that have shortcuts, so you should look carefully.

** Convenient line break ** (Shift + Enter) You can start a new line from the middle of a line and go to the next line. kaigyou.gif

** Automatically arrange the code ** (Ctrl + Alt + L) Format.gif Even if you're writing code and it looks messed up, this will fix it for you.

** ・ Key map setting **

These are the shortcuts mentioned above, but you can add or change them yourself. image.png You can edit from here on the settings screen. You can search for an action from the search box in the upper right and assign a shortcut, or click the magnifying glass mark to the right and type in the shortcut to find out what action the shortcut is assigned to. The "Run" shortcut introduced above is hard to press, so you may want to assign another shortcut.

・ Convenient mouse action

Double-click on a word to select it. Then you can drag the selected part to take it wherever you like. Click.gif

★ 4 is over. ★ I will write about 3 or less as soon as I have time.

Recommended Posts

IntelliJ IDEA Convenient function for beginners (importance ★ 4)
IntelliJ IDEA Convenient function for beginners (importance ★ 5)
I made a plugin for IntelliJ IDEA
IntelliJ IDEA Convenient function for beginners (importance ★ 4)
IntelliJ IDEA Convenient function for beginners (importance ★ 5)
IntelliJ IDEA settings
IntelliJ Frequently Used Operation Notes
Gradle settings for using JUnit 5
Shortcut comparison for those migrating from Eclipse to IntelliJ IDEA (Windows)
[For beginners] How to implement the delete function
IntelliJ IDEA settings