DataGrip 2021.1 Help

Templates with multiple files

Some programming patterns and frameworks require a set of related files, usually with a very specific structure. For example, you can create separate SQL files: one that creates database structure, and the other one that inserts the data to the database.

In DataGrip, you can create sets of related files by adding child templates to a file template. When you create a file from such a template, it will also create files from child templates.

Create a template with multiple files

  1. In the Settings/Preferences dialog Ctrl+Alt+S, select Editor | File and Code Templates.

  2. Create the main file template.

    On the Files tab, click the Create Template button and specify the name, file extension, and body of the template.

  3. Select the new template in the list and click The Create Child Template File button on the toolbar. Specify the name, file extension, and body of the child template.

Last modified: 12 March 2021