前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >IDEA快捷键拆解系列(十九):Postfix篇

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

作者头像
happyJared
发布2018-09-20 10:14:42
5050
发布2018-09-20 10:14:42
举报
文章被收录于专栏:happyJaredhappyJared

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

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

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

Postfix
Postfix

Postfix

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

  1. !
!
!

!

  1. assert
assert
assert

assert

  1. cast
cast
cast

cast

  1. else
else
else

else

  1. filed
filed
filed

filed

  1. for
for
for

for

  1. fori
fori
fori

fori

  1. format
format
format

format

  1. forr
Postfix
Postfix

Postfix

  1. if
if
if

if

  1. inst
inst
inst

inst

  1. instanceof
instanceof
instanceof

instanceof

  1. iter
iter
iter

iter

  1. lambda
lambda
lambda

lambda

  1. nn
nn
nn

nn

  1. not
not
not

not

  1. notnull
notnull
notnull

notnull

  1. null
null
null

null

  1. opt
opt
opt

opt

  1. return
return
return

return

  1. sout
sout
sout

sout

  1. stream
stream
stream

stream

  1. switch
switch
switch

switch

  1. synchronized
synchronized
synchronized

synchronized

  1. throw
throw
throw

throw

  1. try
try
try

try

  1. twr
Postfix
Postfix

Postfix

  1. while
while
while

while

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

本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2018.03.25 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档