All Questions
2 questions
1
vote
2
answers
295
views
How to use Regex to 'capitalize and replace' in Visual Studio Code's snippets?
I want to create a snippet on Visual Studio Code .
I tried to manually join the Regex but it never worked like my expect:
input:
idss-static-frame.spec
expected result:
IdssStaticFrame
my Regex:
${...
5
votes
3
answers
3k
views
VS Code Snippet transform: if (regex matches X) { use transform A } else if (regex matches Y) { use transform B }
I'm trying to create a snippet that creates a class name based on the file path. If the file is named index.js, I'd like the class name to take the folder name. Otherwise, use the file name.
I've got ...