<template name="sout" value="println($END$)" de...
# announcements
h
<template name="sout" value="println($END$)" description="Prints a string to System.out" toReformat="true" toShortenFQNames="false"> Is it possible to create a live kotlin template like
{statement}.{{templateName}}
? Similar to how doing something like
Copy code
val x = "hi"
x.sout <Tab> // -> println(x)
ATM, I just duplicated the sout template and added my own, but it doens't work where I call it on another variable. Is that even possible? So I can do something like
x.{{templateName}}<Tab> // -> Something.doSomething(x)
<Tab> is literally pressing the tab key while in IntelliJ. Try doing it. Write down an expression and do
{expression}.sout
and it will automatically complete to
println({expression})
m
Oh sorry; my bad, deleted my comment to clarify it wasn't an answer
h
All good