代码之家  ›  专栏  ›  技术社区  ›  unxp

PhpStorm live template表达式以转换当前变量

  •  0
  • unxp  · 技术社区  · 6 年前

    所以我们可以使用表达式来转换活动模板中的其他变量。

    Working example with two variables while second one references the first one

    snakeCase NAME 直接地

    Example with expected behaviour, having just one variable

    尝试 snakeCase(NAME) , snakeCase(String) snakeCase() . 似乎都不管用。也许有人发现了?

    0 回复  |  直到 6 年前
        1
  •  3
  •   lena    6 年前

    snakeCase(clipboard()) ),文件名( snakeCase(fileName())

    如果您想更改现有变量的名称,可以尝试 String Manipulation 插件,例如

    推荐文章