This is the 7th day of my participation in the August More Text Challenge
Like and see, unlimited power. Wechat search “program ape Alang”.
This article Github.com/niumoo/Java… And unread code blog has been covered, with lots of knowledge points and a series of articles.
“If you want to do a good job, you must sharpen your tools.”
Two years, this is my IDEA practical skills summary, I used to be an Eclipse loyal user, until one day I use IntelliJ IDEA, Eclipse began to lie dead in the hard disk…….
IDEA is a very useful tool. Its syntax is smart enough to tell you that there is a better way to write code that is not smart (or stupid). When you master the common shortcut keys, the development efficiency increases by N times; The speed and quality of the code will improve as you become proficient in it.
So with all that said, where exactly can you buy one? Oh no, how do you use it?
1. Window switch – Lingbo micro step
The “Lingbo micro step” is an excellent exercise, so it is listed at the end of the scroll. Based on the hexagrams 8864 in the BOOK of Changes, the user moves along the hexagrams in a specific order, from the first step to the last step in a large circle. This footwork is exceptionally delicate. Source: “Tian Long Ba Bu” by Jin Yong.
The “Lingbo micro step” in IDEA is just such a circle of commonly used Windows, evenly distributed around the editing window, and equipped with convenient shortcut keys, it is very fast to switch.
In the actual development process, the operation of window switch is very frequent, the following several shortcut keys are essential.
Shortcut:
-
ALT +1 To display/hide the file window ⭐.
-
ALT + 2 shows/hides the Favorites window.
-
ALT + 4 Displays or hides the running window.
-
ALT + 6 shows/hides the Todo window.
-
ALT + 7 shows/hides the class structure window.
2. Project switching – in rather than out
It is not propriety not to come but to give; It is not propriety not to give out but to receive. Source: “The Book of Rites · Qu Li Shang”
Many times during development, you will have multiple projects open at the same time. If you click on the window to switch the window, it will be inefficient and will affect the pleasure of typing. Since multiple project Windows are open at the same time, it is a bit disappointing to be a window neighbor without being able to come and go freely.
Shortcut:
- Previous project window CTRL + ALT + [.
- Previous project window CTRL + ALT +].
3. File location – Come and go as you please
If the body is not tied to the boat, a flow to stop; The heart is like grey wood, what knife cut incense coating? Come and go as you please. Source: “Zhuangzi · Liyukou” by Warring States · Zhuangzi
File location is a very common operation.
-
CTRL + N searches for Java class files ⭐.
-
CTRL + SHIFT + N Searches all files.
-
CTRL + E opens recently browsed files, CTRL + E again can show only changed files.
-
CTRL + SHIFT + E opens the most recently browsed files. CTRL + SHIFT + E again displays only the changed files.
-
SHIFT + left mouse button to close the file.
4. Code localization — A lot of steps
There were people in Chu who were good at shooting. Go to willow leaf 100 step and shoot it, 100 hair 100 in. Source: Strategies of the Warring States · Strategies of the West Zhou Dynasty
Anyone who has used Eclipse knows how slow text search is, and it feels like wasting your life looking at the slow progress bar when searching for multiple projects. The IDEA speed is guaranteed to make you wowed the first time you use it. Millisecond response speed (automatic ignore CPU 100%, manual funny), intelligent search mode, not too comfortable.
So with all this talk, how do you use it?
Super common shortcuts:
- CTRL + SHIFT + F Full text search for project code ⭐.
- CTRL + SHIFT + ALT + N search function, automatic fuzzy matching, very powerful.
- CTRL + W universal select shortcut keys, fondle, multi-layer nesting is very useful ⭐.
5. Code – Magic
I said nothing, and he answered quickly. Jin Shengtan: ‘A truly brilliant pen’ source: Yuan · Wang Shifu, “Romance of the Western Chamber”
Basic code manipulation is the most used in daily development, and small shortcuts make our development comfort constantly climb. Low key. It’s all basic.
- ALT + ENTER universal intelligent key, powerful to extricate themselves ⭐.
- CTRL + ALT + L code formatting ⭐.
- CTRL + SHIFT + R project full text code find and replace ⭐.
- SHIFT + F6 Refactoring – Rename ⭐.
- Iter + Tab generation enhanced for loop ⭐.
- Itar + Tab generates a for loop.
- PSVM + Tab generates the main method.
- Sout + Tab generates system.out.println ().
- CTRL + F finds text.
- CTRL + R replaces the text.
- CTRL + D copies the lines.
- CTRL + X cuts lines.
- CTRL + Y deletes rows.
- CTRL + / to comment or uncomment a line.
- CTRL + SHIFT + / Block comment or unblock comment.
- CTRL + SHIFT + ENTER automatically fills the closing semicolon or the closing curly brace {}.
- CTRL + U toggles case and case.
6. Amazing – Hidden
I have to say that IDEA is more comfortable to use because it can always think what you want. In the process of using IDEA, unexpected and surprising functions are often found.
6.1 Plug-in Integration
A useful plug-ins can get twice the result with half the effort for development, the IDEA support rich plug-in extension, whether it helps code development plug-in, or help analysis plug-in, or a small tool plug-ins, theme or plugin, etc., are very rich, often because of a problem in your development is struggling, you may lack of pil is a plug-in.
Here are just a few of my favorite plugins, and more can be explored on your own.
- A8Translate, a tool for translating English.
- Eclipse Code Formatter, can be combined with Ali Code formatting file for formatting.
- Lombok, Lombok annotation support.
- Maven Helper, Maven dependency processing.
6.2 Rest Client
When you want to simply test the response of an interface call, you don’t have to open your Postman. IDEA already integrates Rest Client testing tools for you by default. CTRL+ SHIFT + A and search restful.
6.3 Shear Board History
I heard that you copied a bunch of code, and then copied a bunch of code, embarrassing, the previous copy is lost. Don’t panic, IDEA you want to think, built-in paste board history. Just use the shortcut keys CTRL + SHIFT + V.
6.4 FORMATTING JSON
When the console prints a JSON string, you can right-click to format the display, which is handy for calling tests on the INTERFACE of a JSON response.
6.5 Demo Mode
Press ALT + V to select Enter Presentation Mode to Enter the Presentation Mode. The editing window can be enlarged, which is very suitable for code operation demonstration. If you are familiar with IDEA shortcut keys, the operation will still be smooth and smooth.
6.6 Completion judgment
IDEA can be used to determine whether an object is null or to nullify a string.
Such as:
Content. Notnull Enter can automatically generate the following code. There are many similar operations in IDEA.
In this paper, some IDEA using skills are often used in work, of course, IDEA functions are far more than these.
After < >
Hello world:) I’m Aaron, a tech tool guy on the front line.
The likes are all talented, not only handsome and good-looking, but also good to talk.
This article is constantly updated. You can follow the public account “Program Ape Alang” or visit the “unread Code blog”.
I have prepared a series of knowledge points and must-see books.
This article Github.com/niumoo/Java… Welcome to Star!