diff --git a/develop/ide-tips-and-tricks.md b/develop/ide-tips-and-tricks.md
index 338cde619..392a331a0 100644
--- a/develop/ide-tips-and-tricks.md
+++ b/develop/ide-tips-and-tricks.md
@@ -11,21 +11,23 @@ This page gives useful bits of information, to speed up and ease the workflow of
It may take some time to learn and get used to the shortcuts and other options. You can use this page as a reference for that.
::: warning
-Key binds in the text are listed as Windows shortcuts and refer to the default keymap of IntelliJ IDEA, if not stated otherwise.
-Refer to the `File > Setings > Keymap` Settings or search for the functionality elsewhere if you are using a different Keyboard layout.
+Key binds in the text refer to the default keymap of IntelliJ IDEA, if not stated otherwise.
+Refer to the `File > Setings > Keymap` Settings or search for the functionality elsewhere if you are using a different keyboard layout.
:::
## Traversing Projects{#traversing-projects}
### Manually{#manually}
-IntelliJ has many different ways of traversing projects. If you have generated sources using the `./gradlew genSources` commands in the terminal or used the `Tasks > fabric > genSources` Gradle Tasks in the Gradle Window, you can manually go through the source files of Minecraft in the
-Project Window's External Libraries.
+IntelliJ has many different ways of traversing projects. If you have generated sources using the `./gradlew genSources` commands in the terminal or
+used the `Tasks > fabric > genSources` Gradle Tasks in the Gradle Window, you can manually go through the source files of Minecraft in the Project Window's External Libraries.
![Gradle Task](/assets/develop/misc/using-the-ide/traversing_01.png)
-The Minecraft Source code can be found if you look for `net.minecraft` in the Project Window's External Libraries. If your project uses split sources from the online [Template mod generator](https://fabricmc.net/develop/template/), there will be two sources, as indicated by the name (client/common). Additionally other sources of projects, libraries and dependencies, which are imported via the `build.gradle` file
-will also be available. This method is often used when browsing for assets, tags and other files.
+The Minecraft Source code can be found if you look for `net.minecraft` in the Project Window's External Libraries.
+If your project uses split sources from the online [Template mod generator](https://fabricmc.net/develop/template/), there will be two sources, as indicated by the name (client/common).
+Additionally other sources of projects, libraries and dependencies, which are imported via the `build.gradle` file will also be available.
+This method is often used when browsing for assets, tags and other files.
![External Library](/assets/develop/misc/using-the-ide/traversing_02_1.png)
@@ -36,11 +38,14 @@ will also be available. This method is often used when browsing for assets, tags
Pressing Shift twice opens up a Search window. In there you can search for your project's files and classes. When Activating the checkbox `include non-project items`
or by pressing Shift two times again, the search will look not only in your own project, but also in other's, such as the External Libraries.
+You can also use the shortcuts ⌘/CTRL + N to search classes and ⌘/CTRL + Shift + N to search all _files_.
+
![Search Window](/assets/develop/misc/using-the-ide/traversing_03.png)
### Recent Window{#recent-window}
-Another useful tool in IntelliJ is the `Recent` window. You can open it with the Shortcut CTRL + E. In there you can jump to the files, which you have already visited and open tool windows, such as the [Structure](#structure-of-a-class) or [Bookmarks](#bookmarks) window.
+Another useful tool in IntelliJ is the `Recent` window. You can open it with the Shortcut ⌘/CTRL + E.
+In there you can jump to the files, which you have already visited and open tool windows, such as the [Structure](#structure-of-a-class) or [Bookmarks](#bookmarks) window.
![Recent window](/assets/develop/misc/using-the-ide/traversing_04.png)
@@ -48,22 +53,24 @@ Another useful tool in IntelliJ is the `Recent` window. You can open it with the
### Jump to Definition / Usage{#jump-to-definition-usage}
-If you need to check out either the definition or the usage of variables, methods, classes, and other things, you can press CTRL + Left Click
+If you need to check out either the definition or the usage of variables, methods, classes, and other things, you can press ⌘/CTRL + Left Click / B
or use Middle Mouse Button (pressing mouse wheel) on their name. This way you can avoid long scrolling sessions or a manual
search for a definition which is located in another file.
+You can also use ⌘/CTRL + ⌥/Shift + Left Click / B
+
### Bookmarks{#bookmarks}
You can bookmark lines of code, files or even opened Editor tabs.
Especially when researching source codes, it can help out to mark spots which you want to find again quickly in the future.
Either right click a file in the `Project` window, an editor tab or the line number in a file.
-Creating `Mnemonic Bookmarks` enables you to quickly switch back to those bookmarks using their hotkeys, CTRL and the digit, which you have chosen for it.
+Creating `Mnemonic Bookmarks` enables you to quickly switch back to those bookmarks using their hotkeys, ⌘/CTRL and the digit, which you have chosen for it.
![set Bookmark](/assets/develop/misc/using-the-ide/traversing_05.png)
It is possible to create multiple Bookmark lists at the same time if you need to separate or order them, in the `Bookmarks` window.
-[Breakpoints](./basic-problem-solving#breakpoint) will also be displayed in there.
+[Breakpoints](./basic-problem-solving#breakpoint) will also be displayed there.
![Bookmark window](/assets/develop/misc/using-the-ide/traversing_06.png)
@@ -71,7 +78,7 @@ It is possible to create multiple Bookmark lists at the same time if you need to
### Structure of a Class{#structure-of-a-class}
-By opening the `Structure` window (Alt + 7) you will get an overview of your currently active class. You can see which Classes and Enums
+By opening the `Structure` window (⌘/Alt + 7) you will get an overview of your currently active class. You can see which Classes and Enums
are located in that file, which methods have been implemented and which fields and variables are declared.
Sometimes it can be helpful,
@@ -81,7 +88,7 @@ to activate the `Inherited` option at the top in the View options as well, when
### Type Hierarchy of a Class{#type-hierarchy-of-a-class}
-By placing the cursor on a class name and pressing CTRL + H you can open a new Type Hierarchy window, which shows all parent and child classes.
+By placing the cursor on a class name and pressing ⌘/CTRL + H you can open a new Type Hierarchy window, which shows all parent and child classes.
![Type Hierarchy window](/assets/develop/misc/using-the-ide/analyzing_02.png)
@@ -89,20 +96,20 @@ By placing the cursor on a class name and pressing CTRL + HCTRL + Space to open them up again.
+Code completion should be activated by default. You will automatically get the recommendations while writing your code.
+If you closed it by accident or just moved your cursor to a new place, you can use ⌘/CTRL + Space to open them up again.
For example, when using Lambdas, you can write them quickly using this method.
![Lambda with many parameters](/assets/develop/misc/using-the-ide/util_01.png)
-### Code Generation {#code-generation}
+### Code Generation{#code-generation}
-The Generate menu can be quickly accessed with ⌘/CTRLN.
+The Generate menu can be quickly accessed with Alt + Insert (⌘ Command + N on Mac) or by going to `Code` at the top and selecting `Generate`.
In a Java file, you will be able to generate constructors, getters, setters, and override or implement methods, and much more.
You can also generate accessors and invokers if you have the [Minecraft Development plugin](./getting-started/setting-up-a-development-environment#minecraft-development) installed.
-In addition, you can quickly override methods with ⌘/CTRLO and implement methods with ⌘/CTRLI.
+In addition, you can quickly override methods with ⌘/CTRL + O and implement methods with ⌘/CTRL + I.
![Code generation menu in a Java file](/assets/develop/misc/using-the-ide/generate_01.png)
@@ -113,7 +120,7 @@ In a Java test file, you will be given options to generate related testing metho
### Displaying Parameters{#displaying-parameters}
Displaying parameters should be activated by default. You will automatically get the types and names of the parameters while writing your code.
-If you closed them by accident or just moved your cursor to a new place, you can use CTRL + P to open them up again.
+If you closed them by accident or just moved your cursor to a new place, you can use ⌘/CTRL + P to open them up again.
Methods and classes can have multiple implementations with different parameters, also known as Overloading. This way you can decide on which
implementation you want to use, while writing the method call.
@@ -129,35 +136,39 @@ Many IDEs have an extensive tool kit to aid in this process. In IntelliJ simply
![Refactoring](/assets/develop/misc/using-the-ide/refactoring_01.png)
-It is especially useful to get used to the `Rename` refactoring tool's key bind, Shift + F6, since you will rename many things in the future. Using this feature,
-every code occurrence of the renamed code will be renamed and will stay functionally the same.
+It is especially useful to get used to the `Rename` refactoring tool's key bind, Shift + F6, since you will rename many things in the future.
+Using this feature, every code occurrence of the renamed code will be renamed and will stay functionally the same.
### Search and Replace File Content{#search-and-replace-file-content}
Sometimes simpler tools are needed to edit code occurrences.
-| Key bind | Function |
-|---------------------------------------------------| ----------------------------------------------------------- |
-| CTRL + F | Find in current file |
-| CTRL + R | Replace in current file |
-| CTRL + Shift + F | Find in a bigger scope (can set specific file type mask) |
-| CTRL + Shift + R | Replace in a bigger scope (can set specific file type mask) |
+| Key bind | Function |
+| --------------------------------------------------- | ----------------------------------------------------------- |
+| ⌘/CTRL + F | Find in current file |
+| ⌘/CTRL + R | Replace in current file |
+| ⌘/CTRL + Shift + F | Find in a bigger scope (can set specific file type mask) |
+| ⌘/CTRL + Shift + R | Replace in a bigger scope (can set specific file type mask) |
-If enabled, all of those tools allow for a more specific pattern matching using "[Regex](https://en.wikipedia.org/wiki/Regular_expression)".
+If enabled, all of those tools allow for a more specific pattern matching using [Regex](https://en.wikipedia.org/wiki/Regular_expression).
![Regex replace](/assets/develop/misc/using-the-ide/search_and_replace_01.png)
-## Comments{#comments}
+### Other Useful Keybinds{#other-keybinds}
-Good code should be easily readable and [self-documenting](https://bytedev.medium.com/code-comment-anti-patterns-and-why-the-comment-you-just-wrote-is-probably-not-needed-919a92cf6758). Picking expressive names for variables, classes and methods can help a lot, but sometimes
-comments are necessary to leave notes or **temporarily** disable code for testing.
+Selecting some text and using ⌘/CTRL + Shift + ↑ Up / ↓ Down can move the selected text up or down.
-### Prepare Shortcuts{#prepare-shortcuts}
+In IntelliJ, the keybind for `Redo` may not be the usual ⌘/CTRL + Y (Delete Line).
+Instead, it may be ⌘/CTRL + Shift + Z. You can change this in the **Keymap**.
+
+For even more keyboard shortcuts, you can see [IntelliJ's documentation](https://www.jetbrains.com/help/idea/mastering-keyboard-shortcuts.html).
+
+## Comments{#comments}
-To comment out code faster, open IntelliJ's Settings, look for the `Comment with Line Comment`
-and the `Comment with Block Comment` entries, and set their Key binds to your preferences.
+Good code should be easily readable and [self-documenting](https://bytedev.medium.com/code-comment-anti-patterns-and-why-the-comment-you-just-wrote-is-probably-not-needed-919a92cf6758).
+Picking expressive names for variables, classes and methods can help a lot, but sometimes comments are necessary to leave notes or **temporarily** disable code for testing.
-![Keymap settings](/assets/develop/misc/using-the-ide/comments_01.png)
+To comment out code faster, you can select some text and use the ⌘/CTRL + / (line comment) and ⌘/CTRL + ⌥/Shift + / (block comment) keybinds.
Now you can highlight the necessary code and use the shortcuts, to comment the section out.
@@ -182,8 +193,9 @@ private static int secondsToTicks(float seconds) {
### Region Comments{#region-comments}
-In IntelliJ, right next to the line numbers, you can have small [+] and [-] icons. Those can be used to temporarily collapse methods, if-statements, classes and many other things
-if you are not actively working on them. To create a custom block which can be collapsed, use the `region` and `endregion` comments.
+In IntelliJ, right next to the line numbers, you can have small [+] and [-] icons.
+Those can be used to temporarily collapse methods, if-statements, classes and many other things if you are not actively working on them.
+To create a custom block which can be collapsed, use the `region` and `endregion` comments.
```java
// region collapse block name
@@ -218,8 +230,8 @@ which uses those type of comments.
### Javadocs{#javadocs}
-A great way of documenting your code is the usage of JavaDoc. JavaDocs not only provide useful information for implementation of methods and classes, but are also
-deeply integrated into IntelliJ.
+A great way of documenting your code is the usage of JavaDoc.
+JavaDocs not only provide useful information for implementation of methods and classes, but are also deeply integrated into IntelliJ.
When hovering over method or class names, which have JavaDoc comments added to them, they will display this information in their information window.
@@ -239,7 +251,8 @@ Jetbrains has many good talks, videos and documentation pages about how to furth
### PostFix Completion{#postfix-completion}
-Use PostFix Completion to alter code after writing it quickly. Often used examples contain `.not`, `.if`, `.var`, `.null`, `.nn`, `.for`, `.fori`, `.return` and `.new`. Besides the existing ones, you can also create your own in IntelliJ's Settings.
+Use PostFix Completion to alter code after writing it quickly. Often used examples contain `.not`, `.if`, `.var`, `.null`, `.nn`, `.for`, `.fori`, `.return` and `.new`.
+Besides the existing ones, you can also create your own in IntelliJ's Settings.
@@ -255,6 +268,7 @@ Anton Arhipov from Jetbrains also had an in depth talk about Regex Matching, Cod
-For even more information, check out [Jetbrains' Tips & Tricks site](https://blog.jetbrains.com/idea/category/tips-tricks/). Most of their posts are also applicable to Fabric's ecosystem.
+For even more information, check out [Jetbrains' Tips & Tricks site](https://blog.jetbrains.com/idea/category/tips-tricks/).
+Most of their posts are also applicable to Fabric's ecosystem.
---