这个问题是我上周问的一个问题-How to apply more than one function to a passed in live template variable?

现在,我有了一个名为classNameFromFileName的实时模板功能,现在无法在文件模板中使用它。

我已经在“文件模板”编辑器页面内选中了“启用实时模板”复选框,并且#set#[[ ]]#等的任何组合均不起作用。

如果使用模板,则最终只会将Live Template函数的名称放入新文件中,而不是实际调用该函数。

PyCharm帮助没有提供示例功能-有人知道如何从文件模板调用实时模板功能吗?

谢谢。

最佳答案

目前不可能。您可以对以下问题进行投票:

  • Live template variables don't work properly in File templates
  • Code Templates. Add ability to use Live Templates or Live Template variables.
  • 关于intellij-idea - PyCharm:如何在文件模板中使用实时模板,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/39700366/

    10-14 18:32
    查看更多