I want to make snippet for Sublime Text 2 or 3 which will produce the following code:
initial - somename
with upper case - Somename
and somename
is text which will be always different.
My draft for this:
<snippet>
<content><![CDATA[
initial - ${2:somename}
with upper case - ${2:somename}
]]></content>
</snippet>
But how can I uppercase only first letter in parameter?
Final variant:
<snippet>
<content><![CDATA[
initial - ${1:somename}
with upper case - ${1/(.+)/\u$1/g}
]]></content>
</snippet>
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