【IDEA efficiency Double series 】
Plug-in article
Shortcut Keys (1)
In our previous article on shortcuts, we covered the Editing section, but today we’ve managed the rest (●’◡’●).
Are you ready
Let’s just get started!
Refactor
I usually use a lot of this one (●’◡’●) because it’s really handy.
1. Extract local variables
WIN : Ctrl + Alt + V
Mac :
This shortcut is really convenient, many times we can save ourselves to declare variables.
Results show
And you can see, just with your little finger, amazing things happen
2. Extract constants
WIN: Ctrl + Alt + C
MAC:
This shortcut can be used when you want to extract constants instead of local variables.
Use effect
3. Extraction method
WIN: Ctrl + Alt + M
Mac:
This shortcut can encapsulate the selected code block directly into a method, which is also used very often when expanding.
Results show
Ovo, which is mostly about functions, is usually a little bit more code extracted into methods
4. Extract method parameters and fields
These two are used relatively sparingly
Extraction method parameters
Win: Ctrl + Alt + P
Mac:
Extraction of field
Win: Ctrl + Alt + F
Mac:
5. Rename (files, variables, methods, etc.)
WIN: Shift + F6
Mac:
Results show
So let’s just show the change variable here, and you can see, you can change OwO here, you can change OwO here
The same goes for other things.
6. Modify the method signature
WIN: Shift + F6
Mac:
This shortcut allows you to modify the method signature directly, which is sometimes useful.
Click method, then press the shortcut key, will pop up the modify box, the same is a modify, modify everywhere.
These are the ones that are used a lot for refactoring. Ovo, let’s move on
Navication
Navigation helps us quickly switch to where we want to go
1. Open the sidebar
Win : Alt + F1
Mac :
This shortcut is quite frequent and can reduce the number of times we use the mouse.
Results show
After pressing Alt F1, use the up and down keys to quickly switch.
To turn it off, press Shift+Ese or press Alt F1 a few more times
2. Quickly cut the Tab
Win: Alt + Right/Left
Mac:
Used to show
← is the previous one
→ is the next one
3. Back/forward
Win: Ctrl+Alt + Left/Right
Mac:
This is very similar to cutting the Tab, but mostly it’s back to the last edit or forward to the next edit.
4. Display the recently accessed Tab
Win: Ctrl + E
Mac:
This shortcut will give you quick access to Tab
Results show
After pressing Ctrl+E, we can directly type the name of the Tab we want to go to, and then press Enter
5. Display the file structure
Win: Ctrl + F12
Mac:
When we have a complex file structure, using this shortcut can help us see the file structure clearly
Results show
Search
The search section can help us quickly search the target keywords and so on
1. Search the keywords of the current Tab
WIN: Ctrl + F
Mac:
I’m sure you’re familiar with this shortcut, so I won’t tell you more about it here.
2. Replace the keywords of the current Tab
Win: Ctrl + R
Mac:
I’m sure you’re familiar with this shortcut, so I won’t tell you more about it here.
3. Find where and how often (methods, variables, etc.) are used
WIN: Alt + F7
Mac:
This shortcut is useful when we need to know where a variable or method is used
Results show
4. Search for files
Win: Ctrl + Shift + N
Mac:
This shortcut can help us to find related files, such as when looking for source code, very convenient.
Results show
Write in the last
Here is our IDEA high frequency keyboard introduction to end ~
I hope it helps.
If something is wrong, please point it out in the comments
If you like it, like ‘◡’ at 👍 (●’◡’●)