WebStorm 2025.1 Help

Postfix completion

With postfix templates, you can transform an already-typed expression to a different one based on a postfix after the dot, the type of the expression, and its context.

WebStorm is shipped with a set of predefined postfix templates and lets you define your own custom ones for JavaScript and TypeScript.

Custom templates can be copied, updated, and removed. For predefined templates you can only change their postfixes, for example, to replace a long key with a shorter one.

Learn more from JavaScript postfix templates.

Enable and configure postfix completion

  • In the Settings dialog (Ctrl+Alt+S), open Editor | General | Postfix Completion and select the Enable postfix completion checkbox.

  • Enable or disable postfix templates for the selected language.

  • Set the Tab, Space, or Enter key to expand postfix templates.

Learn more from Activating postfix completion.

Edit a postfix template name

You can edit the predefined postfix templates, for example, to replace a long key with a shorter one, or to expand the list of applicable expression types.

  1. Press Ctrl+Alt+S to open settings and then select Editor | General | Postfix Completion.

  2. Double-click a template name in the tree or click the icon above the list of templates and edit it as required.

Share postfix templates

You can share postfix templates in the following ways:

Postfix vs. live templates

Postfix code completion is similar to live templates which allow you to create custom constructs to be used anywhere inside your code.

The difference is that live templates insert predefined code snippets, while postfix completion wraps or modifies existing expressions.

Last modified: 10 March 2025