IntelliJ IDEA offers to extract values to constants.

The shortcut on my machine is Cmd+Alt+C : shortcuts

However, when I select a string in my Kotlin code and use the shortcut, nothing happens.

When I run Refactor This, the option does not even appear:

.refactor this]2

I am using IntelliJ IDEA Ultimate Edition 2018.3.5 and Kotlin 1.3.21

1 Answer 1


Since there is no question I suppose you are asking if there is such feature.

I have this feature in refactoring menu available in IDEA 2022.1.1. Jetbrains probably add this improvement since 2018.3.5.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .