Skip to content

Instantly share code, notes, and snippets.

@cortinico
Created April 6, 2020 15:00
Show Gist options
  • Star 7 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cortinico/08c19280965bfea9682c8043fa81da30 to your computer and use it in GitHub Desktop.
Save cortinico/08c19280965bfea9682c8043fa81da30 to your computer and use it in GitHub Desktop.
.debug -> .also(::println) Live Template
<templateSet group="Kotlin">
<template name="debug" value="also(::println)" description="Print a debug log" toReformat="false" toShortenFQNames="true">
<context>
<option name="KOTLIN" value="true" />
<option name="KOTLIN_COMMENT" value="false" />
<option name="KOTLIN_TOPLEVEL" value="false" />
</context>
</template>
</templateSet>
@cortinico
Copy link
Author

You need to copy over this template inside the files in your local settings:

~/Library/Preferences/IntelliJIdea2019.3/templates/Kotlin.xml

@cortinico
Copy link
Author

Here you can see the Live Template in action:
https://twitter.com/cortinico/status/1247187387173781506

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment