Top Ten IntelliJ idea shortcut keys

Source: Internet
Author: User

1 Smart Tips

Intellij , of course, is Intelligence intelligence! Basic code hints with ctrl+space, and more intelligently by type information hint ctrl+shift+space, but because IntelliJ always as we tap and automatically prompt, So many times you won't be able to manually tap these two shortcuts (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 the refactoring -improvement of the existing code design , with the IntelliJ of the match is a great call! 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 have used Emacs will feel no more (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 the daily use of the very high frequency, so is listed in front of the list. Commonly used fori/sout/psvm+tab to generate loops, system.out , main method boilerplate boilerplate code, with ctrl+j to view all templates. The following " will be described in the section alt+insert , click in the edit window to generate constructors, tostring, getter/setter, overriding parent class methods, and so on. These two techniques are too common, almost every day to generate a heap of main, system.out and getter/setter.

In addition, thesuffix 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

One of the major keys to the

Editor is the ability to automatically select code by Syntax ctrl+w and reverse ctrl+shift+w . Additionally, ctrl+left/right moves the cursor to the previous /after the word, ctrl+[/] Move to the former /code block, these classes vim-style cursor movement is also a big highlight. Above ctrl+left/right/[] plus shift, you can select the jump range of code. alt+forward/backward moves to the previous /method. There are some very common like ctrl+y Delete rows, ctrl+d copy line, ctrl+</> Fold The code and say no more.

With respect to cursor movement and more, we can install Ideavim or emacsideas to enjoy the fast movement of vim and the acejump function of Emacs, in addition to the functions provided by IntelliJ itself. (super cool!) ). In addition,IntelliJ bookmark function is also good, with ctrl+shift+num definition 1-10 bookmarks (again press this set of shortcuts is to delete bookmarks ), and then through the ctrl+num Jump. This avoids the hassle of ctrl+left/right back and forth using the previous/next edit location, and this shortcut defaults to a Windows hotkey conflict (the default is more Alt, and Windows changes the monitor display direction conflict, accidentally the display will become inverted explicit, 冏 ah ).

5 Find Open

Like Eclipse,IntelliJ's ctrl+n/ctrl+shift+n can open classes or resources, but IntelliJ is smarter, and any characters we enter will be considered fuzzy matches, sparing There is still trouble typing * 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

Transferred from: http://blog.csdn.net/dc_726/article/details/42784275

Top Ten IntelliJ idea shortcut keys (GO)

Related Article

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.