📜  vscode 自定义片段多重转换 - TypeScript 代码示例

📅  最后修改于: 2022-03-11 14:48:13.277000             🧑  作者: Mango

代码示例1
"${TM_FILENAME_BASE/([A-Z])/${1:+-}${1:/downcase}/g}"
/*
To break this down, I start by grabbing the file name, then I
get a capital letter using the regular expression [A-Z] and
capture it in a group by putting parentheses around it,
then I access that group using ${1:} and add a dash before it
using +-, then I access that group again and make the capital
letter lowercase using /downcase, finally I put /g at the end
to make sure this gets applied to all of the capital letters.
*/