Auto Import
for Windows and Linux
for macOS
Ctrl+Alt+S
XML
Show import pop-up | Automatically display an import pop-up dialog box when typing the name of an unbound namespace. |
TypeScript
Show import pop-up | Automatically display import pop-up dialog box when typing the name of a symbol that lacks import statement. |
PHP
Enable auto-import in file scope | Select this check box to have PhpStorm 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 check box is cleared. |
Enable auto-import in namespace scope | Select this check box to have PhpStorm 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 check box is selected by default. |
Enable auto-import from global space | When this check box is selected, PhpStorm automatically adds |
Prepend functions and constants from the global space with '\' | The check box is available only when the Enable auto-import from global space is cleared. When the check box is selected, PhpStorm automatically prepends called functions and referenced constants from the global namespace with a backslash. When the check box is cleared, no backslashes are added. |
To keep your code easy to read and increase productivity by avoiding additional loops during name resolution, select either the Enable auto-import from global space or the Prepend functions and constants from the global space with '\' checkbox. See PHP name resolution rules for more details. |
See Also
Getting Started:
Last modified: 19 July 2017