preface

Today we will summarize the overall use of IDEA configuration method, let your idea cool to fly, if you are not familiar with idea configuration, then this is specially prepared for you

directory

  1. Configure maven
  2. IDEA Sets the line width
  3. IDEA prompt is case insensitive
  4. IntelliJ forces Maven Dependencies to be updated
  5. The default location for saving the environment configuration of IDEA
  6. Hide unwanted files or folders (similar to eclipse’s Filter feature)
  7. Change to Eclipse shortcut key
  8. Change the default setting –default Setting
  9. Modify smart prompt shortcut keys
  10. Search for shortcut key conflicts
  11. According to the line Numbers
  12. Code intelligence prompts, ignoring case
  13. Use * to identify edited files
  14. Turn off automatic code prompt
  15. Common Shortcut keys
  16. SVN failed to synchronize code
  17. Set the SVN of IDEA to ignore the *. Iml file
  18. Change the font size of the edited text
  19. IDEA encoding Settings
  20. Live Templates
  21. Setting Tomcat Parameters
  22. Adjust memory configuration parameters during idea startup
  23. Import eclipse Web project to publish to Tomcat if it cannot be found
  24. Every time a new JSP or Java file is opened, the CPU usage is very high, so remove the validation
  25. IDEA Automatic compilation after class modification is enabled
  26. Prompt to generate serialVersionUID
  27. Magical Inject language
  28. A powerful symbol
  29. Resolution of conflicts between IDEA shortcut keys and Windows default shortcut keys (e.g. Ctrl+Alt+↑ or Ctrl+Alt+F12)
  30. When formatting code, comments are formatted in question
  31. Case switching
  32. Idea shortcut keys complete

Configure maven

  • Go to File-> Settings -> search for Maven
  • Mavan home Directory — Sets the location of the maven installation package’s bin folder
  • User Settings file- Sets the location of the setting file
  • Local repository- Sets up Local repositories

IDEA Sets the line width

  • In the File – > Settings – > Editor – > Code Style
  • One might ask, how do I get the IDE to wrap the code automatically if it goes beyond the width line? There are two ways!
  • First, under the above “Right margin (columns)”, there is “Wrap when typing REACHES Right margin”.
  • As the number of characters entered increases, IDEA automatically wraps the code when the code width reaches the boundary.
  • The first way is to trigger when you type Code, and the second way is to go to File-> Settings ->Code Style->Java and select the “Wrapping and Braces” TAB,
  • In “Keep when reformatting”, there is a “Ensure rigth margin is not exceeded”.
  • It’s easy to understand from the literal meaning of configuration items that when formatting Java code, make sure the code does not exceed the width boundary.
  • That is, when the input code goes out of bounds,

IDEA prompt is case insensitive

  • First open File—–> Setting
  • Then, type: sensitive
  • Change the case Sensitive completion on the right to NONE

IntelliJ forces Maven Dependencies to be updated

Intellj’s ability to automatically load Mave dependencies is useful, but sometimes problems occur where poM file changes do not trigger automatic reloads, requiring manual enforcement of dependency updates.

As follows:

  • Delete Libraries from Project Settings manually.
  • In Maven Project’s attempt to clean, delete previously compiled files;
  • Project right-click – “Maven-” Reimport
  • Ok, now the dependency has been established!

The default location for saving the environment configuration of IDEA

  • The default location for saving the environment configuration of IDEA is C:\Users\xxxxxxxxx.IntelliJIdea14, where XXXXXX stands for user directory.
  • This directory can be backed up and the configuration can be restored in case of an environment failure.
  • You can modify the configuration path in %IDEA_HOME%/bin/idea.properties.

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 Types

Change to Eclipse shortcut key

  • File -> Settings -> Keymap => Keymaps to Eclipse copy

Modify smart prompt shortcut keys

  • File -> Settings -> Keymap -> Main menu -> Code -> Completion -> Basic=> Ctrl+Alt+Enter
  • Remove conflicts when saving.
  • File -> Settings -> Keymap -> Editor Actions -> Complete Current Statement=> Change to Ctrl+;

Search for shortcut key conflicts

File -> Settings -> Keymap -> Main menu -> Edit ->Find => Modify Find… And the Replace… Change to Ctrl+F and Ctrl+R, respectively

According to the line Numbers

File -> Settings ->Editor ->General -> Appearance =>Show line numbers check

Code intelligence prompts, ignoring case

File -> Settings -> Editor -> Code Completion Set Case Sensitive Completion to None

Use * to identify edited files

  • Editor – > General – > Editor Tabs
  • In IDEA, you need to do the following, so that the modified files are marked with * and you can save the related files in time.
  • “Mark Modifyied Tabs with Asterisk”

Turn off automatic code prompt

Preferences => IDE Settings => Editor => Code Completion => Autopopup documentation in (ms)

SVN failed to synchronize code

File -> Settings ->Subversion ->General => Use Command line client selected

  • To use the Command line, you need to specify the path of svn.exe, for example, D: tools\TortoiseSVN\bin\svn.exe
  • C:\Program Files\TortoiseSVN\bin\svn.exe will cause an error.
  • If you TortoiseSVN all the components need to be installed, SVN

Set the SVN of IDEA to ignore the *. Iml file

  • Editor->File Types=>Ignore files and folders increment *.iml;
  • Enter.idea in lgnore Files and Folesrs. Be careful to “;” At the end. You can hide the.idea folder

Change the font size of the edited text

File -> settings -> EDITOR COLORS & FONTS -> FONT -> SIZE

IDEA encoding Settings

  • FILE -> SETTINGS -> FILE ENCODINGS => IDE ENCODING
  • FILE -> SETTINGS -> FILE ENCODINGS => Project Encoding
  • FILE -> SETTINGS -> FILE ENCODINGS => Default encoding for properties files
  • FILE -> SETTINGS -> FILE ENCODINGS => Transparent native-to-ascii conversion

Live Templates

System.out.println Quick output

  • “ABC”. Sout = > System. Out. The println (” ABC “);
  • Sysout => system.out.println (); sysout=> system.out.println ();

The for loop

  • List list = new ArrayList();
  • Enter: list.for to print
  • for(String s:list){}

Setting Tomcat Parameters

vm options: -Xms256m -Xmx512m -XX:PermSize=128m -XX:MaxPermSize=256m

Adjust memory configuration parameters during idea startup

%IDEA_HOME%/bin/idea.exe.vmoptions

Remove Java file validation

Conforms to CONFORMS: File -> Settings -> Editor -> Conforms to

Prompt to generate serialVersionUID

  • Those of you who use Eclipse or MyEclipse may know that if implements Serializable interface, you will be prompted to generate serialVersionUID.
  • But Intellij IDEA does not enable this feature by default.
  • Preferences->IEditor-> Nspections ->Serialization Issues ->Serializable Class Without ‘serialVersionUID’,
  • With the above selected, in your class: place the cursor before the class name and press Alt+Enter to prompt you to automatically create the serialVersionUID

When formatting code, comments are formatted in question

Disable enable Javadoc formating

Case switching

  • The default shortcut for switching case of IDEA is CTRL + Shift + U
  • If the default shortcut keys conflict, double-click Shift and type Toggle Case

A 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.

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 in IDEA to help us automatically escape double quotes.

  • 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.

The conflict between IDEA shortcut keys and Windows default shortcut keys is resolved

Right-click on the desktop – Graphics options – shortcut keys – Disable

IDEA Automatic compilation after class modification is enabled

  • File->setting->Buil,Execution,Deployment->compiler=>Make project automatically
  • Compilation error resolved
  • Error:java: Compilation failed: internal java compiler error
  • [bug Mc-10866] – Java complier set in set will cause this error if jdk1.6 or 1.7 is used in the project

Ctrl

shortcuts introduce
Ctrl + F Text lookup in the current file(required)
Ctrl + R Text replacement in the current file(required)
Ctrl + Z undo(required)
Ctrl + Y Deletes the line where the cursor is located or deletes the selected line(required)
Ctrl + X Cuts the line where the cursor is located or the selection
Ctrl + C Copies the line where the cursor is or the selection
Ctrl + D Copy the line where the cursor is or copy the selection and insert the copy below the cursor position(required)
Ctrl + W Progressive selection of code blocks. You can select the word or paragraph where the cursor is located. Pressing continuously expands the selection range(required)
Ctrl + E Displays a list of recently opened file records
Ctrl + N According to the inputThe name of the classFind class files
Ctrl + G Jumps to the specified line in the current file
Ctrl + J Insert custom dynamic code templates
Ctrl + P Method parameter prompt is displayed
Ctrl + Q Above the variable/class/method name where the cursor is (or when prompted to add), the document content is displayed
Ctrl + U Method/interface definition to the parent class of the method where the current cursor is located
Ctrl + B Enter the interface of the method/variable where the cursor is located or define, equivalent toCtrl + Left click
Ctrl + K Version control submits an item that has been added to version control to be available
Ctrl + T Version control update items that are available only if they have been added to version control
Ctrl + H Displays the hierarchy of the current class
Ctrl + O Select methods that can be overridden
Ctrl + I Choose an inheritable method
Ctrl + + A code
Ctrl + – Fold the code
Ctrl + / The line of code where the comment cursor is located uses different comment symbols according to the current file type(required)
Ctrl + [ Move the cursor to the beginning of the curly brace of the current code
Ctrl + ] Move the cursor to the end of the curly brace in the current code
Ctrl + F1 Displays an error message in the error code where the cursor is located
Ctrl + F3 Go to the next reference location of the selected word
Ctrl + F4 Close the current edit file
Ctrl + F8 In Debug mode, set the breakpoint for the cursor’s current behavior, or remove the breakpoint if it is already broken
Ctrl + F9 Perform the Make Project operation
Ctrl + F11 Select the file/folder and set/unbookmark using the mnemonic
Ctrl + F12 Pop up the current file structure layer, you can pop up the layer directly input, screening
Ctrl + Tab Edit window switch. If delete is added in the switching process, the selected window will be closed
Ctrl + Enter Smart split line
Ctrl + End Skip to the end of file
Ctrl + Home Skip to file header
Ctrl + Space Basic code completion, which is occupied by the input method on the Windows operating system by default, needs to be changed. You are advised to change it toCtrl + a comma (required)
Ctrl + Delete Delete the word or Chinese sentence after the cursor
Ctrl + BackSpace Delete the word or Chinese sentence before the cursor
Ctrl + 1, 2, 3… 9 Navigate to the bookmark location for the corresponding value
Ctrl + Left click On the open file title, pop up the file path
Ctrl + cursor position Pressing Ctrl without releasing will display a summary of the class where the cursor is located
Ctrl + left arrow key The cursor jumps to the left beginning of the current word/Chinese sentence
Ctrl + right arrow key The cursor jumps to the right beginning of the current word/Chinese sentence
Ctrl + front arrow key Equivalent to the mouse wheel forward effect
Ctrl + rear arrow key Equivalent to the mouse wheel backward effect

Alt

shortcuts introduce
Alt + ` Display the pop-up layer of common version control menu
Alt + Q A prompt displays declaration/context information for the current class
Alt + F1 Display the current file selection target pop-up layer, pop-up layer has a lot of targets to choose from
Alt + F2 For the previous page, the pop-up layer of various browser open target selection is displayed
Alt + F3 Select the text, scroll down the same text one by one, and highlight it
Alt + F7 Find the method/variable/class where the cursor is called
Alt + F8 In the Debug state, you can select an object and view the debugging result of the input calculation expression in the debugging box
Alt + Home Locate/display to current fileNavigation Bar
Alt + Enter IntelliJ IDEA provides a quick fix option based on the problem of the cursor position. The prompt result varies with the cursor position(required)
Alt + Insert Automatic code generation, such as generating object set/get methods, constructors, toString(), etc
Alt + left arrow key Press left to toggle the currently open file view
Alt + right arrow key Press the right to switch the currently open file view
Alt + arrow key The current cursor jumps to the previous method name location of the current file
Alt + arrow key The current cursor jumps to the position of the last method name in the current file
Alt + 1, 2, 3… 9 Displays a TAB with the corresponding value, where 1 is the most used for Project

Shift

shortcuts introduce
Shift + F1 You can connect to external documents, if any
Shift + F2 Jumps to the previous highlighted error or warning location
Shift + F3 In search mode, search matches one
Shift + F4 For the currently open file, use a new Windows window to open it, leaving the old window open
Shift + F6 Rename files/folders
Shift + F7 In Debug mode, smart steps in. If there are multiple method calls on the breakpoint line, which method will pop up
Shift + F8 In Debug mode, the effect is displayed as followsF9The same
Shift + F9 Equivalent to clicking on the toolbarDebugbutton
Shift + F10 Equivalent to clicking on the toolbarRunbutton
Shift + F11 Pop up the bookmark display layer
Shift + Tab dedent
Shift + ESC Hides the current or last active tool window
Shift + End Select the cursor to the end of the current line
Shift + Home Select the cursor to the current position
Shift + Enter Start a new line. A row is left below the cursor, and the cursor is positioned on the new row
Shift + Left click Press this shortcut key on the open file name to close the currently open file
Shift + scroll back and forth Scroll the horizontal scroll axis of the current file

Ctrl + Alt

shortcuts introduce
Ctrl + Alt + L Formatting code that can be used for the current file and the entire package directory(required)
Ctrl + Alt + O Optimized imported classes that can be used for the current file and the entire package directory(required)
Ctrl + Alt + I The line or selected portion of the cursor is automatically indented, somewhat like formatting
Ctrl + Alt + T Popup surround option popup layer for the selected code
Ctrl + Alt + J The template selection window is displayed, adding the selected code to the dynamic template
Ctrl + Alt + H The hierarchy
Ctrl + Alt + B Using it on the method name of a call jumps to the implementation, and the interface can be skipped
Ctrl + Alt + V Quick introduction of variables
Ctrl + Alt + Y Synchronize and refresh
Ctrl + Alt + S Open the IntelliJ IDEA system Settings
Ctrl + Alt + F7 Show where it is used. Find where the class or variable is called and use a pop-up box to find it
Ctrl + Alt + F11 Switch to the full-screen mode
Ctrl + Alt + Enter A row is displayed over the cursor row, and the cursor is positioned on the new row
Ctrl + Alt + Home Pop up the file pop-up layer associated with the current file
Ctrl + Alt + Space The class name completes automatically
Ctrl + Alt + left arrow key Return to the previous operation(Mandatory) ** (note conflicts with other software shortcuts) **
Ctrl + Alt + right arrow key Advance to the point of the previous operation(Mandatory) ** (note conflicts with other software shortcuts) **
Ctrl + Alt + arrow key In search mode, skip to the last searched file
Ctrl + Alt + arrow keys In search mode, skip to the next searched file

Ctrl + Shift

shortcuts introduce
Ctrl + Shift + F Finds the entire project or files in the specified directory based on the input(required)
Ctrl + Shift + R Replace the input with the entire project or files in the specified directory(required)
Ctrl + Shift + J Automatically merge the next line to the end of the current line(required)
Ctrl + Shift + Z Cancel to cancel the(required)
Ctrl + Shift + W Progressive deselect code blocks. You can select the word or paragraph where the cursor is located. Pressing continuously will expand the unselected range on the basis of the original selection(required)
Ctrl + Shift + N Locate/open a file/directory by file name. To open a directory, add a forward slash after the input(required)
Ctrl + Shift + U The selected code is converted in large/lowercase rotation(required)
Ctrl + Shift + T Generate a unit test class for the current class, and select one if it already exists
Ctrl + Shift + C Copies the current file disk path to the clipboard
Ctrl + Shift + V Popup the content manager popup layer for the most recent copy of the cache
Ctrl + Shift + E Pop-up layer that displays a list of recently modified files
Ctrl + Shift + H Display method hierarchy
Ctrl + Shift + B Jump to type declaration
Ctrl + Shift + I Quickly view the definition of the method or class where the cursor is located
Ctrl + Shift + A Find actions/Settings
Ctrl + Shift + / Code block comment(required)
Ctrl + Shift + [ Select from the cursor position to its top bracket position
Ctrl + Shift + ] Select from the cursor position to its bottom bracket position
Ctrl + Shift + + Expand all the code
Ctrl + Shift + – Collapse all code
Ctrl + Shift + F7 Highlight all the selected text and press Esc to highlight and disappear
Ctrl + Shift + F8 In Debug mode, specify breakpoint entry conditions
Ctrl + Shift + F9 Compile the selected file/package/Module
Ctrl + Shift + F12 Editor maximization
Ctrl + Shift + Space Intelligent code hints
Ctrl + Shift + Enter Auto-end code, automatically add semicolon at the end of line(required)
Ctrl + Shift + Backspace Go back to the last modification
Ctrl + Shift + 1,2,3… 9 Quickly bookmarks the specified value
Ctrl + Shift + Left arrow key On the code file, the cursor jumps to the left beginning of the current word/Chinese sentence and selects the word/Chinese sentence
Ctrl + Shift + Right arrow key On the code file, the cursor jumps to the right beginning of the current word/Chinese sentence and selects the word/Chinese sentence
Ctrl + Shift + Left arrow key When the cursor focus is on the tools TAB, zoom out the TAB area
Ctrl + Shift + Right arrow key When the cursor focus is on the tools TAB, enlarge the TAB area
Ctrl + Shift + Front Arrow key Place the cursor over the method name, move the method ahead of the previous method, and adjust the sorting of methods
Ctrl + Shift + Rear arrow key Place the cursor over the method name, move the method ahead of the next method, and adjust the sorting of methods

Alt + Shift

shortcuts introduce
Alt + Shift + N Select/Add task
Alt + Shift + F Show add to favorites pop-up layer
Alt + Shift + C View a list of recent action items that have changed
Alt + Shift + F Add to favorites
Alt + Shift + I View the project’s current file
Alt + Shift + F7 In Debug mode, the next step is to enter the body of the current method. If the body of the method still has methods, it will enter the embedded method, and so on
Alt + Shift + F9 The pop-upDebugThe optional menu of
Alt + Shift + F10 The pop-upRunThe optional menu of
Alt + Shift + double click Select the word/Chinese sentence to be double-clicked, hold down and select other words/Chinese sentence at the same time
Alt + Shift + ARROW key Move The cursor moves up the line
Alt + Shift + arrow key Move Moves the cursor down the line

Ctrl + Shift + Alt

shortcuts introduce
Ctrl + Shift + Alt + V Unformatted paste
Ctrl + Shift + Alt + N Goes to the specified variable/method
Ctrl + Shift + Alt + S Open the current project Settings
Ctrl + Shift + Alt + C Copy reference information

other

shortcuts introduce
F2 Jump to the next highlighted error or warning location(required)
F3 In search mode, locate the next match
F4 The source editor
F7 In Debug mode, the next step is to enter the current method body if the current line breakpoint is a method, but not the inline method body if there are other methods
F8 In Debug mode, the next step is not to enter the current method body if the current line breakpoint is a method
F9 In Debug mode, the program resumes running, but stops at the next breakpoint if the code below that breakpoint still has breakpoints
F11 Add a bookmark
F12 Go back to the previous tool window
Tab The indentation
ESC Go to the code file window from the tools window
Press Shift twice The pop-upSearch EverywherePop-up layer

From: blog.csdn.net/fly910905/a… https://blog.csdn.net/qq_38963960/article/details/89552704