Live Templates
Live Templates is an IntelliJ Idea feature that expands short acronyms into full blocks of code.
To install the live templates:
- Right click on OPENRNDR.xml → Open In New Window
- On the new window, select everything except the first and the last lines.
- Right click on the selected text → Copy
- In IntelliJ Idea, go to File → Settings → Editor → Live Templates
- Click on + on the right side of the window to create a Template Group called OPENRNDR.
- Click on the new OPENRNDR group to select it.
- Press CTRL+V or Command+V to paste the copied XML templates into the OPENRNDR group.
- Close the settings window
Now,
- Navigate into
src/main/kotlinon the left panel - Create a file called (
plotting01.ktfor instance) - type
oraand press theTABkey
It should get expanded into the following:
fun main() = application {
configure { }
program {
extend {
}
}
}
To start writing a new program from scratch, repeat the last three steps.