Intellij IDEA如何添加我自己的密钥以完成代码

时间:2017-06-08 08:20:12

标签: intellij-idea

psvm + tab会:

public static void main(String[] args) {

}

现在我希望cml为:

CommandLineRunner runner () {
    return args -> {

    };
}

如何在IDEA中添加它?

1 个答案:

答案 0 :(得分:1)

结帐IntelliJ IDEA Live Templates documentation

基本上你可以创建这样的缩写:

  • 转到File -> Settings... -> Editor -> Live Templates
  • 使用+符号
  • 添加实时模板
  • 至少定义缩写和文本模板
  • 定义适当的JAVA上下文

就是这样。

相关问题