IntelliJ idea Common settings/operations

Source: Internet
Author: User
Tags try catch tomcat
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: settings->editor Remove allow placement of the caret after end of the line.

3.
How to display line numbers: Settings->editor->appearance tab items, 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 hints and complement shortcut keys conflict with IME, how to resolve: 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
Source: Acumen 1. Ctrl + Space completes automatic input of classes, methods, variable names
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

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.