A simple approach to install the live templates is to copy its XML code and paste them into the IDE:
- Right click on OPENRNDR.xml → Open In New Window
- On the new window, select all the
<template> ... </template>
blocks (in other words, copy 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 calledOPENRNDR
. - Click on
OPENRNDR
to select it. - Press CTRL+V or Command+V to paste the copied XML templates into the OPENRNDR group.
Now you can use the live templates.
The cool thing about this copy-paste approach is that it makes it easy to share templates on a chat or post them here in the forum. For example here goes one I often use: dbc
for drawer.bounds.center
:
<template name="dbc" value="drawer.bounds.center" description="drawer.bounds.center" toReformat="false" toShortenFQNames="true">
<context>
<option name="KOTLIN" value="true" />
</context>
</template>