Extract Parameter

Extract code to a parameter in Kotlin

Highlight the code you want to extract to a field and press ⌥⌘P (macOS) / Ctrl+Alt+P (Windows/Linux), to extract it.

Extracting parameters can be useful in improving the readability of your code.


Related Resources

Convert Concatenation To Template
Use quick intentions to convert to a template string
Convert to Expression Body
Use quick intentions to convert to use expression body syntax
Find in File
Find a specific name or string in your file