Reputation: 91
I am working with snippets in Sublime Text 2/3 and would like to know if there is any way to remove spaces from mirrored fields.
Variable Description = "$1";
{$1}
Should become the following, if the user were to type in: Dinner Time
Variable Description = "Dinner Time";
{DinnerTime}
Upvotes: 1
Views: 44
Reputation: 19744
Haven't done to much with snippets before, but the substitution functionality may get you what you want. Take a look at http://docs.sublimetext.info/en/latest/extensibility/snippets.html#substitutions
If I had to guess though, it would be something like ${1/\s//g}
Upvotes: 2