如何调整ALT + Ins「添加新元素」选项排序,将Kotlin置为首位?
Absolutely, you can rearrange those menu items to have Kotlin at the top—no more clicking the dropdown every time! Here's how to do it in any IntelliJ-based IDE (like IntelliJ IDEA, Android Studio, etc.):
- Open the Settings window: Use the shortcut
Ctrl+Alt+S(Windows/Linux) orCmd+,(Mac), or navigate via File > Settings (Windows/Linux) / IntelliJ IDEA > Settings (Mac). - Go to the Editor > File and Code Templates section.
- Switch to the Files tab—this lists all the file types that show up when you press
Alt+Ins. - Find the Kotlin Class entry (or any other Kotlin template you use frequently), click and drag it to the very top of the list.
- Click Apply then OK to save your changes.
Next time you hit Alt+Ins, Kotlin Class will be the first option you see—just select it directly without needing to open the dropdown. If you use other Kotlin templates (like Interface, Enum Class, or Data Class), you can rearrange those in the same list to put them in your preferred order too.
内容的提问来源于stack exchange,提问作者Manza
相关产品推荐
相关产品推荐

