Intellij IDEA生成for-each / for键盘快捷键 [英] Intellij IDEA generate for-each/for keyboard shortcut

查看:336
本文介绍了Intellij IDEA生成for-each / for键盘快捷键的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有生成foreach和循环的键盘快捷键?

Is there a keyboard shortcut generating a foreach and also for loop?

推荐答案

您可以使用实时模板生成几种类型的代码片段,循环迭代通过以下方式完成 -

you can use 'live templates' to generate several types of code snippets, loop iteration is done by following -

iter    Iterate (for each..in) 
itin    Iterate (for..in) 
itli    Iterate over a List
itar    Iterate elements of array 
ritar   Iterate elements of array in reverse order 

可能还有更多,只需在帮助文档中查找实时模板。

There are probably many more, just lookup 'Live Templates' in help documentation.

这篇关于Intellij IDEA生成for-each / for键盘快捷键的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆