I have a few snippets for creating form elements in sublime text 2 for the blade.
To make the fragments more adequate, I would like to add functionality to convert the case in the mirrored text to a heading, as well as separate words with spaces instead of underscores.
This is a snippet from my snippet;)
{{ Form::label('$1', '${1/\b(\w*)\b/\u\1/g}') }}
Right now, when I print at position $ 1, the mirror text is converted to the title.
So, the result in a document with a blade can be, for example:
{{ Form::label('password', 'Password') }}
Now I also want to change the mirror text to replace underscores with spaces and convert THEN to a header. This is the part that I cannot understand.
So instead:
{{ Form::label('password_confirmation', 'Password_confirmation') }}
I want to end with this:
{{ Form::label('password_confirmation', 'Password Confirmation') }}
source share