This article should take about 6 minutes to read.

▌ Automatic code

Common boilerplate code is fori/sout/ PSVM +Tab, which can generate loops, system. out, main methods, etc.

For example, to enter for(User User: users), just type user.for+Tab;

For example, to enter Date birthday = user.getbirthday (), just type user.getbirthday ().var+Tab.

After entering the code label, press Tab to generate the code.

  1. Ctrl+Alt+O optimize the imported classes and packages

  2. Alt+Insert Generate code (get,set methods, constructors, etc.) or right-click Generate

  3. fori/sout/psvm + Tab

  4. Ctrl+Alt+T generates a try catch or Alt+ Enter

  5. CTRL+ALT+T places the selected code in TRY{} IF{} ELSE{}

  6. Ctrl + O override method

  7. Ctrl + I implementation method

  8. Ctr+ Shift +U Case conversion

  9. ALT+ Enter import package, automatic correction

  10. ALT+/ code prompt

  11. CTRL+J automatic code

  12. Ctrl+Shift+J to combine the two actions on one line

  13. CTRL+ space code prompt

  14. CTRL+SHIFT+SPACE auto-complete code

  15. CTRL+ALT+L format the code

  16. CTRL+ALT+I auto indent

  17. CTRL+ALT+O optimize the imported classes and packages

  18. ALT+INSERT generates code (e.g. GET,SET methods, constructors, etc.)

  19. CTRL+E Recently changed code

  20. CTRL+ALT+SPACE Indicates the class name or interface name

  21. CTRL+P method parameter prompt

  22. CTRL+Q to see the declaration of the current method

  23. Shift+F6 Refactoring – rename (packages, classes, methods, variables, even comments, etc.)

  24. Ctrl+Alt+V extract variables

▌ Querying shortcut keys

  1. Ctrl+Shift+Backspace jumps to the last edit

  2. CTRL+ALT+ Left/Right to navigate to and from the edited location

  3. ALT+7 displays the structure of the current file in the left window

  4. Ctrl+F12 floats to display the structure of the current file

  5. ALT+F7 finds all references to your function or variable or class

  6. CTRL+ALT+F7 find all references to your function or variable or class

  7. Ctrl+Shift+Alt+N finds a method or variable in a class

  8. Double-click SHIFT to find files in all directories of the project

  9. Ctrl + N find classes

  10. Ctrl+Shift+N to find a file

  11. CTRL + G positioning line

  12. CTRL+F finds text in the current window

  13. CTRL+SHIFT+F Finds text in the specified window

  14. CTRL+R replaces text in the current window

  15. CTRL+SHIFT+R replaces text in the specified window

  16. ALT+SHIFT+C find the modified file

  17. CTRL+E The most recently opened file

  18. F3 searches down for the location where the keyword appears

  19. SHIFT+F3 position where a keyword appears

  20. Select the text, press Alt+F3, highlight the same text, and F3 scroll down to find the same text one by one

  21. F4 Find the source of the variable

  22. CTRL+SHIFT+O displays the search contents

  23. Ctrl+W selects the code, pressing continuously will have other effects

  24. F2 or Shift+F2 highlighting errors or warnings for quick location

  25. Ctrl+Up/Down Moves the cursor to the first or last line

  26. Ctrl+B quickly opens the class or method at the cursor

  27. CTRL+ALT+B find all subclasses

  28. CTRL+SHIFT+B find the class of the variable

  29. Ctrl+Shift+ Up and down move code up and down

  30. Ctrl+Alt+ left/ Right returns to the previous browsing location

  31. Ctrl + X to delete rows

  32. Ctrl + D copy

  33. Ctrl+/ or Ctrl+Shift+/ comment (// or /*… * /)

  34. Ctrl+H displays the class structure diagram

  35. Ctrl+Q displays the comment document

  36. Alt+F1 finds where the code is

  37. Alt+1 Quickly open or hide the engineering panel

  38. Alt+ left/ Right toggle code view

  39. ALT+ ↑/↓ Move between methods quickly to locate the location

  40. CTRL+ALT+ Left/Right to navigate to and from the edited location

  41. Ctrl+Shift+Backspace jumps to the last edit

  42. Alt + 6 to find TODO

▌ Other shortcut keys

  1. SHIFT+ENTER another line

  2. CTRL+Z Reverse (Undo)

  3. CTRL+SHIFT+Z Forward (Cancel undo)

  4. CTRL+ALT+F12 Explorer opens the folder

  5. ALT+F1 find the directory where the file resides

  6. SHIFT+ALT+INSERT vertical editing mode

  7. CTRL+F4 closes the current window

  8. Ctrl+Alt+V to introduce variables. For example: new String(); Automatically import variable definitions

  9. Ctrl+~, fast switching scheme (interface appearance, code style, shortcut key mapping and other menus)

▌ SVN shortcuts

  1. CTRL + K submits code to SVN

  2. CTRL + T updates the code

Shortcut keys for debugging

F8, F7, F9, and most notably Drop Frame allows you to restart any code that has been run.

  1. Alt +F8 debug Select the value to be queried

  2. Alt+Shift+F9, select Debug

  3. Alt+Shift+F10, select Run

  4. Ctrl + Shift + F9, compile

  5. Ctrl+Shift+F8 to view breakpoints

  6. F7, enter

  7. Shift+F7, smart step in

  8. Alt+Shift+F7, force in

  9. F8, step

  10. Shift + F8, step out

  11. Alt+Shift+F8 to force the step

  12. Alt+F9, run to the cursor

  13. Ctrl+Alt+F9 to force it to the cursor

  14. F9, recovery procedure

  15. Alt+F10, locate the breakpoint

▌ refactoring

  1. Ctrl+Alt+Shift+T brings up the Refactor menu

  2. Shift+F6, rename it

  3. F6, mobile

  4. F5, copy

  5. Alt+Delete, safely Delete

  6. Ctrl + Alt + N, inline

Top 10 Shortcut keys for Intellij IDEA

There are plenty of shortcuts in Intellij IDEA to love, and there are some interesting discussions on StackOverflow.

Everyone has their favorites, and it’s hard to come up with an ideal list.

I’ve sorted out the Intellij shortcuts before, so here are my top ten favorite shortcuts based on how often I use them in daily development.

1 Intelligent Tips:

The first Intellij is of course Intelligence Intelligence!

The basic code prompts with Ctrl+Space and, more intelligently, Ctrl+Shift+Space by type message, but because Intellij always prompts as we type, most of the time you don’t hit either of these shortcuts manually (unless the prompt disappears).

Use F2/ Shift+F2 to move the offending code, Alt+Enter to quickly Fix it (the Quick Fix feature in Eclipse).

When the intelligence prompts us to auto-complete the method name, we usually have to complete the trailing backparenthesis and semicolon ourselves. When the parentheses are nested in many layers, it can be troublesome. In this case, we can auto-complete the trailing character by pressing Ctrl+Shift+Enter.

And it’s not just the parentheses. For example, the {} curly braces can be added automatically after you type if/for.

Finally, Intellij is intelligently aware of configuration files and classes in mainstream frameworks such as Spring and Hibernate, so that it can silently scan and understand how your project is constructed and configured without seeming “static.” Refactoring:

Intellij refactoring is another feature that has blown Eclipse out of the water. It is surprisingly smart, such as extracting variables automatically checking for all matches to be extracted into a single variable.

Especially after seeing “Refactoring – Improving existing Code Design”, with the cooperation of Intellij is absolutely fascinating! It is the powerful intelligence and refactoring functions that make TDD development under Intellij very smooth.

To get to the point, let’s start with an awesome refactoring feature called Ctrl+Shift+Alt+T.

A bit complicated, but in keeping with The Intellij style, many of the shortcuts are two-handed, unlike some of Eclipse’s most useful shortcuts, which can be done handily with one hand. But for those of you who have used Emacs, that’s all right (non-Emacs black).

In addition, there are some of the most common refactoring techniques, which are so commonly used that it would be inefficient to check the Refactor This menu every time.

For example, Shift+F6 directly changes the name, while Ctrl+Alt+V directly extracts the variable. 3 Code generation:

This is similar to Eclipse, which is not unique, but is high on the list because it is used so often.

Common examples include fori/sout/ PSVM +Tab to generate boilerplate boilerplate code such as loops, system. out and main methods. Ctrl+J can be used to view all templates.

Alt+Insert will be covered later in the “Assist” section. You can click in the edit window to generate constructors, toStrings, getters/setters, override superclass methods, and so on.

These two techniques are so common that you generate a bunch of main, system.out, and getters/setters almost every day. In addition, Intellij IDEA 13 adds Postfix Completion, which is more flexible and powerful than template generation.

For example, to enter for(User User: users), enter user.for+Tab.

For example, Date birthday = user.getbirthday (); Just type user.getbirthday ().var+Tab. Editor:

One of the great keys to edit is Ctrl+W, which automatically selects code syntactically, and Ctrl+Shift+W, which works the other way around.

In addition, Ctrl+Left/Right moves the cursor to the front/back word and Ctrl+[/] moves the cursor to the front/back code block. These ViM-like cursor movements are also highlights.

Ctrl+Left/Right/[] + Shift selects code within the jump range. Alt+Forward/Backward move to the Forward/ back method.

There are some very common ones like Ctrl+Y to delete lines, Ctrl+D to copy lines, and Ctrl+ fold code. To extend cursor movement a bit further, in addition to what Intellij already offers, you can also install ideaVim or emacsIDEAs to enjoy Vim’s fast movement and Emacs AceJump (cool!). .

In addition, Intellij’s bookmarking function is also good. Use Ctrl+Shift+Num to define 1-10 bookmarks (delete bookmarks by pressing this set of shortcuts again), and then use Ctrl+Num to jump.

This avoids the trouble of skipping back and forth by using Ctrl+Left/Right for the previous/next edit position many times, and by default, this shortcut key conflicts with Windows hotkey (by default, if WE add Alt, it conflicts with Windows when changing the display direction, accidentally, the display will become an inverted display, orz). 5 Search open:

Like Eclipse, Intellij’s Ctrl+N/Ctrl+Shift+N can open classes or resources, but Intellij is smarter and any character we type is treated as a fuzzy match, saving Eclipse the trouble of typing *.

The latest version of IDEA also adds the Search Everywhere feature, which allows you to Search for anything in a pop-up box, including classes, resources, configuration items, methods, and more, by pressing Shift+Shift. Class inheritance relationship can be used Ctrl+H to open the class hierarchy window, jump on the inheritance level with Ctrl+B/Ctrl+Alt+B corresponding to the parent class or parent method definition and subclass or submethod implementation, view all methods of the current class with Ctrl+F12. It’s also easy to find classes or methods to use, Alt+F7.

To find where the text appears, press Ctrl+F/Ctrl+Shift+F to find it in the current window or in the entire project, and then move forward and backward with F3/Shift+F3 to the next match. Another example of Intellij’s greater intelligence is that you can enter the word you are looking for in any menu or display window, and Intellij will automatically filter it for you. 6 Other assistance:

These keys, combined with a few auxiliary shortcuts, can keep your hands off the mouse more than 90% of the time, focusing on the keyboard as if performing a piano performance. The final pieces of the puzzle are small but crucial:

ø Command: Ctrl+Shift+A can find all Intellij commands, and each command is followed by its shortcut key. So it is not only a great key, but also a tool to find learning shortcuts.

ø New: Alt+Insert can create classes, methods, and anything else.

ø Format code: Format import list Ctrl+Alt+O, format code Ctrl+Alt+L.

ø Switch window: Alt+Num, commonly used 1- project structure, 3- search results, 4/5- run debugging. Ctrl+Tab Toggles tabs, Ctrl+E/Ctrl+Shift+E opens recently opened or edited files.

ø Unit test: Ctrl+Alt+T creates a unit test case.

ø Run: Alt+Shift+F10 run the program, Shift+F9 start debugging, Ctrl+F2 stop.

ø Debug: F7/F8/F9 correspond to Step into, Step over, Continue respectively.

In addition, some of my custom, such as horizontal split screen Ctrl + | etc., and some small magical function Ctrl + Shift + V to paste copy of long ago, Alt + Shift + Insert into the column model according to the selected columns.













































It’s too hard to give up. Let’s tie the top three!





















CTRL+ALT+ Left/Right to navigate to and from the edited location


Ctrl+Shift+Backspace jumps to the last edit




, END,

The growth path of programmers

Though the road is long, the journey is sure to come

This article was originally posted on the wechat public account of the same name “The Growth of programmers”, reply to “1024” you know, give a thumbs up.

Reply [520] to receive the best learning method for programmers

Reply to [256] for Java programmer growth plans