WebStorm 2024.3 Help

Share file templates

When you create or modify a file template, you do it in one of the following scopes (determined by the Scheme parameter under Editor | File and Code Templates):

  • Default: file templates created at the IDE level. These templates are available in all projects that you open with the current IDE instance. Use them as your personal templates that you prefer regardless of the specific project. WebStorm stores global templates in the IDE configuration directory under fileTemplates.

  • Project: file templates specific for the current project. These templates are available to everyone who works on this project. WebStorm stores them in the project folder under .idea/fileTemplates.

If you have file templates available at the IDE level (Default scheme), you can share them using Settings Sync or by manually exporting them.

Share file templates using Settings Sync

If you want to synchronize file templates across your IDEs (rather than sharing them with your teammates), you can use Settings Sync. Settings Sync uses the JetBrains server to synchronize IDE settings across the IDEs where you sign in using your JetBrains account.

  1. Press Ctrl+Alt+S to open Settings, go to Backup and Sync.

  2. If Settings Sync is not yet enabled, click Enable Backup and Sync.

  3. To share file templates, make sure the Code settings checkbox is selected under Configure what to sync. Select this checkbox on other IDEs where you want your code settings (including live templates) to be shared.

Export file templates manually

  1. Choose File | Manage IDE Settings | Export Settings from the menu.

  2. In the Export Settings dialog, make sure that the File templates (schemes) checkbox is selected and specify the path and name of the archive, where the exported settings will be saved.

  3. Click OK to generate the file based on the exported settings. You can share this file with your team members, or import it on another WebStorm installation.

Import file templates

  1. Select File | Manage IDE Settings | Import Settings from the menu.

  2. Specify the path to the archive with the exported file templates.

  3. In the Select Components to Import dialog, select the File templates checkbox and click OK.

After restarting WebStorm, you will see the imported file templates on the Editor | File templates settings page  Ctrl+Alt+S.

Last modified: 11 February 2024