1. Setup maven


1. Go to File-> Settings -> search for Maven

2.Mavan home directory-- Set the location of the maven installation package's bin folder

3.User Settings file-- Set the location of the setting file

4.Local Repository — Set up a Local repository

2.IDEA Sets the line width

1. In the File - > Settings - > Editor - > Code Style

2. How do I get the IDE to wrap the input code automatically if it is outside the width line? There are two ways!

3. The first option is "Wrap when typing REACHES Right margin" under the above "Right margin (columns)".

4. As the number of characters entered increases, IDEA automatically wraps the code when the code width reaches the boundary.

5. The first way is to trigger when you type Code, and the second way is to go to File-> Settings ->Code Style->Java, check the "Wrapping and Braces" TAB,

6. In "Keep when reformatting", there is a "Ensure rigth margin is not exceeded".

7. The literal meaning of the configuration item is easy to understand. When formatting Java code, make sure the code does not exceed the width boundary.

8. That is, after the input code exceeds the boundary,

3.IDEA Prompt is case insensitive

1. First open File-----> Setting

2. Next, enter: sensitive

3. Change the case Sensitive completion on the right to NONE

4.IntelliJ forces to update Maven Dependencies

1. The Intellj auto-load Mave dependency works well, but sometimes causes problems, resulting in POM 2. The dependency needs to be manually updated when the automatic reload action is not triggered.

As follows:


1. Manually delete the Libraries content in Project Settings.

2. Clean the Maven Project and delete the previously compiled files.

3. Project right-click - "Maven-" Reimport

4.Ok, the dependency has been established!

5. The default location for saving the environment configuration of IDEA
1. The default location for saving the environment configuration of idea :C:\Users\ XXXXXXXXX \.IntelliJIdea14, XXXXXX stands for user directory,
2. You can back up the directory and restore the configuration if the environment fails.
3. You can modify the configuration path in %IDEA_HOME%/bin/idea.properties.
6. Hide unwanted files or folders (similar to Eclipse’s Filter feature)
Intellij Idea Hides unwanted files or folders (similar to Eclipse's Filter feature)
Open Intellij -->:>File -->>Settings--> search for File Type
7. Change the shortcut key to Eclipse
File -> Settings -> Keymap => Keymaps to Eclipse copy
8. Change the default setting –default Setting
Change the default setting --default Setting
9. Modify the smart prompt shortcut keys
1.File -> Settings -> Keymap -> Main menu -> Code -> Completion -> Basic=> Ctrl+Alt+Enter
2. Remove the conflicts when saving the Settings.
3.File -> Settings -> Keymap -> Editor Actions -> Complete Current Statement=> Change to Ctrl+
10. Solve the problem of shortcut key conflict
1.File -> Settings -> Keymap -> Main menu -> Edit ->Find => Modify Find... And the Replace... Change to Ctrl+F and Ctrl+R, respectively
11. Display the line number
1.File -> Settings ->Editor ->General -> Appearance =>Show line numbers
12. Code intelligence prompts, ignoring case
File -> Settings -> Editor -> Code Completion Set Case Sensitive Completion to None
13. Use * to identify edited files
1. The Editor - > General - > Editor Tabs
2. In IDEA, you need to do the following Settings, so that the modified files will be marked with *, you can save the relevant files in time.
3. "Mark Modifyied Tabs with Asterisk
14. Turn off automatic code prompts
1.Preferences => IDE Settings => Editor => Code Completion => Autopopup documentation in (ms)
15. Common shortcut keys
1. ø Top #10 Cut to cut:
Ctrl+Tab
2. ø Top #9 Select what you want:
Ctrl+W
ø Top #8 code generation:
Template/Postfix +Tab
4. ø Top #7 Command:
Ctrl+Shift+A
5. ø Top #6 No place to hide:
Shift+Shift
6. ø Top #5 Automatic completion:
Ctrl+Shift+Enter
7. ø Top #4 Create everything:
Alt+Insert


Use the top three!
ø Top #1 Intelligent completion:
Ctrl+Shift+Space
2. ø Top #1 Self-repair:
Alt+Enter
ø Top #1 Refactor everything:
Ctrl+Shift+Alt+T


Other auxiliary
1. These magic keys, combined with some auxiliary shortcuts, can make your hands free from mouse 2 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:
2. Ø command:
Ctrl+Shift+A finds all Intellij commands, and each command is followed by its own shortcut key.
So it is not only a great key, but also a tool to find learning shortcuts.
3. Ø new:
Alt+Insert can create new classes, methods, anything.
4. Formatting code:
Format the import list with Ctrl+Alt+O and the formatting code with Ctrl+Alt+L.
5. ø Switching window:
Alt+Num, common ones are 1- project structure, 3- search results, and 4/5- run debugging.
Ctrl+Tab Toggles tabs, Ctrl+E/Ctrl+Shift+E opens recently opened or edited files.
6. Unit Test:
Ctrl+Alt+T creates a unit test case.
7. Ø run:
Alt+Shift+F10 to run the program, Shift+F9 to debug, Ctrl+F2 to stop.
8. Ø debugging:
F7/F8/F9 correspond to Step into, Step over, and Continue respectively.
In addition, some of my custom, such as horizontal split screen Ctrl + | etc., and some of the magical function of small 9. Ctrl + Shift + V to paste copy of long ago, Alt + Shift + Insert (block) into the column model according to the selected columns
16. SVN cannot synchronize code
File -> Settings ->Subversion ->General => Use Command line client selected
Exe path, for example, D:\tools\TortoiseSVN\bin\svn.exe
C:\Program Files\TortoiseSVN\bin\svn.exe will cause an error.
If the TortoiseSVN option is selected, svN. exe may not be available
17. Configure the SVN of IDEA to ignore the *. Iml file
1.Editor->File Types=>Ignore files and folders increment *.iml;
2. Enter.idea in lgnore Files and Folesrs. Be careful to ";" At the end.
You can hide the.idea folder

18. Change the font size of the edited text

File -> settings -> EDITOR COLORS & FONTS -> FONT -> SIZ
19.IDEA encoding Settings
1.FILE -> SETTINGS -> FILE ENCODINGS => IDE ENCODING
2.FILE -> SETTINGS -> FILE ENCODINGS => Project Encoding
3.FILE -> SETTINGS -> FILE ENCODINGS => Default encoding for properties files
4.FILE -> SETTINGS -> FILE ENCODINGS => Transparent native-to-ascii conversion
20.Live Templates
System.out.println Quick output
"ABC". Sout = > System. Out. The println (" ABC ");
Used in Eclipse:
sysout=> System.out.println();
The for loop
List<String> list = new ArrayList<String>();
Enter: list.for to print
for(String s:list){}
21. Set Tomcat parameters
1.vm options: -Xms256m -Xmx512m -XX:PermSize=128m -XX:MaxPermSize=256m
22. Idea installation method of the plug-in
1. Install findBugs in IntelliJ IDEA 14.0.1 as an example:
(1) Online: File-> Setting ->plugins-> Browse Repositorits
3. The download address is displayed on the right. Restart the server as prompted.
4.(2) Install the findBugs plugin offline:
5.http://plugins.jetbrains.com/plugin/3847,
6. Download findbugs-idea-0.9.994.zip and install the plugin:
Go to File->setting-7.>plugins=> Install plugin from disk...
8. Locate the jar you just downloaded, click OK, and restart as prompted.
9. The plugin is installed under the name of C:\Users\ XXXXXXXXX \.intellijidea14 \config\plugins\.
10. Install the iBATIS/MyBatis min-plugin
23. Adjust memory configuration parameters during idea startup
1.%IDEA_HOME%/bin/idea.exe.vmoptions
24. Import eclipse Web project to publish to Tomcat if it cannot be found
If it cannot be found, you can add Web support to Facets of the environment configuration, and add project deployment modules to Artifacts
25. CPU usage is high every time a new JSP or Java file is opened
Every time a new JSP or Java file is opened, the CPU usage is very high.
file->settings->editor->inspection
26. Idea added spring/ Struts associated file support
Project Settings->Modules-> Right-click the project to add
27. IDEA Automatic compilation after class modification is enabled
1.File->setting->Buil,Execution,Deployment->compiler=>Make project automatically
2. The compilation error is resolved
3.Error:java: Compilation failed: internal java compiler error
4. The Java complier setting in set is wrong. Some people in the project use JDk1.6 and some people use JDk1.7
28. Prompt implementation of Serializable interface
1. Students who use Eclipse or MyEclipse may know that if implements Serializable interface, you will be prompted to generate serialVersionUID.
2. Intellij IDEA does not enable this feature by default.
3.Preferences->IEditor-> Nspections ->Serialization Issues ->Serializable Class Without 'serialVersionUID',
4. In your class:
Placing the cursor in front of the class name, pressing Alt+Enter prompts you to automatically create the serialVersionUID
29. Performance mode
We can use [Presentation Mode] to maximize the IDEA, so that you can only focus on the codes in one class and carry out coding without interference.
You can use Alt+V to bring up the View, and then select Enter Presentation Mode.
Results the following
The advantage of this pattern is that it makes you more focused, because you can only see the code for a particular class.
You might ask, what if I want to see code for other classes once I'm in this mode?
At this time, will test your shortcut key proficiency.
You can use CTRL+E to bring up the most recently used files.
Or use CTRL+N and CTRL+SHIFT+N to locate the file.


How do I exit this mode?
Simple, use ALT+V to pop up the View and select Exit Presentation Mode.
However, I strongly recommend you not to do this, because you can do anything in IDEA in Enter Presentation Mode.
Of course, the premise is that you are familiar with IDEA
The magical Inject language
If you use IDEA to write JSON strings and then want to escape double quotes one by one, it's really bad, annoying and error-prone.
Inject Language can be used to automatically escape double quotes in IDEA
Press Alt + Enter to display the Inject Language view, and select Inject Language or Reference.



After selecting, remember to directly press Enter to display the Inject Language list. Select the JSON component in the list.



After choosing. The mouse focus is automatically placed inside the double quotation mark, which you can see by pressing Alt + Enter again



Select Edit JSON Fragment and press Enter to see the view for editing the JSON file.



You can see that IDEA does help us automatically escape double quotes. To exit the view for editing JSON information, simply press CTRL +F4.
Inject Language supports more languages and operations than you can imagine, readers can research by themselves.

31. Powerful symbol

If you vaguely remember the name of a method and want to find the letters in IDEA, what can you do?
Use CTRL + Shift + Alt + N and use symbol.
32. Conflict resolution between IDEA shortcut keys and Windows default shortcut keys (e.g.
Ctrl + Alt + write or Ctrl + Alt + F12)
Solution:
Right-click on the desktop - Graphics options - shortcut keys - Disable
The above content is collated from the Java version of the Web project public number, welcome to leave a message to discuss.

Focus on the public number [Java Ploughman], focus on Spring source analysis, Dubbo, Redis, Netty, Zookeeper, Spring Cloud, distributed and other full stack technology, regular video tutorial sharing, attention back to Java, receive I carefully prepared for you Java dry goods!