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.
This time, most of the operations will be on the setting screen. You can open the setting screen from here.
Just by using this setting, work efficiency will increase by several percent. Select Settings → Editor → Live Template to bring up this screen. Press the + button in the upper right and click "Live Template". Then you will see a screen like this. If you rewrite this as you like, 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 to
System.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 ~~
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. 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 in this way. Now, press "OK" to apply the settings and create a new Class file. The file was created with the main function written. Of course, there are many other things you can write.
★ 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.
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.
** Automatically arrange the code ** (
Ctrl + Alt + L)
Even if you're writing code and it looks messed up, this will fix it for you.
These are the shortcuts mentioned above, but you can add or change them yourself. 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.
Double-click on a word to select it. Then you can drag the selected part to take it wherever you like.
★ 4 is over. ★ I will write about 3 or less as soon as I have time.