美文网首页IDEA使用技巧收藏
IDEA快捷键拆解系列(十九):Postfix篇

IDEA快捷键拆解系列(十九):Postfix篇

作者: happyJared | 来源:发表于2018-03-25 13:36 被阅读199次

  这是IDEA快捷键拆解系列的第十九篇。

  本文将介绍一下IDEA另外一个强大的功能:Postfix。

  Postfix和Live Template有点类似,但目前来看是不支持自定义的,在设置面板(快捷键:Ctrl + Alt + S)搜索“Postfix”即可。

PostfixPostfix

  从上图可以看到,目前官方定义了Java、JavaScript和Kotlin三种编程语言的Postfix。其中,Description区域描述了该Postfix的作用,Before区域是我们编码前,默认使用Tab键后,即可转换成After区域的代码效果。以下是Java中常用的一些Postfix。

  1. !
!!
  1. assert
assertassert
  1. cast
castcast
  1. else
elseelse
  1. filed
filedfiled
  1. for
forfor
  1. fori
forifori
  1. format
formatformat
  1. forr
PostfixPostfix
  1. if
ifif
  1. inst
instinst
  1. instanceof
instanceofinstanceof
  1. iter
iteriter
  1. lambda
lambdalambda
  1. nn
nnnn
  1. not
notnot
  1. notnull
notnullnotnull
  1. null
nullnull
  1. opt
optopt
  1. return
returnreturn
  1. sout
soutsout
  1. stream
streamstream
  1. switch
switchswitch
  1. synchronized
synchronizedsynchronized
  1. throw
throwthrow
  1. try
trytry
  1. twr
PostfixPostfix
  1. while
whilewhile

  从定义来看,Java中的Postfix也就大概三十个,相信熟练掌握之后可以大大提高我们的编码效率。


IDEA快捷键拆解系列(前言)
IDEA快捷键拆解系列(一)
IDEA快捷键拆解系列(二):File篇
IDEA快捷键拆解系列(三):Edit篇
IDEA快捷键拆解系列(四):View篇
IDEA快捷键拆解系列(五):Navigate篇
IDEA快捷键拆解系列(六):Code篇
IDEA快捷键拆解系列(七):Analyze篇
IDEA快捷键拆解系列(八):Refactor篇
IDEA快捷键拆解系列(九):Build篇
IDEA快捷键拆解系列(十):Run篇
IDEA快捷键拆解系列(十一):Tools篇
IDEA快捷键拆解系列(十二):VCS篇
IDEA快捷键拆解系列(十三):Window篇
IDEA快捷键拆解系列(十四):Help篇
IDEA快捷键拆解系列(十五):经验篇
IDEA快捷键拆解系列(十六):插件篇
IDEA快捷键拆解系列(十七):Debug篇
IDEA快捷键拆解系列(十八):Live Templates篇
IDEA快捷键拆解系列(十九):Postfix篇
IDEA快捷键拆解系列(后记)

相关文章

网友评论

本文标题:IDEA快捷键拆解系列(十九):Postfix篇

本文链接:https://www.haomeiwen.com/subject/xmgqcftx.html