The best 10 Shortcuts of IntelliJ I would often use
Tags: intellij, beginners, programming
Published: 2022-07-10 02:34:52

## Introduction
IntelliJ provides us with many shortcut keys. It makes the development cycle speed up.
While it is convenient to use countless keys, more keys cause more confusion. I, therefore, picked up the essential keys on development and recorded them in this document. 
If you had any excellent keys that you strongly recommend, leave comments about them. I would update this document with your comment taking the screen capture. Thank you.


## Shortcut keys
The following shortcut keys are for Mac only. 
Using Windows, you can replace the command key in Mac with the control key in Windows. I'm guessing it might work.
　　


### 1. Expand editor
`⌘ 1` is used to expand the editor area while simultaneously closing the left-side window.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4rpkzdu3n8a5212mzhbz.gif)
　　


### 2. Switch editor tabs
This shortcuts, `⌘ shift [` and ` ]`, allow you to quickly switch between editor tabs, making it easy to focus on the specific tab you need, such as the Browser tab.  

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vrbk9hw0c31akabl22ec.gif)
　　


### 3. Jump at the navigator file name
`⌥ F1`, followed by `1`, allows you to quickly move the focus to the file name in the tool window. This is particularly useful when you want to navigate to the file name in the navigator area for the currently open file in the editor.

`⌥ F1`, then `1`

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dbfs6s1f3s7g4i0fw22q.gif)
　　



### 4. Show the list of recently opened files
`⌘ e` opens a list of recently opened files, making it easy to quickly navigate to files you've worked on recently.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0rxe99aqj4o76pb3ylpx.gif)
　　


### 5. Fix syntax error
`⌥ Enter` is used to quickly fix syntax errors, such as undeclared variables or missing imports, by showing you available code suggestions and fixes.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/64qti8w5i0vxx81w553i.gif)
　　


### 6. Move line
`⌥ shift ↑/↓` is used to move the currently selected line or block of code up or down in your code editor, allowing you to quickly adjust the positioning of code within your file.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gatceuubc4j3gg1xvehm.gif)
　　

### 7. Toggle Case
`⌘ shift u` toggles the case of selected text, converting uppercase letters to lowercase and vice versa.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/75lw3yw4i1uccjze8gzb.gif)
　　

### 8. Reformat code
`⌘ ⌥ L` is used to automatically format your code, including fixing broken indents, ensuring that your code adheres to a consistent and readable style.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/awald15h55pbfqo7yaze.gif)
　　

### 9. Show Hierarchy
`⌥ ctrl H` opens the Hierarchy tab, which lists the caller methods, allowing you to navigate and explore the hierarchy of method calls in your code.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zcwowvystfokxo7j5319.gif)
　　

### 10. Rename
`Shift F6` allows you to rename a method without needing to consider refactoring for its caller methods.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7bt5bi50n0vrky9ft7gz.gif)
  
  

## Conclusion
The above keys are the ones I rely on daily while coding, but there are many other valuable shortcuts out there. As mentioned earlier, if you have any excellent shortcuts you'd like to recommend, please let me know, and I'll be happy to update this article. Thank you!