ReSharper
 
Get ReSharper
Get your hands on the new features ahead of the release by joining the Early Access Program for ReSharper 2025.1! Learn more

Edit templates

Last modified: 11 February 2024

All templates that you can find in the Templates Explorer window can be edited according to your needs and development practices. You can edit template body, change shortcuts for live templates and descriptions for all templates, change template scope, introduce or modify template parameters.

Before editing code templates, it is recommended to study the way ReSharper stores them. Not only different templates can be saved in different settings layers, but modifications to a template can be saved separately in another settings layer.

In most cases, you do not have to do anything about it — just leave the default Smart option in the Layer selector. But there are cases when you have to select a particular settings layer. Some of these cases are described below.

For more information, refer to Storage of templates.

If you are going to edit a template that is shared via the Solution team-shared settings layer or via other shared layer, there are two ways to do so:

  • If you want your changes to affect those who use the same settings layer, make sure to choose the layer where the template is defined in the Layer selector before you start editing.

  • To change the template for yourself and leave the shared version intact, choose Smart (which is the default option) in the Layer selector before you start editing.

If you intend to edit a predefined template, you can also use the distributed storage of templates to your advantage:

  • By default, the Smart layer is chosen in the Layer selector, so your changes will be saved into the This computer settings layer and the modified template will be available in all solutions on your computer.

  • It might be useful to record the changes to the predefined template in a particular settings layer, for instance in the Solution-personal layer, so that the modified version of the template only appears in this solution. To do so, choose the target layer in the Layer selector,

    click Filter Templates ThemedIcon.Filter.Screen.(Gray).png and choose Show predefined templates and then choose a predefined template that you want to edit.