User-defined file templates storage
According to https://www.jetbrains.com/help/rider/Directories_Used_by_the_IDE_to_Store_Settings_Caches_Plugins_and_Logs.html#config-directory my templates should be stored in %AppData%\JetBrains\Rider2023.2 but there is no directories like fileTemplates or any templates. Quick search found my templates by name in resharper-host\GlobalSettingsStorage.DotSettings . So how I can manage templates except “Settings → Editor → File templates → C#” because this editor is not very comfortable for big templates?
Please sign in to leave a comment.
Hi Ruslan Yakauleu!
Indeed, only non-.NET WEB-specific templates are stored in the fileTemplates directory. You can manage them in File | Settings | Editor | File Templates | Other Languages. I've created an issue to improve our documentation about this.
You can find .NET templates in resharper-host\GlobalSettingsStorage.DotSettings file. It is not a very convenient place to manage the templates there, though. The best way to manage them is the editor you've mentioned. Could you please share some thoughts on why it is uncomfortable for you?
Thanks!
It is uncomfortable because only a small part of the template I can see. Even if I try to adjust the settings window to use as much screen as possible, it doesn't save position settings. And only syntax highlighting works. No check, no refactoring, no code completion allowed. So each time when I have to change something there, I must copy the template to a physical file.
Ruslan,
Thank you for the details. I've created a feature request for this, feel free to follow it.
Also, it seems like you use file templates to create many similar files (like CQRS). Rider allows you to generate code by templates. For example, try out our T4 support.
Thanks a lot