Intellij idea
❗ These are MY favorite tips
Shortcuts
-
Ctrl+Alt+<-/->
back or forward place,Alt+<-/->
left or right tab -
Ctrl+Alt+H
search in hierarchy (ctrl+shift+f
) -
Ctrl+Alt+L
format current file -
Ctrl+Alt+S
open settings,Ctrl+Alt+Shift+S
open project settings -
Ctrl+Alt+O
optimize import -
Ctrl+Shift+I
preview implementation -
Ctrl+Shift+F10
-
Ctrl+Shift+Alt+T
show refactoring options -
Ctrl+B
go to the declaration,Ctrl+Alt+B
navigate to an implementation -
Ctrl+C/X
copy or cut the whole line -
Ctrl+D
duplicate line or selection -
Ctrl+E
view the most recently opened files -
Ctrl+N
find classes -
Ctrl+W
/Ctrl+Shift+W
increasing or decreasing sections of code near the cursor -
Ctrl+Y
delete line -
Alt+F7
find where something is used -
Alt+F8
+Ctrl + Enter
evaluate expression + execute -
Alt+1
open/close project window -
F2
jump to the next error, warning or suggestion. -
F4
jump to source -
Alt+J
add selection for next occurrence -
LocalHistory
>show History
-
Help
>Change Memory Settings
>Edit Custom VM Options
Settings
Appearance
>Theme
>> [NEWUI] Gradianto Deep OceanEditor
>General
>Code Completion
>> UncheckMatch case
, ignore cases for auto-completionEditor
>General
>Apperarance
>> CheckShow method separators
Editor
>General
>Editor Tabls
>> UncheckShow tabls in one row
(tab limit
)
Global setting
File
>New Projets SetUp
>Settings for New Projets
>> For ex, Maven settings
Get rid of the pop-up message asking to trust certificate
File | Settings | Tools | Server Certificates for Windows and linux
Open File or Project
dialog window hangs in loading state since new UI
It's possible to use a native file chooser on Windows. To enable it, add the following properties to the Help | Edit Custom Properties file and restart IDE :
sun.awt.windows.useCommonItemDialog=true
ide.win.file.chooser.native=true
Open declaration source in the same tab
Uncheck Enable preview tab
in the settings of project view
Resolve Symbol ... is inaccessible from here
Java | Javadoc | Declaration has problems in Javadoc references
Uncheck Report inaccessible sympols
Plugins
- Pokemon progress
- GitHub Copilot
- Rainbow Brackets
- SequenceDiagram
- CodeGlance
- Key Promoter X
- SonarLint
- Save Actions
Live template
Junit test method
@org.junit.jupiter.api.Test
@org.junit.jupiter.api.DisplayName("$TEST_NAME$")
void $METHOD_NAME$() {
// GIVEN
// WHEN
// THEN
}
Parameterized test with value source
<template name="pvtest" value="@org.junit.jupiter.params.ParameterizedTest(name = "{index} $SUB_TEST_NAME$ {0}") @org.junit.jupiter.api.DisplayName("$TEST_NAME$") @org.junit.jupiter.params.provider.ValueSource($TYPE$ = {}) void $METHOD_NAME$($ARG$) { // GIVEN // WHEN // THEN }" description="Parameterized test with value source" toReformat="true" toShortenFQNames="true">
<variable name="TEST_NAME" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="SUB_TEST_NAME" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="TYPE" expression="enum("strings","booleans","ints","longs","floats","doubles","chars","shorts","bytes","classes")" defaultValue="strings" alwaysStopAt="true" />
<variable name="METHOD_NAME" expression="camelCase(TEST_NAME)" defaultValue="" alwaysStopAt="true" />
<variable name="ARG" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="JAVA_DECLARATION" value="true" />
</context>
</template>
Parameterized test with method source
<template name="pmtest" value="@org.junit.jupiter.params.ParameterizedTest(name = "{index} $SUB_TEST_NAME$ {0}") @org.junit.jupiter.api.DisplayName("$TEST_NAME$") @org.junit.jupiter.params.provider.MethodSource void $METHOD_NAME$($ARG$) { // GIVEN // WHEN // THEN } private static java.util.stream.Stream<org.junit.jupiter.params.provider.Arguments> $METHOD_NAME$() { return Stream.of(Arguments.of(), Arguments.of()); }" description="Parameterized test with method source" toReformat="true" toShortenFQNames="true">
<variable name="TEST_NAME" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="ARG" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="SUB_TEST_NAME" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="METHOD_NAME" expression="camelCase(TEST_NAME)" defaultValue="" alwaysStopAt="true" />
<context>
<option name="JAVA_DECLARATION" value="true" />
</context>
</template>
Docusaurus note header
<template name="noteHeader" value="--- id: $Label$ sidebar_label: $Label$ sidebar_position: $Pos$ --- # $Label$" description="" toReformat="false" toShortenFQNames="true">
<variable name="Label" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="Pos" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="OTHER" value="true" />
</context>
</template>
Markdown
- Code
<template name="text" value="`$TEXT$`" description="" toReformat="false" toShortenFQNames="true">
<variable name="TEXT" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="OTHER" value="true" />
</context>
</template>
- Code block
<template name="code" value="```$CODE_TYPE$ ```" description="" toReformat="false" toShortenFQNames="true">
<variable name="CODE_TYPE" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="OTHER" value="true" />
</context>
</template>