Idea Handy plugin, and command

Source: Internet
Author: User
Tags code tag comments try catch tomcat

Http://www.oschina.net/news/69858/java-developer-need-intellij-idea-plugin Handy Plugin



Command



Keytool-genkey-alias tomcat-storetype pkcs12-keyalg rsa-keysize 2048-keystore keystore.p12-validity 3650\



ALT + ENTER import package, auto fix
Ctrl+alt+l Formatting Code
Alt+insert generate code (such as Get,set method, constructor, etc.)
Ctrl+r replacing text
Ctrl+f finding text
ctrl+alt+ Left/right back to the last viewed location
Shift+f6 Refactoring-Renaming
Ctrl+x Deleting rows
Ctrl+d Copying rows
ctrl+/or ctrl+shift+/Comments (//or/.../)
ctrl+shift+ Enter auto-complete code




IntelliJ idea frequently used shortcut keys list

Ctrl+shift + Enter, statement completion
“。 ", negation is complete, press" when you enter an expression. "Key
Ctrl+e, recent files
Ctrl+shift+e, recently changed files
Shift+click, you can close the file
ctrl+[OR], you can run to the beginning and end of curly braces
CTRL+F12, the structure of the current file can be displayed
CTRL+F7, you can query the current element's reference in the current file, and then press F3 to select
CTRL + N, you can quickly open class
Ctrl+shift+n, you can quickly open files
Alt+q, you can see the declaration of the current method
Ctrl+p, can display parameter information
Ctrl+shift+insert, you can select the Clipboard contents and insert
Alt+insert, you can generate constructors/getter/setter, etc.
Ctrl+alt+v, you can introduce variables. For example: New String (); Automatic import of variable definitions
Ctrl+alt+t, the code can be wrapped within a block, for example: Try/catch
Ctrl+enter, import package, auto fix
Ctrl+alt+l, formatting code
Ctrl+alt+i, the selected code is automatically indented, which can also work when editing a JSP file
Ctrl+alt+o, optimizing imported classes and Packages
Ctrl+r, replacing text
Ctrl+f, finding text
Ctrl+shift+space, auto-complete code
CTRL + spaces, code hints (conflicts with system input accelerator keys)
Ctrl+shift+alt+n, finding a method or variable in a class
Alt+shift+c, Recent Changes
Alt+shift+up/down, move up/down one line
Shift+f6, refactoring – renaming
CTRL+X, deleting rows
Ctrl+d, copying rows
ctrl+/or ctrl+shift+/, comments (//or/**/)
Ctrl+j, Automatic code (ex: SERR)
Ctrl+alt+j, surround with dynamic templates
Ctrl+h, showing class structure diagram (class inheritance hierarchy)
Ctrl+q, displaying the comment document
ALT+F1, find the location of your code
Alt+1, quickly open or hide the engineering panel
Ctrl+alt+left/right, return to the last viewed location
Alt+left/right, Toggle Code View
Alt+up/down, quickly move the positioning between methods
Ctrl+shift+up/down, move statement up/down
F2 or SHIFT+F2, highlighting error or warning quick location
tab, after the code tag input is complete, press TAB to generate the code
CTRL+SHIFT+F7, highlight all the text, press ESC to highlight the disappear
ALT+F3, find the same text down one by one and highlight
Ctrl+up/down, the cursor moves to the first or last line
Ctrl+b/ctrl+click, quickly open the class or method at the cursor (jump to definition)
Ctrl+alt+b, jump to method implementation
Ctrl+shift+backspace, jump to the last edited place
Ctrl+o, overriding method
Ctrl+alt+space, class name auto-complete
Ctrl+alt+up/down, quick Jump search results
Ctrl+shift+j, integrate two lines
Alt+f8, calculating the value of a variable
Ctrl+shift+v, you can insert the most recently used Clipboard Content selection into the text
Ctrl+alt+shift+v, simple paste
Shift+esc, you can not only move the focus to the editor, but also hide the current (or last active) tool window
F12, move the focus from the editor to the most Recently used tool window
SHIFT+F1, to open the editor cursor character used by the class or method of the Java document browser
Ctrl+w, you can select a word followed by a statement followed by a function.
Ctrl+shift+w, deselect the word cursor
ALT+F7, find the location of a class, method, or variable used in the entire project
Ctrl+i, Implementation method
Ctrl+shift+u, Case conversion
Ctrl+y, delete when moving forward


Shift+enter, insert a new row down
Psvm/sout,main/system.out.println (); Ctrl+j, see more
CTRL+SHIFT+F, Global Lookup
Ctrl+f, find/shift+f3, find/f3 up, look down
Ctrl+shift+s, Advanced Search
Ctrl+u, go to parent class
Ctrl+alt+s, open the Settings dialog box
Alt+shift+inert, toggle column selection mode on/off
Ctrl+alt+shift+s, open current project/module properties
Ctrl+g, positioning line
Alt+home, jump to navigation bar
Ctrl+enter, plug in a line
Ctrl+backspace, delete by word
CTRL + "+ +", current method expansion, folding
ctrl+shift+ "+/-", expand All, fold
"Debug section, compile"
CTRL+F2, stop.
ALT+SHIFT+F9, select Debug
ALT+SHIFT+F10, select Run
CTRL+SHIFT+F9, compiling
CTRL+SHIFT+F10, run
Ctrl+shift+f8, viewing breakpoints
F8, Step Over
F7, Step Into
SHIFT+F7, smart Step Into
Shift+f8, step out
ALT+SHIFT+F8, force step Over
ALT+SHIFT+F7, force Step Into
ALT+F9, run to Cursor
CTRL+ALT+F9, force run to Cursor
F9, recovery program
ALT+F10, navigate to Breakpoint
Ctrl+f8, Toggle Line Breakpoint
CTRL+F9, building the project
Alt+1, Project
Alt+2, Collection
Alt+6,todo
ALT+7, structure
Ctrl+shift+c, copy Path
Ctrl+alt+shift+c, copy reference, must select Class name
Ctrl+alt+y, Sync
ctrl+~, fast switching scheme (interface appearance, code style, shortcut key mapping menu)
SHIFT+F12, restoring the default layout
CTRL+SHIFT+F12, Hide/restore all windows
CTRL+F4, close
CTRL+SHIFT+F4, close the Events tab
Ctrl+tab, go to the next splitter
Ctrl+shift+tab, go to the previous splitter
"Refactoring"
Ctrl+alt+shift+t, pop-up refactoring menu
SHIFT+F6, renaming
F6, Mobile
F5, copy
Alt+delete, Safe removal
Ctrl+alt+n, inline
Find
Ctrl+f, finding
Ctrl+r, replacing
F3, find the next
SHIFT+F3, Find Previous
Ctrl+shift+f, finding in Path
Ctrl+shift+r, replacing in Path
Ctrl+shift+s, search structure
Ctrl+shift+m, replacing the structure
ALT+F7, finding usage
CTRL+ALT+F7, displaying usage
Ctrl+f7, finding usages in files
CTRL+SHIFT+F7, highlighting usage in files


IntelliJ Idea FAQs

File menu->settings->colors & Fonts->editor font= song body, size=12, line spacing =1.0

File menu->settings->appearance-> Font name=simsun,size=12

IntelliJ idea is a very good Java editor, beginners can be some of the ways to feel very uncomfortable, just beginning to use when I also feel very unaccustomed, in reference to some online articles here to put my experience written out, I hope beginners can quickly adapt to it, You will soon feel that programming is a pleasure.

Some setup tips after installation:

1. How to display the perfect Chinese: settings->appearance check override default fonts by (not recommended), set Name:nsimsun,size:12

2. How to make the cursor non-arbitrary positioning: settings->editor Remove allow placement of the caret after end of the line.



3: How to display line number: Settings->editor->appearance tab, tick show lines numbers



4. How to make IntelliJ idea move without opening the project file: Settings->general remove reopen last project on startup.

5. Why can't I start Tomcat in IntelliJ idea: Please use the zip version of Tomcat

6. Default code hint and complement shortcut key conflict with Input method, how to solve: Settings->keymap

Copy a shortcut key scheme first.

then expand. As shown in figure:

Select a feature, and then add a new shortcut key

The rest of the function, but also to change, such as the Blue font section above. I just changed the space in the original shortcut key to ";", which is a semicolon, which makes it much easier.

IntelliJ Idea 5.0 shortcut keys

1. Ctrl + Space Complete automatic input of class, method, variable name

This shortcut is I most often use the shortcut key, it can complete the class, method, variable name automatic input, very convenient, now I write the program basically will not complete the input variable name, because there is a tool to help you enter, why do you have to hit the keyboard?

2. CTRL + N (Ctrl + Shift + N) jumps to the specified Java file (other file)

This function is very convenient, at least I do not have to every time in a long list of file list to find I want to edit the class file and JSP file

3. Ctrl + B jump to Definition

4. Ctrl + Alt + right/left jump between edited code locations (forward/backward)

5. Ctrl + Alt + T with * to surround the selected line of code (* includes if, while,

Try catch, etc.)

This function is also very convenient, put the previous to do: ① first write If-else,② and then adjust the code

Indentation format, also pay attention to whether the parentheses match, now use this function to do, more convenient

6. Ctrl + Alt + B jump to method implementation

7. Ctrl + W Press A word to select an action

In idea, the shortcut function is to select the word at the character where the cursor is located, then select the source

The extended area of the code. For example, the statement below

Java.text.SimpleDateFormat formatter =

New Java.text.SimpleDateFormat ("Yyyy-mm-dd hh:mm");

When the position of the cursor is in a string within double quotation marks, the string is selected first, followed by the equal sign

The expression on the right, and then the whole sentence. I usually use it when I make a change to the code.

It is to choose the long compound expression, it is very convenient:)

8. Shift + F1 Displays the specified Java docs in the browser

This should also be a feature that almost every Java IDE has to offer, and not much to say.

9. Ctrl + Q displays Java Docs in the editor window

This is handy-because sometimes just forgetting one of the parameters in a method you've written

Meaning, at this point, and do not want to start a browser to view the Java doc, the benefits of this feature is

Show it.

Ctrl +/Comment/counter-comment The specified statement

It can annotate and counter-annotate the statement you have selected (using a single-line comment symbol "//"),

You can also use CTRL + Shift +/To annotate multiple lines of statements (that is, use the multiline comment symbol "/* ... */")

F2/shift + F2 Jump to the next/previous Error statement

Idea provides a convenient jump between error statements, and you can use this shortcut to

Shortcut jumps between the statements that are faulted.

Shift + F6 provides renaming of methods and variables

I use less of the Refector function provided by idea, compared to the function I use most

of the. For this function there is nothing to say, it is very convenient, try it quickly.

Ctrl + Alt + L format the selected code according to the template

Format your Java code according to the formats set in the template, but unfortunately only the Java files

Valid: (

Ctrl + Alt + I automatically indent the selected code

This function also works when editing JSP files, providing a format code for the top

Functional supplement.

Ctrl + Alt + O optimize import

Automatic removal of useless import statements, pretty good one feature.

Ctrl +/[Jump to end of code block/start

Ctrl+g (jump to the specified line), CTRL+F4 (Close the current edit page), ctrl+f (search), etc.

You can download a PDF of Idea 3.0 Default Keymap on the official website of Idea

(http://www.intellij.com/docs/ReferenceCard.pdf) with shortcut keys on it

Detailed list and feature brief, if you feel that the key combination of the shortcut keys defined by idea does not match your

Using the habit, you can change the set to your custom keying combination in Option--keymaps.

Ctrl+space//Complete Code, conflict with IME, change to Alt+s

Ctrl+d//row copy, or selected string copy

Ctrl + W Press A word to select the action

CTRL + N (Ctrl + Shift + N)//jump to the specified Java file (other file)

Ctrl + B jumps to the definition

Ctrl + Alt + B jump to method implementation

CTRL+J//Insert Code template

Alt+insert//Generate, generating constructor, setter, getter

Ctrl+o//Coverage method

Ctrl+i//Implementation method

Ctrl+alt+t//Surround with

ctrl+///Line Comment

Ctrl + Shift +/To annotate multiple lines of statements (that is, use the multiline comment symbol "/* ... */")

Ctrl + Alt + L//format code

Ctrl + Alt + O optimize import

Ctrl + Alt + T uses * to surround the selected line of code (* includes if, while,

Try catch, etc.)

ALT+F7//Find usage

SHIFT+F6//Rename

F6//Mobile

CTRL+SHIFT+F7//Display string usage times

Alt+delete//Safe Removal

Ctrl +/[Jump to code block end/Start

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.