Use of IDEA shortcut keys

I think that for someone like me who has just come into contact with an idea, he will always find new things when he looks at his shortcut keys a few times. Just write it

down . 1. Find the file, find the code, find the reference related

1. Double-click shift
to search in all the directories of the project, that is, you want to see what you don't want to see and what you didn't think you can see will be found for you

2.ctrl+f
current file to find specific

content3.ctrl+shift+f
current project to find files containing specific

content4.ctrl+n to
find

classes5.ctrl+shift+n to
find

files6.ctrl+e
recent

files7 .alt+F7
is a very frequently used shortcut key, which can help you find all the references to your functions, variables or classes.


2. Editing related

1.shift+enter
to start another line

2.ctrl+r to
replace the current file Specific content 3.ctrl

+shift+r The current item
replaces specific content Delete the content in the comment 5.ctrl+d copy the current line to the next line 6.ctrl+x cut the current line










7. ctrl+c \ ctrl+v
Everyone knows 8. ctrl

+z
Undo

9. ctrl+shift+z
Undo

10. ctrl+k
Submit code to SVN

11 Ctrl+Alt+O Optimize imported classes and packages

12 .alt+insert
is a very, very, very convenient key combination. If you don't believe me, look down. Use
in classes:


can automatically generate common methods such as constructors, getters/setters, etc. Use
on project directories:


can be used to create various files.

13.Alt+enter
is another big killer, how many kills?
Example 1:
What should I do if the code is found to be "yellow"?

Move the mouse up and meow:

try alt+enter:

select simplify and see.

Let me go, the code is concise and there is nothing!

PS: The yellow warning can be compiled without affecting the normal operation of the program. Generally, it is some suggestions for code optimization. I have encountered:
(1). Can be simplify The
code can be simplified
(2). Variable is never use
The declared variable is never wrapped by using
(3) unnecessary declaration boxing unnecessary boxing


And so on, pay more attention, you can understand some details of the encoding better.

Example 2:
Write a class to implement an interface, and after adding implements Runnable, you will find this red squiggly line:

Let's try alt+enter on this line: Are you

moved to cry? IDEA that you thought of and did not think of has helped you think of it.
See all kinds of red XX prompts in the code, just try alt+enter! What is not thrown exception ah no try catch ah can be done.

14. ctrl+alt+L

automatically formats the code. I have developed the habit of sending it as soon as I finish writing the code.
You can personalize your own code style: File--Settings--CodeStyle

Ctrl+F12, you can display the structure of the current file
Ctrl+F7, you can query the reference of the current element in the current file, and then press F3 to select
Ctrl+ Shift+F7, highlight all the text, press Esc to highlight and disappear
Ctrl+Alt+I, automatically indent and arrange the selected code, this function can also work when editing JSP files

Ctrl+Shift+Space, auto-complement Full code
Ctrl+space, code prompt (conflicts with system input method shortcut keys)
Alt+Shift+Up/Down, move up/down a line
Ctrl+Alt+left/right, return to the last browsed position
Ctrl+Shift+Up/Down , move the statement up/down

F2 or Shift+F2, it is useful to highlight errors or warnings to quickly locate
Ctrl+Shift+Backspace, jump to the last edited place
Ctrl+Shift+U, case conversion
Ctrl+Y, delete the current line
Ctrl+Alt+S, open the settings dialog

[Debug section, Compile]
F8, step over
F7, step into
Shift+F7, intelligently step into
Shift+F8, step out of
Alt+Shift+F8, force step over
Alt+Shift+F7, force step into
Alt+F9, run to the cursor
Ctrl+Alt+F9, force Run to the cursor
F9, restore the program


We can use the Alt + F1 + 1 shortcut keys to locate the position of the current file in the Project component window.

From: [url]http://www.blogjava.net/rockblue1988/archive/2014/10/24/418994.html [/url]

More details http://www.phperz.com/article/15/ 0923/159043.html

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326881613&siteId=291194637