【发布时间】:2020-06-11 19:57:30
【问题描述】:
我有这个sn-p:
{
"Creates async dux modules": {
"prefix": "dux-async",
"body": [
"// Duck module",
"export const ${1:ModuleName}_REQUEST = \"${1}_REQUEST\";",
"export const ${1}_SUCCESS = \"${1}_SUCCESS\";",
"export const ${1}_ERROR = \"${1}_ERROR\";",
"",
"/**",
" * State interface formodule",
" */",
"export interface ${1/(.*)/${1:/capitalize}/}State {",
当我进入我的 sn-p 时,我想写 FOO,当我关闭时,我希望将 sn-p 的最后一行转换为:
export interface FooState {
看起来大写不会小写尾随字符,所以我最终得到:
export interface FOOState
有没有办法保证第一个字符是大写的,其他的都是小写的?
【问题讨论】:
标签: visual-studio-code code-snippets vscode-snippets