Top Ten IntelliJ idea shortcut keys

Source: Internet
Author: User
Tags inheritance
1 Smart Tips

IntelliJ, of course, is intelligence intelligence. Basic code hints with ctrl+space, there are more intelligent ctrl+shift+spaceby type information, but because IntelliJ always as we tap and automatically prompt, so many times do not manually hit the two shortcut keys (unless the cue box disappears). Move to the wrong code with f2/shift+f2 ,alt+enter quick fix (that is, the quick fix feature in eclipse). When the smart prompt for our auto-completion method name, we usually have to make up the end of the back bracket and semicolon, when the parentheses nesting many layers will be very troublesome, when we just knock ctrl+shift+enter can automatically fill the end of the character. And not just parentheses, for example, you can automatically fill in {} curly braces when you finish if/for.

Finally, IntelliJ is able to intelligently perceive the profiles and classes of mainstream frameworks such as spring and hibernate to intelligently scan and understand how your project is structured and configured with static braking, under seemingly "static" appearances. 2 Refactoring

IntelliJ Refactoring is another burst of eclipse functionality that is surprisingly intelligent, such as automatically checking for all matches and extracting them as a variable when extracting variables. Especially after seeing "refactoring-Improving existing code design" , it's a great call to have a IntelliJ. It is also the powerful intelligence and refactoring capabilities that make TDD development very smooth under IntelliJ.

Cut to the chase, first say an invincible refactoring function big Summary shortcut key ctrl+shift+alt+t, called refactor this. According to the law a bit complex, but also in line with the style of IntelliJ, a lot of shortcuts are to be done with both hands, and not like eclipse many of the most useful shortcut keys can be dashing one hand to complete (do not know that is not a big advantage of Eclipse), but you used Emacs Then you will feel nothing (not emacs black). In addition, there are some of the most commonly used refactoring techniques, because it is too often used, if you choose the Refactor this menu is a bit inefficient. For example Shift+f6 is renamed directly,Ctrl+alt+v is the extraction variable. 3 code Generation

This is similar to eclipse, although not unique, but because of the frequency of daily use is very high, so it is listed in front of the list. Fori/sout/psvm+tab can be used to generate loops, System.out, main methods, such as boilerplate boilerplate code, with ctrl+j to view all templates. In the "Auxiliary" section later, you'll talk about Alt+insert, which you can click in the edit window to generate constructors, toString, Getter/setter, override parent methods, and so on. These two techniques are too common to generate a bunch of main, System.out, and Getter/setter almost every day.

In addition, the suffix auto-completion feature (Postfix completion) is added to Intellij idea 13, which is more flexible and powerful than template generation. For example, to enter a for (user user:users) simply enter user. For+tab. For example, to enter date birthday = User.getbirthday (), just enter User.getbirthday (). Var+tab . 4 Edit

The editor has to say that a big God key is the ability to automatically check the code by the syntax of the ctrl+w and reverse ctrl+shift+w . In addition,ctrl+left/right moves the cursor to the front/rear word,ctrl+[/] moves to the front/back code block, these types of vim-style cursor movement is also a big highlight. Above ctrl+left/right/[] plus shift, you can select the code within the jump range. Alt+forward/backward Move to the front/rear method. There are some very common like ctrl+y Delete rows,ctrl+d copy lines,ctrl+</> Folding code is not much to say.

With regard to the cursor movement and a little more expansion, in addition to the IntelliJ itself has provided functionality, we can also install Ideavim or Emacsideas enjoy the vim of the rapid movement and Emacs Acejump function (super cool. )。 In addition, IntelliJ bookmark function is also good, with ctrl+shift+num definition 1-10 bookmarks (again by this group of shortcuts is to delete bookmarks), and then jump through ctrl+num . This avoids the hassle of jumping back and forth using the front/next edit location ctrl+left/right , and this shortcut defaults to a Windows hotkey conflict (the default is more than ALT, which conflicts with Windows changing the display orientation, Accidentally the display will become inverted explicit, 冏 AH). 5 Find Open

Eclipse,intellij-like ctrl+n/ctrl+shift+n can open classes or resources, but IntelliJ is smarter, and any characters we enter will be considered fuzzy matches, eliminating the hassle of having input * in eclipse. The latest version of Idea also includes the search Everywhere feature, which can be searched for anything in a pop-up box by pressing Shift+shift , including classes, resources, configuration items, methods, and so on.

The inheritance of the class can be ctrl+h Open the Class hierarchy window, jumps on the inheritance level with ctrl+b/ctrl+alt+b respectively corresponding to the parent class or the parent method definition and subclass or child method implementation, view all methods of the current class with Ctrl + F12.

It is also very simple to find the use of a class or method,alt+f7. To find where the text appears, use ctrl+f/ctrl+shift+f to find it in the current window or the whole project, and then move to the next match before and after the f3/shift+f3 .

IntelliJ more intelligent proof is that in any menu or display window, you can directly enter the word you are looking for, IntelliJ will automatically filter for you. 6 other Auxiliary

Above these divine keys with some auxiliary shortcut keys, you can let your hands more than 90% of the time to get rid of the mouse, focus on the keyboard as if performing a piano. These obscure but crucial pieces of the last puzzle are:

Ø command :ctrl+shift+a can find all IntelliJ commands, and there are shortcut keys behind each command. So it's not just a big divine key, it's also a tool for finding learning shortcuts.

Ø new :alt+insert can create new classes, methods, and anything else.

Ø format Code : Format Import list ctrl+alt+o, format code ctrl+alt+l.

Ø Switch window :alt+num, commonly used there are 1-project structure, 3-search results, 4/5-run debugging. ctrl+tab Toggle tabs,ctrl+e/ctrl+shift+e Open recently opened or edited files.

Ø Unit Test :ctrl+alt+t Create Unit test cases.

Ø Run :alt+shift+f10 Run program,shift+f9 start debugging,ctrl+f2 stop.

Ø Commissioning :f7/f8/f9 for Step into,step over,continue respectively.

In addition to some of my customizations, such as horizontal split screen ctrl+| And so on, and some magical little features ctrl+shift+v Paste has been copied long ago,Alt+shift+insert into the column mode to be selected by column. 7 Final list

The list is so luxurious that the latter are so useful that they are not in the slightest weakness.

Ø Top #10切来切去: Ctrl+tab

Ø Top #9选你所想: ctrl+w

Ø Top #8代码生成: Template/postfix +tab

Ø Top #7发号施令: Ctrl+shift+a

Ø Top #6无处藏身: Shift+shift

Ø Top #5自动完成: Ctrl+shift+enter

Ø Top #4创造万物: Alt+insert

Too hard to give up, the top three tie it.

Ø Top #1智能补全: Ctrl+shift+space

Ø Top #1自我修复: Alt+enter

Ø Top #1重构一切: ctrl+shift+alt+t

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.