summary
In recent years, I have seen a lot of people using IntelliJ when I traveled around SNS, and there seems to be more users compared to the past.
I have been using IntelliJ instead of Eclipse since 2012 and I like IntelliJ. I also like to handle and optimize several development-related TOOLs. (“It’s a personal idea that there’s a reason in the IDE for money and selling.”)
Since IntelliJ is a paid IDE, I thought it would be harmful if I did not use the functions fully. That’s why I found and found the IntelliJ J 42 Tips Intro video that I found and found on the Internet. Please note that this video does not have a big deal to understand translation even if you enable Korean subtitles.
This post is targeted for users who want to jump to Intermediate rather than IntelliJ beginner.
Content summary
Productivity Guide
- This function summarizes the functions that the intelligent developer deems useful, and automatically records if the user actually used them.
- It can be seen that the frequency used in each function and the most recent usage time are recorded.
- It is meaningful to learn useful tips one by one though you are familiar with manuals, but it is a good feature to look for functions you do not know.
Presentation Assistant plug-in
- How to install: settings -> plugins -> browse repositories -> Installing Presentation Assistant
- When the plug-in is installed, the function and shortcut keys are displayed like a snapshot every time the function is executed.
Do not use tabs
- When using tabs, you have to remember the hassle of using the mouse aggressively and the position and class of tabs in your head. (Which may be inefficient)
- IntelliJ has many ways to make navigation easier, so take advantage of it.
- How to remove the tab is as follows.
- I was satisfied when I put this part into practice. There are two reasons for this.
- Unconsciously switching / managing tabs is rather inefficient. IntelliJ is not inconvenient because there are many powerful file navigation options.
-
It can be used more comfortably without tabs when developing on a relatively small screen such as a notebook environment.
-
Alternative 1: Use the file search function.
- Workaround 2: Take advantage of the recently used file features.
Tips for using keyboard shortcuts (use the keyboard instead of the mouse)
In video, IntelliJ recommends / recommends using the keyboard with only the keyboard without using the mouse as much as possible. IntelliJ can do hotkey bindings for almost all functions. There is also an option to use the keyboard or check the frequency of use of shortcuts, even if you do not know all the shortcuts.
Basic Hotkey Reference
This function can be useful for those who need to summarize or print key shortcuts as the officers in the army are familiar with Hangul / Excel shortcuts.
Find Action
- Intelligence has a Find Action function to find all the actions. A function that does not memorize shortcut keys or does not need to memorize because of its low frequency can be found and executed through Find Action.
- For example, if you do not memorize the Commit Change shortcut ctrl + k, you can search for the commit in the Find Action to find out the function.
- With this function, you can specify detailed actions that can be landed at the same time as Run, Maven Build, and detailed menu of Settings.
File navigation
As mentioned above, IntelliJ recommends keyboard-based development, so the following file navigation features are powerful and useful.
Autoscroll from Source
- If the file is selected, the function to find and display the file structure from the file project tab (also in Eclipse)
- IntelliJ can move to the project tab at any time with Alt + 1, which is useful when combined with this feature.
File Finder Feature # 1, star pattern available
- In fact, Eclipse is also possible, not the advantage of IntelliJ.
File Finder Feature # 2, Can be abbreviated
- It’s a file finder in Eclipse, but it also looks for non-connect strings like snapshots.
File Finder Feature # 3, Directory Search
- Folder is also search target. When the folder is selected, the cursor moves in the project window.
File Finder Feature # 4, Specify File and Line
- If you specify a line at the same time as the source search, it moves to a specific line.
- This is useful when looking for Tomcat error classes + lines.
Find a method
- You can find it directly in the method as below.
Double tap
- If you press the shift key two times faster, the search function for all is activated.
- If you have recently browsed through various categories of files, class names, file names, etc., you can move the category by tapping the tab.
- You can even double-tap to run configuration.
Editor / Window Focus Action Mechanism
When alt + 0 ~ 9 is called, a window is opened. When the window is opened, the focus is moved. * When you press Esc in the window focus state, the focus is on the editor window unconditionally.
Editor / Window Focus Tips
Project Shortcuts
- You can specify the display / non-display of project window by using shortcut key.
- I prefer to keep the project window open by default, but occasionally when I see a code with a long Width, I sometimes close the project window with a shortcut key. At this time, the function is utilized.
Reducing the Project Window
- You can reduce project window, build related window (Maven / Grades), console log window, etc. in both up / down / left / right by keyboard only.
- It is useful when developing with notebook.
Stretch window
- You can reduce the project window, the build related window (Maven / Grabler), the console log window, etc. by using only the keyboard.
- It is useful when developing with notebook.
Hide / Show all windows
- When there is work to clean the window, close all windows and reopen only the necessary windows.
- Or use the laptop occasionally when you want to see the source as wide as possible.
Editing Tips
Optional extensions
- Word selection is useful in development, and IntelliJ has a useful feature that allows you to extend the selection to an increasingly larger namespace (?).
- For example, if there is a private String a; if you expand the selection once, twice, and three times in a cursor, it will expand as follows. * First Extension: a Select * Second Extension: String a Optional * Third extension: private String a
- ** I like this feature very useful when editing code **
FileStructure
It’s also a feature in Eclipse, but it’s useful when looking for methods. * ** It recognizes recognition, abbreviations, and segmented words regardless of case. **
Parameter information
- Parameter information can be checked quickly by tool tip when writing method.
View class structure
- If you look at the class structure at all times, you can show / hide the window with this function.
- I replace it with file struceture and use it as a shortcut.
- Likewise, there is an advantage in using screen space when developing with notebook.
Paste Options
- When editing code, you may need to work on the code to cut and paste.
- At this time, you can use utilities separately, but you can use it as a function that is provided in IntelliJ.
autocomplete
Smart autocomplete
- Smart autocompletion supports autocompletion to semicolon, for example, unlike general autocompletion.
- It also provides automatic completion recommendation up to the method level.
- In my case, the autocomplete shortcut key (based on Windows / Linux) is using ctrl + space instead of smart autocomplete.
Statement autocomplete
- If the statement is not complete, it will be completed automatically.
- If the semicolon is missing, you can take a semicolon on the same line, regardless of the cursor position. The * if statement also generates {}.
notnull autocomplete
- In case of notnull processing which is frequently used in Java development, code can be completed by the following method.
Language Support
Language Injection
- You can specify the language of the string as shown below.
- For example JSON, you can edit JSON more conveniently and error-free in the following way.
Sorround With
- Wrapping code / tag in various syntax as below is possible.
Generate css grammar 1
- In a small but HTML code area, you can generate tags with CSS syntax.
Using Regular Expressions
- Regular expression tests can be done easily by specifying the language of the string as a regular expression.
Debugging
Debugging for Java 8
- For Java 8, if you want to specify a breakpoint, you can divide the BP by the namespace, even if it is the same line.
Use breakpoint rightclick
- You can specify the following additional conditions when you right-click on a breakpoint. You can specify more granular conditions by pressing more again here.
Etc
REST Client
- There are many other tools, but the REST Client is built-in.
Presentation Mode
- If live coding is required, activate the presentation mode and the code changes to the enlarged screen.