Auto Import
for macOS
Ctrl+Alt+S
XML
Show import popup | Automatically display an import popup dialog box when typing the name of an unbound namespace. |
Java
Insert imports on paste | Select how IntelliJ IDEA should process references to missing classes, static methods, or fields in pasted blocks of code: All — import statements will be added automatically for all missing classes, methods and fields found in pasted blocks of code. Ask — you will be prompted to select which classes, methods and fields you want to import. None — no import statements will be added, you won't be asked about unresolved references. |
Show import popup for | Select whether you want the IDE to show popups for classes and/or for static methods and fields. By default, both options are selected. |
Optimize imports on the fly | If this option is on, IntelliJ IDEA removes unused imports, adds missing imports, and organizes import statements silently as you work in the editor. |
Add unambiguous imports on the fly | This option enables automatic insertion of import statements if there's only one source of import. |
Exclude from import and completion | Specify packages and classes that you want to exclude from the list of import and completion suggestions (the |
TypeScript/JavaScript
Add ES6 imports on code completion |
|
Add TypeScript imports automatically | Select this checkbox if you want IntelliJ IDEA to generate import statements in TypeScript code. Use the checkboxes below to choose when import generation will be invoked.
|
JSP
Add unambiguous imports on the fly | Select this checkbox to have IntelliJ IDEA automatically add imports that can be added without user intervention. |
Scala
Insert imports on paste | Select how IntelliJ IDEA should process references to missing classes in pasted blocks of code: All — import statements will be added automatically for all missing classes, methods and fields found in pasted blocks of code. Ask — you will be prompted to select which classes, methods and fields you want to import. None — no import statements will be added, you won't be asked about unresolved references. |
To disable import popup, use Java settings | Refer to the same options in the settings for Java. |
Add unambiguous imports on the fly | This option enables automatic insertion of import statements if there's only one source of import. |
Optimize imports on the fly | If this option is on, IntelliJ IDEA removes unused imports, adds missing imports, and organizes import statements silently as you work in the editor. |
PHP
Enable auto-import in file scope | Select this checkbox to have IntelliJ IDEA automatically import PHP namespaces, add use statements, and complete short class names on the fly, when you are typing in a class or file that does not belong to any specific namespace. By default, the checkbox is cleared. |
Enable auto-import in namespace scope | Select this checkbox to have IntelliJ IDEA automatically import PHP namespaces, add use statements, and complete short class names on the fly when you are typing in a class or file that belongs to a certain namespace. The checkbox is selected by default. |
Treat symbols from the global space | In this area, configure auto-import from the global namespace separately for classes, functions, and constants.
|