1

I am creating a user snippet in vs code for my react development.

I have one transform to extract immediate parent folder name using

${TM_DIRECTORY/^.+\\\\(.*)$/$1/}

and another transform to capitalize

"${TM_DIRECTORY/(.*)/${1:/capitalize}/}"

Link : How to get the base directory in visual studio code snippet?

I am still a noob at this so trying to figure out how to extract capitalized immediate parent folder name.

Maaz Ahmad Khan
  • 142
  • 1
  • 11

1 Answers1

-1

Figured it out !

I took help from this How to apply more than on transform on visual studio code snippets?

${TM_DIRECTORY/^.+\\\\(.*)$/${1:/capitalize}/}
Maaz Ahmad Khan
  • 142
  • 1
  • 11