I am used to create new files in Visual Studio/Resharper with AltREN and then C for class, S for struct, T for test etc.
(this is the same as the menu Resharper
/Edit
/New From template
)
The last step stopped working when I updated to Resharper 9.
Is there a way to restore the old behaviour or is there a new shortcut available.
I tried to rename the template &Class but it didn't help.
To start a new document based on your template, on the File menu, click New from Template, and then select the template you want to use.
All predefined templates are stored in the ReSharper installation. All necessary modifications, including deletion of predefined templates, are saved in settings layers.
Code Templates are reusable code snippets that allow you to quickly insert commonly used code fragments or surround given code fragment with a meaningful code block (example: try-catch statement).
Telerik® JustCode™ comes with a number of predefined templates to insert or surround existing code with common data structures and statements.
In Visual Studio with ReSharper 9.0+:
Tools > Options > (Sidebar) Environment > Keyboard
Then:
Show commands containing:
resharper.resharper_template
These are the templates listed in the New from Template
dynamic menu. By default, Class
is the first template in this list (Template00
). To assign a shortcut key to the first template in the list:
ReSharper.ReSharper_Template00
.Use new shortcut in:
(I chose Solution Explorer
).Press shortcut keys:
to assign a shortcut key combination and click Assign
to save it.in 2017 version use the Ctrl+Alt+Insert keyboard shortcut -> choose class -> to insert a class
ref: https://www.jetbrains.com/help/resharper/2017.1/Templates__Applying_Templates__Creating_Files_from_Templates.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With