ReSharper Web Help

ReSharper enables you to create classes, interfaces, structs and other files based on file templates. Once created, a new file is added to your project and opens in the editor. The file contains source code specified in the template.

File templates use indentation defined by language-specific code style settings that you can configure in:

  • ReSharper | Options | Code Editing | C# | Formatting Style for C#.
  • ReSharper | Options | Code Editing | Visual Basic .NET | Formatting Style for VB.NET.
  • ReSharper | Options | Code Editing | JavaScript | Formatting Style for JavaScript.
  • ReSharper | Options | Code Editing | CSS | Formatting Style for CSS.
  • ReSharper | Options | Code Editing | XML | Formatting Style for XML.

To create a new file from a template using ReSharper menus
  1. On the main menu, choose ReSharper | Edit | New from Template.
  2. In the New from Template menu, choose Class, Interface, Struct, etc. or a custom item (if available). If you want to use a custom file template that was not added to the New from Template menu, select More to display the Choose Template dialog box.
  3. Select a required template using the Choose Template dialog box. To optionally introduce a custom file template into the New from Template menu, select its entry in the Choose Template dialog box and select Add to quicklist in the lower part of the dialog box before clicking OK.
  4. When the Create: [name of template] dialog box appears, specify the name for the new file in the Enter name text field and click OK.
To create a new file from Solution Explorer
  1. Select a node in Solution Explorer.
  2. Press Alt+Insert or Ctrl+Alt+Insert to display a drop-down list of available file templates:
  3. Select a target template. The corresponding file will be created right away.
To create a new file from Text Editor
  1. Press Ctrl+Alt+Insert to display drop-down list of available file templates:
  2. Select a target template. The corresponding file will be created right away.

See Also

Procedures

Reference

External Links