Updated March 4, 2023
Introduction to IntelliJ Cheat Sheet
IntelliJ cheat sheet support various programming languages like Java, CloudSlang, Clojure, Dart, Erlang, Go, Groovy, JavaScript, PHP, Ruby or JRuby, TypeScript, HTML, Perl, Haxe, Rust, Scala, XML/JSL, Kotlin, Haskell, Lua, Julia, and Python. It supports the platforms and technologies like Android, Junit, Maven, TestNG, Django, EJB, Grails, JSF, JSP, Node.js, Play, struts, web services, Hibernate, and ruby on rails, etc.
IntelliJ
- IntelliJ is also referred to as IntelliJ IDEA, and it is a Java integrated development environment (IDE). It is used for creating or developing software. JetBrains develop it. It is written in Java. It was initially released in the year 2001, but since 2010, it is also one of the top tools used for Java programming. It supports the operating systems that are windows, Mac OS, Linux.
- IntelliJ IDEA has a lot of features like completion of code after analyzing the context, code navigation that allows shifting to class or directly declaration of code, code refactoring, and options to fix inconsistencies. It also provides integration with other tools like Gradle, grunt, etc., and version controls like GIT, SVN, etc. and databases like MSSQL server, MySQL and Oracle.
Commands and Content on IntelliJ Cheat Sheet
The IntelliJ cheat sheet has an extensive library, scalable, extendable, and interactive and contains many inbuilt methods to compute common operations. There are different commands available to perform basic selection, code completion and refactoring commands.
Below is the IntelliJ Cheat sheet for commands mentioned which perform different kinds of operations:
Command | Description |
Ctrl + / | This command is used to Comment Line |
Ctrl + Shift + / | It is used to Comment Block |
Ctrl + D | It is to Duplicate Line |
Alt + Shift + Down/Up | To Move line |
Ctrl + Alt + Shift + Down/Up | To Move the Whole statement |
Ctrl + – | It is to Collapse block |
Ctrl + + | It is used to Expand block |
Ctrl + Shift + +/- | When we need to Collapse/ Expand the whole file |
Ctrl + A | Need to Select Whole life |
Ctrl + W | When to Extend the selection to the next block |
Ctrl + Shift + W | It is used to Shrinks selection |
Alt + J | When to Select next occurrence |
Alt + Shift + J | When to Deselect next occurrence |
Ctrl + shift + F7 | Helps in Highlight all usages in file |
Ctrl +Alt + Shift + J | It is to Select all occurrence in the file |
Ctrl + Space | Suggest |
Ctrl + Space X2 | Getting the Deeper level suggestion |
Ctrl + shift + space | It helps in getting the List of matching suggestion |
Ctrl + shift + space x2 | A suggestion in return statement |
Ctrl + Shift + enter | Complete statement |
Shift + F6 | Rename |
Ctrl + Alt + V | Extract variable or field |
Ctrl + Alt + M | Encapsulate code in a new method |
Ctrl + Alt + C | Extract selected expression in a context |
Ctrl + Alt + P | Extract selected expression in a parameter |
Ctrl + Alt + T | Surround selected code |
There are some other commands available on code assistance and navigation; please find below:
Command | DESCRIPTION |
Ctrl + P | It is used to see the method signature |
Ctrl + J | It is used to insert a live template |
Ctrl + Q | It is to see the method documentation |
Ctrl + Alt + L | Used to Reformat code |
Ctrl + shift + i | It is to see the definition |
F2 | It helps in finding the next highlighted error in a file |
Ctrl + F1 | It is used to see the description error |
Alt + Enter | It provides a suggested solution |
Ctrl + N | When it is required to search class |
Ctrl + Shift +N | It is used to search file |
F4 | It helps in Jump to source |
Ctrl + B | Jump to declaration |
Ctrl + Alt + B | Jump to implementation |
Ctrl + F12 | It is used to see a file structure |
Free Tips and Tricks of using IntelliJ Cheat Sheet for commands
- IntelliJ IDEA comes with two very useful preconfigured quick-lists that are as below.
- Refactor This (Ctrl + Alt + Shift + T on Windows/Linux and Ctrl + T on Mac OS)
- VCS Operations (Alt+` on Windows/Linux and Ctrl + V on Mac OS).
- With the help of the IntelliJ idea, resize of tool windows can be done with the command Ctrl + shift + arrows on windows/ Linux and shift + cmd + arrows on Mac OS.
- The following command can be used ‘Win + up’ on windows and ‘Ctrl + cmd + =’ on Mac OS to maximize the window.
- The following command can be used ‘Ctrl + Alt + J’ on Windows or Linux and Cmd + ‘ on Mac OS to move to the next project window.
- In IntelliJ, there are many keyboard settings. Smart keys can be used to toggle automatic insertion of pair brackets, quotes, and curly braces and enable camel humps. Smart keys can be enabled through Settings -> Editor -> general -> Smart keys.
- There is one important thing make sure that chosen keymap does not conflict with OS. The following are the Ubuntu commands:
- Shade Window, assigned to Ctrl + Alt + S, clashes with Settings
- Lock Screen, assigned to Ctrl + Alt + L, clashes with Reformat Code
- Launch Terminal, assigned to Ctrl + Alt + T, clashes with Surround With
- Switch to Workspace, assigned to Ctrl + Alt + Arrows, clashes with in-IDE navigation
- Move Window, assigned to Alt + F7, clashes with Find Usages
- Resize Window, assigned to Alt + F8, clashes with Evaluate Expression
- Virtual Consoles, assigned to Ctrl + Alt + F12, clashes with Commit
Conclusion
The IntelliJ cheat sheet is getting popular among developers nowadays for working on javascript, and Json, and other Java programming or scripting languages. It is mostly simple, easy, and flexible with all the platforms. It helps in running, debugging, compiling, and testing the applications. It is used to deploy the application, analyze the application, view the structure and hierarchy of source code, module dependencies, and work with artefacts and use file watchers. This is mainly compatible with almost all the tools, framework, version control, and technologies, because of which it is the first choice nowadays to work with for any developer.
Recommended Articles
This has been a guide to IntelliJ Cheat Sheet here; we have discussed the content and command as well as free tips and tricks of IntelliJ Cheat Sheet; you may also look at the following articles to learn more –