More customization for live templates

I wanna to create a template for something like this

if (!frame.Unsafe.TryGetPointer<$component$>($entity$, out var $componentOut$))
{
   $END$
}

where

- component is a value that I would fill, like ActionLockComponent
- entity will have a default value of “entity” but when tab I pass throught it allowing an edit
- componentOut would be a camel case version of component, so actionLockComponent

If I try to add it in OtherLanguages, it “kinda” works, the default value does not seems to work as I expect and being applicable to other make it shows in more than C#/Unity scenarios

 

Is it possible to have this level of customization (allowing expresions like camelCase) into this specific Live Template/C#? I mean, it seens that it just accept some pre-defined macros, or am I missing something?

0
1 comment

Hello Joao Gavron

Currently, adding a custom macro to use in templates is possible only by creating a custom plugin for Rider.

We have a feature request about this topic: RIDER-89749 Allow creating a custom macro for live/file templates

0

Please sign in to leave a comment.