Is there a keyboard shortcut generating a foreach and also for loop?
标签:
intellij-idea
相关问题
- Configure gradle plugin based on future tasks
- How to make available “open this project in Intell
- IntelliJ 2017.1.2 GOLANG debug does not work on br
- JavaFX sample issue
- Could not import the newly generated play framewor
相关文章
- In IntelliJ IDEA, how can I create a key binding t
- IntelliJ IDEA can't open projects or add SDK o
- IntelliJ Subversion Authentication Required Dialog
- Kotlin Koans with EduTools plugin: “Failed to laun
- How to set up Intellij to run javap command on a p
- How to enable “type information” for streams retur
- How to add a project to build path in IntelliJ Ide
- How do I use Gradle bootRun with --args in Intelli
Of course, have a look in the help at the default keymap references. Type one of the following and hit "tab":
You can use Postfix Completion too. Press Ctrl + Alt + S to open the Settings. For example:
Aditionally to other answers, you don't even have to use Ctrl + J (but nice for checking what are your possibilities..) Just start type and press Enter:
Foreach: type "iter" then press Enter.
For loop: type "fori" then press Enter.
Idea will recognize the context and suggest the most likely var to iter through, if you like the given options, just press Enters!
you can use 'live templates' to generate several types of code snippets, loop iteration is done by following -
There are probably many more, just lookup 'Live Templates' in help documentation.
Pressing Ctrl+J opens the list of live templates within your code context. Then type 'itin'.
Create for loop from an existing list statement:
https://www.jetbrains.com/phpstorm/help/creating-code-constructs-using-surround-templates.html