From the course: IntelliJ IDEA Community Edition Essential Training

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Create and use live templates

Create and use live templates

From the course: IntelliJ IDEA Community Edition Essential Training

Start my 1-month free trial

Create and use live templates

- [Instructor] IntelliJ IDEA lets you expand abbreviations into full code. These are called live templates. IntelliJ IDEA comes predefined with dozens of live templates for various languages. I'm working in Java, and to use an existing live template, I simply type the abbreviation. I've demonstrated this previously with sout, which stands for system out. When I type that string and then press tab or enter a return, it expands to system.out.println. Here's where these live templates are defined. I'll go to Preferences on Mac or Settings on Windows, and under Editor, there's a Live Templates window. Notice that there are live templates for all sorts of languages and platforms. There's Kotlin, Java, Maven, and so on. And for Android developers, there are dozens of live templates under different Android categories. Under the Java section for example, here's one called fori which creates an iteration loop. So I can…

Contents