I'm trying to transform a filename automatically in VSCode in two ways.
Let's say I have test-file-name.md
, I want to end up with Test File Name
in my document.
Right now I can do both part of the transform separately but I'm struggling to find how to combine them.
- To remove all the
-
and replace them with a space I do this:${TM_FILENAME_BASE/[-]/ /g}
- And for capitalizing the first letter of each word I do:
${TM_FILENAME_BASE/(\b[a-z])/${1:/upcase}/g}
(the\b
is probably useless in this case I guess)
I've tried multiples way of writing them together but I can't find a way to have them one after the other.