Q: I have the following Yasnippet, which looks like this:
MYNAME - $1 (`(insert-mode-description)`).
$2
When I insert the snippet, the cursor starts on $1
. Then I begin with typing. I would like to convert the first character of the sentence that I'm typing to uppercase.
When I look in the documentation of Yasnippet, there is a transformer that converts your text to uppercase. I need only to capitalize the first character.
Then I figured out another option:
MYNAME - $1 $2 (`(insert-mode-description)`).
$3
So Everything in $1
-place gets converted to uppercase. Then press tab
, to jump to $2
and typing further in lowercase letters.
But I'm not looking for that. Then I need to press tab
every time after I insert the first character.
I would just convert the first character of $1 to be uppercase. Any suggestion?