Live template for working with modifier parameter

Example of live template that I use to generate initial modifier parameter using composable function

IntelliJ Idea Kotlin Android Studio
  1. Open live templates settings by double-Shift and entering Live template.
  2. Add template group, for example _Custom
  3. Add live template with next settings:
  • Abbreviation: mom
  • Applicable context: Expression
  • Description: Modifier

Template text:

modifier = Modifier
    .

To use, put cursor between ( and ) when call composable function, type mom and click Tab

2023-05-28 14:31:09