阅读(790) (0)

IDEA 自带变量参数介绍

2021-06-28 17:08:46 更新

在文章开头我们已经有提到 IntelliJ IDEA 实时代码模板是有变量参数设置的,其中 IntelliJ IDEA 自带了两个变量参数:

  • $END$​,表示最后都编辑完后光标所处的位置
  • $SELECTION$​,表示设置环绕实时代码模板,环绕功能下面会模板专门进行介绍。
  • 除了上面两个变量参数外,其他一律都会自定义变量。
  • 官网介绍:https://www.jetbrains.com/idea/help/live-template-variables.html
  • $END$​ indicates the position of the cursor after the template is expanded.
  • $SELECTION$​ is used in surround templates and stands for the code fragment to be wrapped.