Sublime Forum

Lowercase snippet variable and insert spaces?

#1

Is it possible to convert a snippet variable to lower case and insert some spaces when it’s mirrored elsewhere? For example:

Original: SomeObject
Mirrored result: some object

This is specifically around a Django Model template which is currently written as such:

[code]class ${1:ModelName}(models.Model):
${0}

class Meta:
    verbose_name = _('$1')
    verbose_name_plural = _('$1s')

[/code]

And I’d like to set the verbose names to the proper representations of MODELNAME.

0 Likes