Using Live Templates to type less

Hi :slight_smile:

I’m surprised I can’t find any post about this:

This repository includes a collection of Live Templates for IntelliJ Idea. What they enable is for you to type ora (for example) and after pressing the TAB key it gets converted into

fun main() = application { 
    configure { }
    program {
        extend {

I find that super convenient. Just create a new Kotlin file, type ora [TAB] and you’re rolling :slight_smile:

You can combine those with your own live templates. My settings look like this:

I added things I frequently use. For example if I type kb [TAB] I get

keyboard.keyDown.listen { 
    when(it.key) {
        KEY_ENTER -> 1+1
        KEY_ESCAPE -> application.exit()

I got used to closing my program by pressing the ESC key with Processing ¯\_(ツ)_/¯.
The 1+1 is just a placeholder to fill with something more useful, in case you are wondering :slight_smile:

Do you have any templates that make your life easier?