WebStorm 2018.2 Help

Creating Files and Directories

To create an empty file

  1. In the Project Tool Window, select the directory where you want to create a file, press Alt+Insert, and then select File from the list.

  2. In the New File dialog that opens, type the file name and extension. You can type the whole directory structure before the new file name. If the nested directories do not yet exist, they will be created.

    If the specified extension is not associated with any file type recognized in WebStorm, the Register New File Type Association dialog opens where you can associate the extension with one of the recognized file types. See Creating and Registering File Types for details.

In WebStorm, you can create files with language-specific extensions and some initial contents, thanks to file templates for most of the languages supported by the IDE.

To create a file

  1. In the Project Tool Window, select the directory where you want to create a file, press Alt+Insert, and then select the desired language or file type.

  2. In the dialog that opens, type the name of the file without any extension. You can type the whole directory structure before the new file name. If the nested directories do not yet exist, they will be created:
    Creating an HTML file according to the HTML5 template

    Specify other information as required. For example, you may be asked to define the values of custom variables if the corresponding file template contains such variables and their values are not currently set.

To create a directory

  1. In the Project tool window, right-click the directory where you want to create a new one and then select New | Directory from the context menu. Alternatively, click the parent directory, press Alt+Insert, and then select Directory from the list.

  2. In the dialog that opens, specify the directory name. If you want to create a number of nested directories, specify their names, use slashes as separators.

Last modified: 24 September 2018